Public Member Functions | Public Attributes

Plane3 Class Reference

A Plane3 is a plane in space, with the equation: More...

List of all members.

Public Member Functions

 Plane3 ()
 Plane3 (double, double, double, double)
 Plane3 (const Coord3 &vectors, const Coord3 &, bool twovectors)
 Plane3 (const Coord3 &, const Coord3 &, const Coord3 &)
 Plane3 (const TypeSet< Coord3 > &)
void set (const Coord3 &vector, const Coord3 &, bool twovectors)
void set (const Coord3 &, const Coord3 &, const Coord3 &)
float set (const TypeSet< Coord3 > &)
bool operator== (const Plane3 &) const
bool operator!= (const Plane3 &) const
Coord3 normal () const
double distanceToPoint (const Coord3 &, bool wichside=false) const
bool intersectWith (const Line3 &, Coord3 &) const
bool intersectWith (const Plane3 &, Line3 &) const

Public Attributes

double A_
double B_
double C_
double D_

Detailed Description

A Plane3 is a plane in space, with the equation:

Ax + By + Cz + D = 0


Constructor & Destructor Documentation

Plane3::Plane3 (  ) 
Plane3::Plane3 ( double  ,
double  ,
double  ,
double   
)
Plane3::Plane3 ( const Coord3 vectors,
const Coord3 ,
bool  twovectors 
)
Parameters:
twovectors Specifies if the second argument is a vector or a position
Plane3::Plane3 ( const Coord3 ,
const Coord3 ,
const Coord3  
)
Plane3::Plane3 ( const TypeSet< Coord3 > &   ) 

Member Function Documentation

double Plane3::distanceToPoint ( const Coord3 ,
bool  wichside = false 
) const
Parameters:
wichside if true, the distance along the normal will be returned, wich can be negative.
bool Plane3::intersectWith ( const Line3 ,
Coord3  
) const

Returns true if the plane intersects with the line. If it returns true, the Coord3 is set

bool Plane3::intersectWith ( const Plane3 ,
Line3  
) const

Returns true if the planes intersects. If it returns true, the Line3 is set

Coord3 Plane3::normal (  )  const [inline]
bool Plane3::operator!= ( const Plane3  )  const
bool Plane3::operator== ( const Plane3  )  const
void Plane3::set ( const Coord3 ,
const Coord3 ,
const Coord3  
)
float Plane3::set ( const TypeSet< Coord3 > &   ) 
Returns:
a value between 0-1 that indicates how well the points fit to a plane. 1 = perfect fit 0 = no fit
void Plane3::set ( const Coord3 vector,
const Coord3 ,
bool  twovectors 
)
Parameters:
twovectors Specifies if the second argument is a vector or a position

Member Data Documentation

double Plane3::A_
double Plane3::B_
double Plane3::C_
double Plane3::D_