#include <Physics_Shape.h>
Inherits DigitalSpaces::DIObjectBase.
These are created through DIPhysicsWorld::CreateShape To set the type of shape, call DIPhysicsBase::BeginSetup with the type of shape you want. Calling DIPhysicsBase::BeginSetup with no paramaters will not create a valid shape.
Supported shape types should include, and include the properties of:
All shapes should also support:
Any implementation may provide more, but these are the minimum expected types.
Public Member Functions | |
| void | SetPosition (in_Vector3f *vecPosition) |
| Set the position of the shape. | |
| void | SetOrientation (in_Quaternionf *quatRot) |
| Set the orientation of the shape. | |
| void | SetGroup (unsigned char cGroup) |
| Set the collision group the shape is part of. | |
| void | AddIndex (unsigned uIndex) |
| Add an index to a mesh shape. | |
| void | AddVertex (in_Vector3f *vecVertex) |
| Add a vertex to a mesh shape. | |
| void | GetPosition (out_Vector3f *vecPos) |
| Retreive the current position of the shape. | |
| void | GetOrientation (out_Quaternionf *quatRot) |
| Retreive the current orientation of the shape. | |
| unsigned char | GetGroup () |
| Returns the current collision group, as set by SetGroup. | |
| DIPhysicsBody * | GetBody () |
| Return the body the shape is attached to. | |
| const char * | GetType () |
| Returns the sub-type of shape, as set via DIPhysicsBase::BeginSetup(const char*). | |
| void DigitalSpaces::DIPhysicsShape::SetPosition | ( | in_Vector3f * | vecPosition | ) |
Set the position of the shape.
This is relative to its containing body, or in world co-ordinates if not connected to a body.
| vecPosition | Vector containing the new shape position. |
| void DigitalSpaces::DIPhysicsShape::SetOrientation | ( | in_Quaternionf * | quatRot | ) |
Set the orientation of the shape.
This is relative to its containing body, or in world co-ordinates if not connected to a body.
| quatRot | Quaternion containing the new shape orientation. |
| void DigitalSpaces::DIPhysicsShape::SetGroup | ( | unsigned char | cGroup | ) |
Set the collision group the shape is part of.
Using a collision group is a way of simply discarding collisions between shapes. By default, if the two intersecting shapes are members of the same group, they will not create a collision.
| cGroup | Value from 0 to 31. |
| void DigitalSpaces::DIPhysicsShape::AddIndex | ( | unsigned | uIndex | ) |
Add an index to a mesh shape.
This is only applicable to a mesh type shape, and should only be called between BeginSetup and EndSetup. Calling at any other time should have no effect.
| void DigitalSpaces::DIPhysicsShape::AddVertex | ( | in_Vector3f * | vecVertex | ) |
Add a vertex to a mesh shape.
This is only applicable to a mesh type shape, and should only be called between BeginSetup and EndSetup. Calling at any other time should have no effect.
| vecVertex | Position in space relative to the shapes position/orientation, as set by SetPosition and SetOrientation. |
| void DigitalSpaces::DIPhysicsShape::GetPosition | ( | out_Vector3f * | vecPos | ) |
Retreive the current position of the shape.
This is relative to its containing body, or in world co-ordinates if not connected to a body.
| [out] | vecPos | Vector to be filled with the current shape position. |
| void DigitalSpaces::DIPhysicsShape::GetOrientation | ( | out_Quaternionf * | quatRot | ) |
Retreive the current orientation of the shape.
This is relative to its containing body, or in world co-ordinates if not connected to a body.
| [out] | quatRot | Quaternion to be filled with the current shape orientation. |
| unsigned char DigitalSpaces::DIPhysicsShape::GetGroup | ( | ) |
Returns the current collision group, as set by SetGroup.
| DIPhysicsBody* DigitalSpaces::DIPhysicsShape::GetBody | ( | ) |
Return the body the shape is attached to.
| const char* DigitalSpaces::DIPhysicsShape::GetType | ( | ) |
Returns the sub-type of shape, as set via DIPhysicsBase::BeginSetup(const char*).
1.5.6