VR-Link API Documentation for DIS
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
Dt3dChord Class Reference

A Dt3dChord is a finite line segment in 3-space, represented by its two 3d end points. More...

+ Collaboration diagram for Dt3dChord:

Public Member Functions

 Dt3dChord ()
 default constructor
 Dt3dChord (const Dt3dPoint &endpoint0, const Dt3dPoint &endpoint1)
 define the chord given its end points
 ~Dt3dChord ()
 destructor
 Dt3dChord (const Dt3dChord &orig)
 copy constructor
Dt3dChordoperator= (const Dt3dChord &orig)
 assignment operator
const Dt3dPointendpoint0 () const
const Dt3dPointendpoint1 () const
double directedXComponent () const
double directedYComponent () const
double directedZComponent () const
const Dt3dExtentextent () const
Dt3dPoint computePoint (const double t) const
 Determine the point at parametric value t, where the two end points of the chord assume values of 0 and 1.
bool isCollinear (const Dt3dPoint &p) const
 Determine if given point p is collinear with chord.
bool parallelToXYPlane () const
 Determines if the chord is parallel to the XY-plane.
bool inPlaneZEquals (const double c) const
 Determines if Chord lies on plane z=c.
bool intersectsPlaneZEqualsAtPoint (const double c, double &tvalue) const
 Returns true if the chord intersects plane z=c, and returns a tvalue between 0 and 1.
bool collinearPointLiesWithin (const Dt3dPoint &pt) const
 Determines if pt is collinear with the chord, and lies between end points.

Protected Member Functions

double minZ () const
double maxZ () const
void guaranteeValidConstruction ()
 Ensure sizes are non-negative, no matter what order the points are entered.

Protected Attributes

Dt3dPoint myEndpoint0
Dt3dPoint myEndpoint1
 first endpoint
double myDirectedXComponent
 second endpoint
double myDirectedYComponent
 second endpoint
double myDirectedZComponent
 second endpoint
Dt3dExtent myExtent
 second endpoint

Detailed Description

A Dt3dChord is a finite line segment in 3-space, represented by its two 3d end points.

This class has 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.

Data derived from the two endpoints is the coordinate system aligned, minimal extent (bounding volume), and additional sizes of that volume. Note, the lengths are directed lengths, which may be negative.

Constructor & Destructor Documentation

Dt3dChord::Dt3dChord ( )

default constructor

Dt3dChord::Dt3dChord ( const Dt3dPoint endpoint0,
const Dt3dPoint endpoint1 
)

define the chord given its end points

Dt3dChord::~Dt3dChord ( )

destructor

Dt3dChord::Dt3dChord ( const Dt3dChord orig)

copy constructor

Member Function Documentation

bool Dt3dChord::collinearPointLiesWithin ( const Dt3dPoint pt) const

Determines if pt is collinear with the chord, and lies between end points.

Dt3dPoint Dt3dChord::computePoint ( const double  t) const

Determine the point at parametric value t, where the two end points of the chord assume values of 0 and 1.

void Dt3dChord::guaranteeValidConstruction ( )
protected

Ensure sizes are non-negative, no matter what order the points are entered.

This function should never be made virtual, as it is called from constructors.

bool Dt3dChord::inPlaneZEquals ( const double  c) const

Determines if Chord lies on plane z=c.

bool Dt3dChord::intersectsPlaneZEqualsAtPoint ( const double  c,
double &  tvalue 
) const

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.

bool Dt3dChord::isCollinear ( const Dt3dPoint p) const

Determine if given point p is collinear with chord.

double Dt3dChord::maxZ ( ) const
protected
Returns
The maximum Z-value along the chord
double Dt3dChord::minZ ( ) const
protected
Returns
The minimum Z-value along the chord
Dt3dChord& Dt3dChord::operator= ( const Dt3dChord orig)

assignment operator

bool Dt3dChord::parallelToXYPlane ( ) const

Determines if the chord is parallel to the XY-plane.

Member Data Documentation

double Dt3dChord::myDirectedXComponent
protected

second endpoint

Data derived from endpoints. Should never be set by user.

double Dt3dChord::myDirectedYComponent
protected

second endpoint

Data derived from endpoints. Should never be set by user.

double Dt3dChord::myDirectedZComponent
protected

second endpoint

Data derived from endpoints. Should never be set by user.

Dt3dPoint Dt3dChord::myEndpoint0
protected
Dt3dPoint Dt3dChord::myEndpoint1
protected

first endpoint

Dt3dExtent Dt3dChord::myExtent
protected

second endpoint

Data derived from endpoints. Should never be set by user.


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

Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)