Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CPlane Class Reference

CPlane. More...

#include <CPlane.h>

List of all members.

Public Member Functions

 CPlane ()
 constructor

 CPlane (zfloat a, zfloat b, zfloat c, zfloat d)
 constructor

 CPlane (const CVector3 &v1, const CVector3 &v2, const CVector3 &v3)
 constructor

 CPlane (const CVector3 &v, const CVector3 &n)
 constructor

 CPlane (const CPlane &p, zfloat dist)
 constructor

CVector3 Norm () const
 Returns the plane normal.

CVector3 NormUnit () const
 returns the normalized plane normal

zfloat Dist (const CVector3 &v) const
 returns the distance between a point and the plane

bool IntersectPlanes (const CPlane &P2, const CPlane &P3, CVector3 &inter) const
 returns the intersection between the plane and other two planes

zuint RayIntersection (const CVector3 &v1, const CVector3 &v2, CVector3 &result) const
 return the intersection between the plane and the segment (v1,v2)

zuint MaxNormCoord () const
 returns which is the maxiest coord of the normal to the plane


Public Attributes

zfloat fA
 following plane equation A*x+B*y+C*z+D = 0

zfloat fB
 following plane equation A*x+B*y+C*z+D = 0

zfloat fC
 following plane equation A*x+B*y+C*z+D = 0

zfloat fD
 following plane equation A*x+B*y+C*z+D = 0


Detailed Description

CPlane.

plane definition class


Constructor & Destructor Documentation

CPlane::CPlane   [inline]
 

constructor

CPlane::CPlane zfloat    a,
zfloat    b,
zfloat    c,
zfloat    d
[inline]
 

constructor

CPlane::CPlane const CVector3   v1,
const CVector3   v2,
const CVector3   v3
[inline]
 

constructor

CPlane::CPlane const CVector3   v,
const CVector3   n
[inline]
 

constructor

v is plane origin and n is the normal

CPlane::CPlane const CPlane &    p,
zfloat    dist
[inline]
 

constructor

dist is the distance respect plane p


Member Function Documentation

zfloat CPlane::Dist const CVector3   v const [inline]
 

returns the distance between a point and the plane

bool CPlane::IntersectPlanes const CPlane &    P2,
const CPlane &    P3,
CVector3   inter
const [inline]
 

returns the intersection between the plane and other two planes

returns false if there is no solution.

zuint CPlane::MaxNormCoord   const [inline]
 

returns which is the maxiest coord of the normal to the plane

CVector3 CPlane::Norm   const [inline]
 

Returns the plane normal.

CVector3 CPlane::NormUnit   const [inline]
 

returns the normalized plane normal

zuint CPlane::RayIntersection const CVector3   v1,
const CVector3   v2,
CVector3   result
const [inline]
 

return the intersection between the plane and the segment (v1,v2)

returns the following values:

  • INT_COINCIDENT (0) if the segment (v1,v2) lays on the plane.
    in this case result assumes the value of v1.
  • INT_ALLIN (1) if the segment (v1,v2) is inside the plane.
  • INT_ALLOUT (2) if the segment (v1,v2) is outside the plane.
  • INT_OK (3) if the segment (v1,v2) crosses the plane.
    In this case the intersection vertex is stored in result



Member Data Documentation

zfloat CPlane::fA
 

following plane equation A*x+B*y+C*z+D = 0

zfloat CPlane::fB
 

following plane equation A*x+B*y+C*z+D = 0

zfloat CPlane::fC
 

following plane equation A*x+B*y+C*z+D = 0

zfloat CPlane::fD
 

following plane equation A*x+B*y+C*z+D = 0


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


SourceForge.net Logo