![]() |
VR-Forces Developer's Guide
|
Handles ground-plane collision detection for projectiles.
Public Member Functions | |
| DtCollisionSystem () | |
| virtual | ~DtCollisionSystem () |
| virtual void | setCoordinateFrame (const DtCoordinateFrame &frame) |
| virtual const DtCoordinateFrame & | coordinateFrame () const |
| virtual void | setGroundLevel (double level) |
| virtual double | groundLevel () const |
| virtual bool | checkProjectileCollision (const DtProjectileData &projectile, DtImpactResult &result) |
| virtual bool | raycastSegment (const dvec3 &start, const dvec3 &end, DtImpactResult &result) |
| virtual void | checkAllCollisions (const std::vector< DtProjectileData * > &projectiles, std::vector< DtImpactResult > &results) |
Protected Attributes | |
| DtCoordinateFrame | myCoordinateFrame |
| double | myGroundLevel |
| makVrv::DtCollisionSystem::DtCollisionSystem | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
virtual |
Sets the coordinate frame used for collision detection.
| frame | The coordinate frame defining spatial orientation. |
|
virtual |
Returns the current coordinate frame.
|
virtual |
Sets the ground level as a distance from the origin along the up axis.
| level | Distance from origin (default 0.0). |
|
virtual |
Returns the ground level.
|
virtual |
Tests a single projectile for a ground collision.
| projectile | Projectile to test. |
| result | Receives the collision result. |
|
virtual |
Tests a ray segment for a ground collision.
| start | Start of the segment in world space. |
| end | End of the segment in world space. |
| result | Receives the collision result. |
|
virtual |
Tests all given projectiles for collisions.
| projectiles | Array of projectile data to test. |
| results | Receives one result per input projectile. |
|
protected |
Reference frame for collision detection.
|
protected |
Ground plane distance from origin along the up axis.