#include <BALL/MATHS/line3.h>
Public Types | |
Enums | |
| enum | Form { FORM__PARAMETER = 0, FORM__TWO_POINTS = 1 } |
Public Member Functions | |
Constructors and Destructors | |
| TLine3 () | |
| TLine3 (const TLine3 &line) | |
| TLine3 (const TVector3< T > &point, const TVector3< T > &vector, Form form=FORM__PARAMETER) | |
| virtual | ~TLine3 () |
| virtual void | clear () |
Assignment | |
| void | swap (TLine3 &line) |
| void | set (const TLine3 &line) |
| void | set (const TVector3< T > &point, const TVector3< T > &vector, Form form=FORM__PARAMETER) |
| TLine3 & | operator= (const TLine3 &line) |
| void | get (TLine3 &line) const |
| void | get (TVector3< T > &point, TVector3< T > &vector, Form form=FORM__PARAMETER) const |
Accessors | |
| void | normalize () |
Predicates | |
| bool | operator== (const TLine3 &line) const |
| bool | operator!= (const TLine3 &line) const |
| bool | has (const TVector3< T > &point) const |
Debugging and Diagnostics | |
| bool | isValid () const |
| void | dump (std::ostream &s=std::cout, Size depth=0) const |
Public Attributes | |
Attributes | |
| TVector3< T > | p |
| TVector3< T > | d |
Generic Line in Three-Dimensional Space.
| enum BALL::TLine3::Form |
| BALL::TLine3< T >::TLine3 | ( | ) | [inline] |
Default constructor
| BALL::TLine3< T >::TLine3 | ( | const TLine3< T > & | line | ) | [inline] |
| BALL::TLine3< T >::TLine3 | ( | const TVector3< T > & | point, | |
| const TVector3< T > & | vector, | |||
| Form | form = FORM__PARAMETER | |||
| ) | [inline] |
Detailed constructor. Depending on form, create a new TLine3 object from a point and a vector or from two points.
| point | assigned to p | |
| vector | assigned to d | |
| form | assigns form of parameter 0 one Point and one Vector |
1 two Points | virtual BALL::TLine3< T >::~TLine3 | ( | ) | [inline, virtual] |
Destructor. Destructs the TLine3 object. As there are no dynamic data structures, nothing happens.
| virtual void BALL::TLine3< T >::clear | ( | ) | [inline, virtual] |
Clear method. The values are set to 0.
References BALL::TLine3< T >::d, and BALL::TLine3< T >::p.
| void BALL::TLine3< 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 .
| s | - output stream where to output the internal state of {*this} | |
| depth | - the dumping depth |
References BALL_DUMP_DEPTH, BALL_DUMP_HEADER, BALL_DUMP_STREAM_PREFIX, BALL_DUMP_STREAM_SUFFIX, BALL::TLine3< T >::d, and BALL::TLine3< T >::p.
| void BALL::TLine3< T >::get | ( | TVector3< T > & | point, | |
| TVector3< T > & | vector, | |||
| Form | form = FORM__PARAMETER | |||
| ) | const [inline] |
Assign to two instances of TVector3. Type of components depends on form.
| point | the first point | |
| vector | the second point or the vector component | |
| form | assigns form of parameter |
0 one Point and one Vector 1 two Points References BALL::TLine3< T >::d, BALL::TLine3< T >::FORM__PARAMETER, and BALL::TLine3< T >::p.
| void BALL::TLine3< T >::get | ( | TLine3< T > & | line | ) | const [inline] |
Assign to another instance of TLine3. Assigns the vector components to another vector.
| line | the line to be assigned to |
References BALL::TLine3< T >::d, and BALL::TLine3< T >::p.
| bool BALL::TLine3< T >::has | ( | const TVector3< T > & | point | ) | const [inline] |
Test whether a given point is a member of the line.
References BALL::Constants::c, BALL::TLine3< T >::d, BALL::Maths::isEqual(), BALL::Maths::isNotZero(), BALL::TLine3< T >::p, BALL::TVector3< T >::x, BALL::TVector3< T >::y, and BALL::TVector3< T >::z.
| bool BALL::TLine3< T >::isValid | ( | ) | const [inline] |
Test whether instance is valid. Always returns true.
| void BALL::TLine3< T >::normalize | ( | ) | [inline] |
Normalize the vector component. The vector is scaled with its length:
.
| DivisionByZero | if the length of the vector is 0 |
References BALL::TLine3< T >::d.
| bool BALL::TLine3< T >::operator!= | ( | const TLine3< T > & | line | ) | const [inline] |
Inequality operator.
References BALL::TLine3< T >::d, and BALL::TLine3< T >::p.
| TLine3& BALL::TLine3< T >::operator= | ( | const TLine3< T > & | line | ) | [inline] |
Assignment operator. Assign the components from another instance of line.
| line | the vector to assign from |
References BALL::TLine3< T >::d, and BALL::TLine3< T >::p.
| bool BALL::TLine3< T >::operator== | ( | const TLine3< T > & | line | ) | const [inline] |
Equality operator.
References BALL::TLine3< T >::d, and BALL::TLine3< T >::p.
| void BALL::TLine3< T >::set | ( | const TVector3< T > & | point, | |
| const TVector3< T > & | vector, | |||
| Form | form = FORM__PARAMETER | |||
| ) | [inline] |
Assign from one point and a vector or from two points, depending on form.
| point | assigned to p | |
| vector | assigned to d | |
| form | assigns form of parameter |
References BALL::TLine3< T >::d, BALL::TLine3< T >::FORM__PARAMETER, and BALL::TLine3< T >::p.
| void BALL::TLine3< T >::set | ( | const TLine3< T > & | line | ) | [inline] |
Assign from another instance of TLine3.
| line | the TLine3 object to assign from |
References BALL::TLine3< T >::d, and BALL::TLine3< T >::p.
| void BALL::TLine3< T >::swap | ( | TLine3< T > & | line | ) | [inline] |
Swap the contents of two instances of lines.
| line | the TLine3 to swap contents with |
References BALL::TLine3< T >::d, and BALL::TLine3< T >::p.
| TVector3<T> BALL::TLine3< T >::d |
Vector Component.
Referenced by BALL::TLine3< T >::clear(), BALL::TLine3< T >::dump(), BALL::TLine3< T >::get(), BALL::GetAngle(), BALL::GetIntersection(), BALL::TPlane3< T >::has(), BALL::TLine3< T >::has(), BALL::isOrthogonal(), BALL::isParallel(), BALL::TLine3< T >::normalize(), BALL::TLine3< T >::operator!=(), BALL::TLine3< T >::operator=(), BALL::TLine3< T >::operator==(), BALL::operator>>(), BALL::TLine3< T >::set(), and BALL::TLine3< T >::swap().
| TVector3<T> BALL::TLine3< T >::p |
Point Component.
Referenced by BALL::TLine3< T >::clear(), BALL::TLine3< T >::dump(), BALL::TLine3< T >::get(), BALL::GetIntersection(), BALL::TPlane3< T >::has(), BALL::TLine3< T >::has(), BALL::TLine3< T >::operator!=(), BALL::TLine3< T >::operator=(), BALL::TLine3< T >::operator==(), BALL::operator>>(), BALL::TLine3< T >::set(), and BALL::TLine3< T >::swap().