![]() |
VR-Forces Developer's Guide
|
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Deprecation notes for DtChord: DtChord was moved from terrainToolkit/geometry/chord.* to vrlink/matrix and renamed Dt3dChord for consistency with other geometric objects.
lengthOnX/Y/Z functions were renamed directedX/Y/ZComponent, as the values returned were not pure, unsigned lengths, but directed values. Examination of usage indicted that the signage was important, so functionality was maintained, but the name changed for clarity.
This class (will) have no virtual functions to avoid virtual table pointers for performance reasons. You can subclass, but do not add member data in derived classes or you will develop a memory leak.
Public Member Functions | |
| DtChord () | |
| DtChord (const DtPoint &endpoint0, const DtPoint &endpoint1) | |
| virtual | ~DtChord () |
| DtChord (const DtChord &orig) | |
| DtChord & | operator= (const DtChord &orig) |
| const DtPoint & | endpoint0 () const |
| const DtPoint & | endpoint1 () const |
| double | directedXComponent () const |
| double | directedYComponent () const |
| double | directedZComponent () const |
| const DtExtent & | extent () const |
| virtual DtPoint | computePoint (const double t) const |
| virtual bool | isCollinear (const DtPoint &p) const |
| virtual bool | parallelToXYPlane () const |
| virtual bool | inPlaneZEquals (const double c) const |
| virtual bool | intersectsPlaneZEqualsAtPoint (const double c, double &tvalue) const |
| virtual bool | collinearPointLiesWithin (const DtPoint &pt) const |
| double | length () const |
| double | lengthSquared () const |
| double | lengthOnX () const |
| double | lengthOnY () const |
| double | lengthOnZ () const |
| virtual void | dump (void) const |
Protected Member Functions | |
| virtual double | minZ () const |
| virtual double | maxZ () const |
Private Attributes | |
| DtPoint | myFirstEndpoint |
| DtPoint | mySecondEndpoint |
| double | myA |
| double | myB |
| double | myC |
| DtExtent | myExtent |
| DtChord::DtChord | ( | ) |
default constructor
define the chord given its end points
|
virtual |
destructor
| DtChord::DtChord | ( | const DtChord & | orig | ) |
copy constructor
Determine the point at parametric value t, where the two end points of the chord assume values of 0 and 1.
Determine if given point p is collinear with chord.
|
virtual |
Determines if the chord is parallel to the XY-plane.
Determines if Chord lies on plane z=c.
|
virtual |
Returns true if the chord intersects plane z=c, and returns a tvalue between 0 and 1. When the entire chord lies on plane z=c, returns true and tvalue = 2.
Determines if pt is collinear with the chord, and lies between end points.
| double DtChord::length | ( | ) | const |
| double DtChord::lengthSquared | ( | ) | const |
|
protectedvirtual |
|
protectedvirtual |
|
inline |
References myA.
|
inline |
References myB.
|
inline |
References myC.
|
virtual |
|
private |
Referenced by endpoint0().
|
private |
Referenced by endpoint1().
|
private |
Data derived from endpoints. Should never be set by user.
Referenced by directedXComponent(), and lengthOnX().
|
private |
Data derived from endpoints. Should never be set by user.
Referenced by directedYComponent(), and lengthOnY().
|
private |
Data derived from endpoints. Should never be set by user.
Referenced by directedZComponent(), and lengthOnZ().
|
private |
Data derived from endpoints. Should never be set by user.
Referenced by extent().