|
VR-Engage
2.2
|
This class provides a representation of a ladder, including its base, top, orientation, and entry/exit points. It processes navigation ladder data to determine the locations where a human entity can mount or dismount the ladder, as well as the ladder's physical characteristics like pitch, heading and length.
#include <ladder.h>
Public Member Functions | |
| DtLadder () | |
| virtual | ~DtLadder () |
| DtLadder (const DtLadder &orig) | |
| DtLadder & | operator= (const DtLadder &orig) |
| virtual bool | operator== (const DtLadder &other) |
| virtual void | init (const DtNavLadder &navLadder, DtPhysicalWorld *physicalWorld) |
| virtual DtVector | base () const |
| virtual DtVector | baseEntryExit () const |
| virtual DtVector | top () const |
| virtual DtVector | topEntryExit () const |
| virtual double | heading () const |
| virtual double | pitch () const |
| virtual double | length () const |
| virtual DtDcm | localOrientation () const |
Protected Member Functions | |
| virtual void | calculateBaseTopAndOrientation () |
Protected Attributes | |
| std::vector< DtVector > | myLocalPointsOnLadder |
| std::vector< DtVector > | myLocalLadderEntryExitPoints |
| int | myBaseIndex |
| int | myTopIndex |
| double | myHeading |
| double | myPitch |
| double | myLength |
| DtDcm | myLocalOrientation |
| DtPhysicalWorld * | myPhysicalWorld |
| makVre::DtLadder::DtLadder | ( | ) |
Default constructor.
Creates a new ladder representation with default values. Must be initialized with init() before use.
Referenced by DtLadder(), operator=(), and operator==().
|
virtual |
Virtual destructor.
Cleans up resources used by the ladder representation.
| makVre::DtLadder::DtLadder | ( | const DtLadder & | orig | ) |
Copy constructor.
| orig | The source ladder to copy from |
Creates a new ladder representation as a copy of the provided original.
References DtLadder().
Assignment operator.
| orig | The source ladder to copy from |
Assigns the contents of the provided ladder to this one.
References DtLadder().
|
virtual |
Equivalence operator.
| other | The ladder to compare with |
Compares this ladder with another to determine if they are equivalent.
References DtLadder().
|
virtual |
Initializes the ladder from navigation data.
| navLadder | The navigation ladder data to initialize from |
| physicalWorld | Pointer to the physical world for terrain queries |
Initializes this ladder representation based on the provided navigation ladder data and physical world. This calculates the ladder's base, top, orientation, and entry/exit points.
|
virtual |
Gets the ladder base position.
Returns the position where the bottom of the ladder contacts the ground.
|
virtual |
Gets the ladder base entry/exit point.
Returns the position where an entity would stand to mount or dismount the ladder at its base.
|
virtual |
Gets the ladder top position.
Returns the position of the top end of the ladder.
|
virtual |
Gets the ladder top entry/exit point.
Returns the position where an entity would stand to mount or dismount the ladder at its top.
|
virtual |
Gets the ladder heading.
Returns the heading angle of the ladder in radians. This represents the direction the ladder is facing when viewed from above.
|
virtual |
Gets the ladder pitch.
Returns the pitch angle of the ladder in radians. This represents the steepness of the ladder relative to the ground.
|
virtual |
Gets the ladder length.
Returns the total length of the ladder from base to top.
|
virtual |
Gets the ladder orientation matrix.
Returns a direction cosine matrix representing the ladder's orientation in local coordinates.
|
protectedvirtual |
Calculates ladder properties from point data.
Internal method that calculates the ladder's base, top, heading, pitch, length, and orientation based on the ladder points.
|
protected |
Ordered list of points on the ladder.
Stores points along the ladder in local (database) coordinates.
|
protected |
Ordered list of entry/exit points.
Stores points near the ladder on the terrain in local coordinates, where an entity would stand to mount or dismount the ladder. Has one-to-one correspondence with myLocalPointsOnLadder.
|
protected |
Index of the base point in the points array.
Stores the index of the base point within myLocalPointsOnLadder.
|
protected |
Index of the top point in the points array.
Stores the index of the top point within myLocalPointsOnLadder.
|
protected |
The ladder heading in radians.
Stores the heading angle of the ladder in radians.
|
protected |
The ladder pitch in radians.
Stores the pitch angle of the ladder in radians.
|
protected |
The ladder length in meters.
Stores the total length of the ladder from base to top.
|
protected |
The ladder orientation matrix.
Stores a direction cosine matrix representing the ladder's orientation in local coordinates.
|
protected |
Pointer to the physical world.
Stores a pointer to the physical world used for terrain queries.