Thea

A plane (2flat) in 3dimensional space. More...
#include <Hyperplane3.hpp>
Public Types  
typedef HyperplaneN< N, T >  HyperplaneT 
Ndimensional hyperplane. More...  
Public Member Functions  
HyperplaneN< N, U >  cast () const 
Cast the hyperplane to a different scalar type. More...  
VectorT  closestPoint (VectorT const &p) const 
Get the point on the hyperplane closest to a given point. More...  
T  distance (VectorT const &p) const 
Get the (unsigned) distance of a given point from the hyperplane. More...  
void  flip () 
Flip the hyperplane so that the normal points the other way. More...  
void  getEquation (T &a, T &b, T &c, T &d) const 
Get the coefficients a, b, c, d of the plane equation a * x + b * y + c * z + d = 0. More...  
Vector< N+1, T >  getEquation () const 
Get the coefficients {a_i} of the hyperplane equation a_0 * x_0 + a_1 * x_1 + ... More...  
VectorT const &  getNormal () const 
Get the unit normal vector of the hyperplane. More...  
VectorT  getPoint () const 
Get a point on the hyperplane. More...  
bool  negativeHalfSpaceContains (VectorT const &p) const 
Check if the negative half space (the side of the hyperplane not containing the normal) contains a given point. More...  
bool  positiveHalfSpaceContains (VectorT const &p) const 
Check if the positive half space (the side of the hyperplane containing the normal) contains a given point. More...  
VectorT  reflect (VectorT const &p) const 
Reflect a point in the hyperplane. More...  
T  signedDistance (VectorT const &p) const 
Get the signed distance of a given point from the hyperplane. More...  
T  squaredDistance (VectorT const &p) const 
Get the square of the distance of the hyperplane from a given point. More...  
std::string  toString () const 
Get a textual description of the hyperplane. More...  
Static Public Member Functions  
static HyperplaneT  fromDistanceAndNormal (T dist_, VectorT const &normal_, bool normalize=true) 
Construct a hyperplane from its signed distance from the origin, and its normal vector (need not be a unit vector). More...  
static HyperplaneN  fromEquation (T const &a, T const &b, T const &c, T const &d) 
Construct a hyperplane given coefficients a, b, c, d of the plane equation a * x + b * y + c * z + d = 0. More...  
static HyperplaneT  fromNPoints (Array< VectorT > const &points) 
Construct a hyperplane from N points on it. More...  
static HyperplaneT  fromPointAndNormal (VectorT const &point_, VectorT const &normal_, bool normalize=true) 
Construct a hyperplane from a point on it, and its normal vector (need not be a unit vector). More...  
Protected Attributes  
T  dist 
The signed distance of the hyperplane from the origin. More...  
VectorT  normal 
The unit normal vector of the hyperplane. More...  
A plane (2flat) in 3dimensional space.
Definition at line 26 of file Hyperplane3.hpp.

inherited 
Ndimensional hyperplane.
Definition at line 41 of file HyperplaneN.hpp.

inherited 
Cast the hyperplane to a different scalar type.
Definition at line 102 of file HyperplaneN.hpp.

inherited 
Get the point on the hyperplane closest to a given point.
Definition at line 157 of file HyperplaneN.hpp.

inherited 
Get the (unsigned) distance of a given point from the hyperplane.
Definition at line 136 of file HyperplaneN.hpp.

inherited 
Flip the hyperplane so that the normal points the other way.
Definition at line 129 of file HyperplaneN.hpp.

staticinherited 
Construct a hyperplane from its signed distance from the origin, and its normal vector (need not be a unit vector).
The normalize argument suppresses rescaling of the normal to unit length if set to false.
Definition at line 53 of file HyperplaneN.hpp.

static 
Construct a hyperplane given coefficients a, b, c, d of the plane equation a * x + b * y + c * z + d = 0.
Definition at line 44 of file Hyperplane3.hpp.

staticinherited 
Construct a hyperplane from N points on it.
Definition at line 76 of file HyperplaneN.hpp.

staticinherited 
Construct a hyperplane from a point on it, and its normal vector (need not be a unit vector).
The normalize argument suppresses rescaling of the normal to unit length if set to false.
Definition at line 66 of file HyperplaneN.hpp.
void getEquation  (  T &  a, 
T &  b,  
T &  c,  
T &  d  
)  const 
Get the coefficients a, b, c, d of the plane equation a * x + b * y + c * z + d = 0.
Definition at line 68 of file Hyperplane3.hpp.

inherited 
Get the coefficients {a_i} of the hyperplane equation a_0 * x_0 + a_1 * x_1 + ...
Definition at line 116 of file HyperplaneN.hpp.

inherited 
Get the unit normal vector of the hyperplane.
Definition at line 111 of file HyperplaneN.hpp.

inherited 
Get a point on the hyperplane.
Definition at line 108 of file HyperplaneN.hpp.

inherited 
Check if the negative half space (the side of the hyperplane not containing the normal) contains a given point.
Returns true if the point lies on the hyperplane.
Definition at line 175 of file HyperplaneN.hpp.

inherited 
Check if the positive half space (the side of the hyperplane containing the normal) contains a given point.
Returns true if the point lies on the hyperplane.
Definition at line 166 of file HyperplaneN.hpp.

virtualinherited 
Get the intersection of a ray with the object, including the hit time and the normal at the intersection point.
A negative time is returned if there was no intersection in the forward direction. If the normal cannot be computed, the zero vector is returned.
ray  The ray to test for intersection. 
max_time  Maximum allowable hit time, ignored if negative. 
Reimplemented from RayIntersectableN< N, T >.
Definition at line 204 of file HyperplaneN.hpp.

virtualinherited 
Get the time taken for a ray to intersect the object, or a negative value if there was no intersection in the forward direction.
All subclasses must reimplement this method. If the return value is negative, it should be at least
ray  The ray to test for intersection. 
max_time  Maximum allowable hit time, ignored if negative. 
Implements RayIntersectableN< N, T >.
Definition at line 191 of file HyperplaneN.hpp.

virtualinherited 
Check if a ray intersects the object in the forward direction.
ray  The ray to test for intersection. 
max_time  Maximum allowable hit time, ignored if negative. 
Reimplemented from RayIntersectableN< N, T >.
Definition at line 186 of file HyperplaneN.hpp.

inherited 
Reflect a point in the hyperplane.
Definition at line 181 of file HyperplaneN.hpp.

inherited 
Get the signed distance of a given point from the hyperplane.
This is positive if the point is on the side of the hyperplane containing the normal, and negative if the point is on the other side.
Definition at line 145 of file HyperplaneN.hpp.

inherited 
Get the square of the distance of the hyperplane from a given point.
Definition at line 151 of file HyperplaneN.hpp.

inherited 
Get a textual description of the hyperplane.
Definition at line 214 of file HyperplaneN.hpp.

protectedinherited 
The signed distance of the hyperplane from the origin.
Definition at line 223 of file HyperplaneN.hpp.

protectedinherited 
The unit normal vector of the hyperplane.
Definition at line 222 of file HyperplaneN.hpp.