Allolib  1.0
C++ Components For Interactive Multimedia
al::Plane< T > Class Template Reference

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/math/al_Plane.hpp>

Public Types

typedef al::Vec< 3, T > Vec3
 

Public Member Functions

 Plane (const Vec3 &v1, const Vec3 &v2, const Vec3 &v3)
 
const Vec3normal () const
 Get normal perpendicular to plane (a, b, and c components)
 
d () const
 Get scalar component of plane equation.
 
distance (const Vec3 &p) const
 Returns distance from plane to point (measured relative to plane normal)
 
bool inNegativeSpace (const Vec3 &p) const
 Returns whether a point is in the negative half-space of the plane.
 
bool inPositiveSpace (const Vec3 &p) const
 Returns whether a point is in the positive half-space of the plane.
 
Planefrom3Points (const Vec3 &v1, const Vec3 &v2, const Vec3 &v3)
 Set from three points lying on the plane. More...
 
PlanefromNormalAndPoint (const Vec3 &normal, const Vec3 &point)
 Set plane from a unit length normal and point lying on the plane.
 
PlanefromCoefficients (T a, T b, T c, T d)
 Set plane from coefficients.
 

Protected Attributes

Vec3 mNormal
 
mD
 

Detailed Description

template<class T>
class al::Plane< T >

A plane in Euclidean space

Definition at line 53 of file al_Plane.hpp.

Member Function Documentation

◆ from3Points()

template<class T >
Plane< T > & al::Plane< T >::from3Points ( const Vec3 v1,
const Vec3 v2,
const Vec3 v3 
)

Set from three points lying on the plane.

The normal is computed according to a right-handed coordinate system. For left-handed, swap the first and last vertices.

Definition at line 98 of file al_Plane.hpp.


The documentation for this class was generated from the following file: