#include <Physics.h>
Inherits DigitalSpaces::DIObjectBase.
This allows testing against a DIPhysicsWorld to determine the first Shape collided with. This does not happen as part of the normal simulation collision detection. Provided by DIPhysics::CreateRay
Public Member Functions | |
| void | SetRayPosition (in_Vector3f *position) |
| Set the position the ray test is performed from. | |
| void | SetRayDirection (in_Vector3f *direction) |
| Set the direction the ray test is performed in. | |
| void | SetRayLength (float length) |
| Set the length (distance) of the ray test. | |
| void | GetRayPosition (out_Vector3f *position) |
| Retrieve the position the ray test is performed from. | |
| void | GetRayDirection (out_Vector3f *direction) |
| Retrieve the direction the ray test is performed along. | |
| float | GetRayLength () |
| Retreive the maximum distance the ray test detects. | |
| bool | TestAgainstWorld (const char *worldName) |
| Test the ray against a physics world. | |
| bool | TestAgainstWorld (DIPhysicsWorld *world) |
| Test the ray against a physics world. | |
| DIPhysicsShape * | GetShapeFromLastTest () |
| Return the shape that was collided with during the last successful call to TestAgainstWorld. | |
| float | GetDistanceFromLastTest () |
| Returns the distance of the collision during the last successul call to TestAgainstWorld. | |
| void | GetPositionFromLastTest (out_Vector3f *position) |
| Retreives the position of the collision during the last successul call to TestAgainstWorld. | |
| void | GetNormalFromLastTest (out_Vector3f *normal) |
| Retreives the normal of the surface collided with during the last successul call to TestAgainstWorld. | |
| void DigitalSpaces::DIPhysicsRay::SetRayPosition | ( | in_Vector3f * | position | ) |
Set the position the ray test is performed from.
| position | Position the ray is to test from, in world coordinates. |
| void DigitalSpaces::DIPhysicsRay::SetRayDirection | ( | in_Vector3f * | direction | ) |
Set the direction the ray test is performed in.
| direction | Direction to perform the ray test along. This is in world coordinates. |
| void DigitalSpaces::DIPhysicsRay::SetRayLength | ( | float | length | ) |
Set the length (distance) of the ray test.
| length | Maximum distance to test for ray testing. In world coordinates (no scaling). |
| void DigitalSpaces::DIPhysicsRay::GetRayPosition | ( | out_Vector3f * | position | ) |
Retrieve the position the ray test is performed from.
| [out] | position | Position the ray is tested from, in world coordinates. |
| void DigitalSpaces::DIPhysicsRay::GetRayDirection | ( | out_Vector3f * | direction | ) |
Retrieve the direction the ray test is performed along.
| [out] | direction | The direction the ray test is performed along, in world coordinates. |
| float DigitalSpaces::DIPhysicsRay::GetRayLength | ( | ) |
Retreive the maximum distance the ray test detects.
| bool DigitalSpaces::DIPhysicsRay::TestAgainstWorld | ( | const char * | worldName | ) |
Test the ray against a physics world.
| worldName | The name of the world to test against. |
| bool DigitalSpaces::DIPhysicsRay::TestAgainstWorld | ( | DIPhysicsWorld * | world | ) |
Test the ray against a physics world.
| world | The interface of the world to test against. |
| DIPhysicsShape* DigitalSpaces::DIPhysicsRay::GetShapeFromLastTest | ( | ) |
Return the shape that was collided with during the last successful call to TestAgainstWorld.
| float DigitalSpaces::DIPhysicsRay::GetDistanceFromLastTest | ( | ) |
Returns the distance of the collision during the last successul call to TestAgainstWorld.
| void DigitalSpaces::DIPhysicsRay::GetPositionFromLastTest | ( | out_Vector3f * | position | ) |
Retreives the position of the collision during the last successul call to TestAgainstWorld.
| [out] | position | The position the collision occured at. If no previous successful attempt has occured, the results are undefined. NOTE: If a successful attempt occurs, followed by an unsucessful attempt, the result from the previous sucessful attempt may be returned. |
| void DigitalSpaces::DIPhysicsRay::GetNormalFromLastTest | ( | out_Vector3f * | normal | ) |
Retreives the normal of the surface collided with during the last successul call to TestAgainstWorld.
| [out] | normal | The normal of the surface the collision occured at. If no previous successful attempt has occured, the results are undefined. NOTE: If a successful attempt occurs, followed by an unsucessful attempt, the result from the previous sucessful attempt may be returned. |
1.5.6