public

Inheritance Graph

graph BT
	_Plane
	click _Plane "classGeometry_1_1__Plane"

Description

A three dimensional plane. The plane is internally represented by its normal and offset from (0,0,0):

anx + bny + c*ny = offset

Note: Although the general definition allows a normal of arbitrary lengthinternal calculations request the normal to always be of length 1.0

Creation

   
   
  _Plane()
   
  _Plane( vec3_t _normal, const value_t _offset)
   
  _Plane(const vec3_t & _pos, vec3_t _normal)
   
  _Plane(const vec3_t & a, const vec3_t & b, const vec3_t & c)

Information

   
   
bool getIntersection(const _Line < vec3_t > & line, vec3_t & intersection) const
   
bool getIntersection(const _Ray < vec3_t > & ray, vec3_t & intersection) const
   
bool getIntersection(const _Segment < vec3_t > & s, vec3_t & intersection) const
   
bool getIntersection(const _Plane & plane, _Line < vec3_t > & intersection) const
   
const vec3_t & getNormal() const
   
const value_t & getOffset() const
   
vec3_t getProjection(const vec3_t & point) const
   
bool isUndefined() const
   
bool operator==(const _Plane & other) const
   
float planeTest(const vec3_t & point) const

Modification

   
   
void setNormal(const vec3_t & _normal)
   
void setOffset(const value_t _offset)

Serialization

 
 
 

Public Types

   
   
typedef T_ value_t
   
typedef _Vec3 < value_t > vec3_t

Documentation

function
Geometry::_Plane::_Plane

public inline
   
   
_Plane( )

(ctor) Create an undefined plane. ( isUndefined() ==true)

Defined in Geometry/Plane.h:47


function
Geometry::_Plane::_Plane

public inline
     
     
_Plane( vec3_t _normal,
  const value_t _offset
)    

(ctor)

Parameters

_normal
normalized normal-vector (length = 1.0)
_offset
offset from the origin

Defined in Geometry/Plane.h:53


function
Geometry::_Plane::_Plane

public inline
     
     
_Plane( const vec3_t & _pos,
  vec3_t _normal
)    

(ctor)

Parameters

_pos
one point on the plane
_normal
normalized normal-vector (length = 1.0)

Defined in Geometry/Plane.h:59


function
Geometry::_Plane::_Plane

public inline
     
     
_Plane( const vec3_t & a,
  const vec3_t & b,
  const vec3_t & c
)    

(ctor)

Parameters

abc
Points defining the plane

Defined in Geometry/Plane.h:64


function
Geometry::_Plane::getIntersection

public const inline
     
     
bool getIntersection( const _Line < vec3_t > & line,
  vec3_t & intersection
) const    

Defined in Geometry/Plane.h:91


function
Geometry::_Plane::getIntersection

public const inline
     
     
bool getIntersection( const _Ray < vec3_t > & ray,
  vec3_t & intersection
) const    

Defined in Geometry/Plane.h:94


function
Geometry::_Plane::getIntersection

public const inline
     
     
bool getIntersection( const _Segment < vec3_t > & s,
  vec3_t & intersection
) const    

Defined in Geometry/Plane.h:97


function
Geometry::_Plane::getIntersection

public const
     
     
bool getIntersection( const _Plane & plane,
  _Line < vec3_t > & intersection
) const    

Defined in Geometry/Plane.h:101


function
Geometry::_Plane::getNormal

public const inline
   
   
const vec3_t & getNormal( ) const

Defined in Geometry/Plane.h:103


function
Geometry::_Plane::getOffset

public const inline
   
   
const value_t & getOffset( ) const

Defined in Geometry/Plane.h:107


function
Geometry::_Plane::getProjection

public const inline
     
     
vec3_t getProjection( const vec3_t & point ) const

Defined in Geometry/Plane.h:111


function
Geometry::_Plane::isUndefined

public const inline
   
   
bool isUndefined( ) const

Returns

true iff the plane has no normal.

Defined in Geometry/Plane.h:116


function
Geometry::_Plane::operator==

public const inline
     
     
bool operator==( const _Plane & other ) const

Defined in Geometry/Plane.h:120


function
Geometry::_Plane::planeTest

public const inline
     
     
float planeTest( const vec3_t & point ) const

Returns

signed distance of the given point to the plane. on plane = 0 below plane < 0 above plane > 0

Defined in Geometry/Plane.h:130


function
Geometry::_Plane::setNormal

public inline
     
     
void setNormal( const vec3_t & _normal )

Note: it is assumed that the normal has length 1.0

Defined in Geometry/Plane.h:139


function
Geometry::_Plane::setOffset

public inline
     
     
void setOffset( const value_t _offset )

Defined in Geometry/Plane.h:143


typedef
Geometry::_Plane::value_t

public
 
 
typedef T_ value_t

Defined in Geometry/Plane.h:36


typedef
Geometry::_Plane::vec3_t

public
 
 
typedef _Vec3 < value_t > vec3_t

Defined in Geometry/Plane.h:37