#include <BALL/MATHS/plane3.h>
List of all members.
Public Member Functions |
|
|
| TPlane3 () |
| TPlane3 (const TPlane3 &plane) |
| TPlane3 (const TVector3< T > &point, const TVector3< T > &normal) |
| TPlane3 (const TVector3< T > &a, const TVector3< T > &b, const TVector3< T > &c) |
| TPlane3 (const T &a, const T &b, const T &c, const T &d) throw (Exception::DivisionByZero) |
virtual | ~TPlane3 () |
virtual void | clear () |
|
|
void | swap (TPlane3 &plane) |
void | set (const TPlane3 &plane) |
void | set (const TVector3< T > &point, const TVector3< T > &normal) |
void | set (const TVector3< T > &a, const TVector3< T > &b, const TVector3< T > &c) |
TPlane3 & | operator= (const TPlane3 &plane) |
void | get (TPlane3 &plane) const |
void | get (TVector3< T > &point, TVector3< T > &normal) const |
|
|
void | normalize () throw (Exception::DivisionByZero) |
void | hessify () |
|
|
bool | operator== (const TPlane3 &plane) const |
bool | operator!= (const TPlane3 &plane) const |
bool | has (const TVector3< T > &point) const |
bool | has (const TLine3< T > &line) const |
|
|
bool | isValid () const |
void | dump (std::ostream &s=std::cout, Size depth=0) const |
Public Attributes |
|
|
TVector3< T > | p |
TVector3< T > | n |
Detailed Description
template<typename T>
class BALL::TPlane3< T >
Threedimensional plane. A plane is defined by a point and its normal.
Definition at line 54 of file plane3.h.
Constructor & Destructor Documentation
Default constructor. This method creates a new TPlane3 object. The two components are initialized to (T)0
.
Definition at line 68 of file plane3.h.
Copy constructor. Create a new TPlane3 object from another.
- Parameters:
-
| plane | the TPlane3 object to be copied |
Definition at line 79 of file plane3.h.
Detailed constructor. Create a new instances of TPlane3 from a point and the normal.
- Parameters:
-
| point | assigned to p |
| normal | assigned to n |
Definition at line 91 of file plane3.h.
Detailed constructor. Create a new instance of TPlane3 from three points.
- Parameters:
-
| a | assigned to p |
| a,b,c | are used to calculate the normal n |
Definition at line 103 of file plane3.h.
Constructor. Create a new TPlane3 object from four T
values. Form: COORDINATE (ax + by + cz + d = 0)
- Parameters:
-
| a,b,c | are used to calculate the normal n and the point p |
Definition at line 115 of file plane3.h.
Destructor. Destructs the TPlane3 object. As there are no dynamic data structures, nothing happens.
Definition at line 141 of file plane3.h.
Member Function Documentation
Clear method. The values are set to 0.
Definition at line 149 of file plane3.h.
template<typename T>
void BALL::TPlane3< T >::dump |
( |
std::ostream & |
s = std::cout , |
|
|
Size |
depth = 0 | |
|
) |
| | const [inline] |
Internal state dump. Dump the current internal state of {*this} to the output ostream s with dumping depth depth .
- Parameters:
-
| s | - output stream where to output the internal state of {*this} |
| depth | - the dumping depth |
Definition at line 347 of file plane3.h.
Assign to a point and a normal.
- Parameters:
-
| point | the point to be assigned to |
| normal | the normal to be assigned to |
Definition at line 236 of file plane3.h.
Assign to another instance of Plane3. Assigns the components to another plane.
- Parameters:
-
| plane | the plane to be assigned to |
Definition at line 225 of file plane3.h.
Test whether a given line is a member of the plane.
- Parameters:
-
| line | the line to be tested |
- Returns:
- bool, true or false
Definition at line 320 of file plane3.h.
Test whether a given point is a member of the plane.
- Parameters:
-
| point | the point to be tested |
- Returns:
- bool, true or false
Definition at line 310 of file plane3.h.
Hessify the plane. The normal is scaled with its length: . If the dot product of the point with the normal is less then zero, the normal is negated.
Definition at line 272 of file plane3.h.
Test whether instance is valid. always retruns true
- Returns:
- bool true
Definition at line 335 of file plane3.h.
Normalize the the normal of the plane. The normal is scaled with its length: .
- Exceptions:
-
| DivisionByZero | if the length of the normal is 0 |
Definition at line 253 of file plane3.h.
Inequality operator.
- Returns:
- bool, false if all components are equal, true otherwise
Definition at line 300 of file plane3.h.
Assignment operator. Assign the components from another instance of plane.
- Parameters:
-
| plane | the plane to assign from |
Definition at line 212 of file plane3.h.
Equality operator.
- Returns:
- bool, true if all components are equal, false otherwise
Definition at line 291 of file plane3.h.
Assign from three points.
- Parameters:
-
| a | the first point |
| b | the second point |
| c | the third point |
Definition at line 201 of file plane3.h.
Assign from a point and a normal.
- Parameters:
-
| point | the new point |
| normal | the new normal |
Definition at line 189 of file plane3.h.
Swap the contents of two instances of planes.
- Parameters:
-
| vector | the plane to swap contents with |
| bool | ignored - just for interface consistency |
Definition at line 178 of file plane3.h.
Member Data Documentation