Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents an abstract 3D geometry within a physics simulation. More...
#include <omPhysicsShape.h>
Public Member Functions | |
virtual | ~PhysicsShape () |
Destroy this physics shape and all resources it has. More... | |
virtual void | getMassInfo (Float &mass, Vector3f &massCenter, Matrix3f &inertia) const =0 |
Get the mass distribution for this shape in its local space in the output parameters. More... | |
virtual Float | getVolume () const =0 |
Return the volume of this shape in distance units cubed (m^3) in its coordinate frame. More... | |
const AABB3f & | getBoundingBox () const |
Return a const reference to the local bounding box of this shape in its coordinate frame. More... | |
ShapeFlags & | getFlags () |
Return a reference to an object that contains boolean parameters of the shape. More... | |
const ShapeFlags & | getFlags () const |
Return an object that contains boolean parameters of the shape. More... | |
void | setFlags (const ShapeFlags &newFlags) |
Set an object that contains boolean parameters of the shape. More... | |
Bool | flagIsSet (ShapeFlags::Flag flag) const |
Return whether or not the specified boolan flag is set for this shape. More... | |
Bool | flagsAreSet (const ShapeFlags &otherFlags) const |
Return whether or not all of the specified boolan flags are set for this shape. More... | |
void | setFlag (ShapeFlags::Flag flag, Bool newIsSet=true) |
Set whether or not the specified boolan flag is set for this shape. More... | |
ShapeTypeID | getTypeID () const |
Return an integer identifying the type of this collision shape. More... | |
const ShapeType & | getType () const |
Return an object representing the type of this PhysicsShape. More... | |
Static Public Attributes | |
static const ResourceType | RESOURCE_TYPE |
The resource type for a physics shape. More... | |
Protected Member Functions | |
PhysicsShape (const ShapeType *newType) | |
Create a PhysicsShape object that has the specified subtype. More... | |
void | setBoundingBox (const AABB3f &newBoundingBox) |
Set the local-space bounding box to use for this PhysicsShape. More... | |
A class that represents an abstract 3D geometry within a physics simulation.
|
virtual |
Destroy this physics shape and all resources it has.
|
inlineprotected |
Create a PhysicsShape object that has the specified subtype.
|
pure virtual |
Get the mass distribution for this shape in its local space in the output parameters.
Implemented in om::physics::shapes::CapsuleShape, om::physics::shapes::CylinderShape, om::physics::shapes::BoxShape, om::physics::shapes::MeshShape, om::physics::shapes::SphereShape, and om::physics::shapes::ConvexShape.
|
pure virtual |
Return the volume of this shape in distance units cubed (m^3) in its coordinate frame.
Implemented in om::physics::shapes::CapsuleShape, om::physics::shapes::CylinderShape, om::physics::shapes::BoxShape, om::physics::shapes::MeshShape, om::physics::shapes::SphereShape, and om::physics::shapes::ConvexShape.
|
inline |
Return a const reference to the local bounding box of this shape in its coordinate frame.
|
inline |
Return a reference to an object that contains boolean parameters of the shape.
|
inline |
Return an object that contains boolean parameters of the shape.
|
inline |
Set an object that contains boolean parameters of the shape.
|
inline |
Return whether or not the specified boolan flag is set for this shape.
|
inline |
Return whether or not all of the specified boolan flags are set for this shape.
|
inline |
Set whether or not the specified boolan flag is set for this shape.
|
inline |
Return an integer identifying the type of this collision shape.
|
inline |
Return an object representing the type of this PhysicsShape.
|
inlineprotected |
Set the local-space bounding box to use for this PhysicsShape.
This method should be called by a subclass of the PhysicsShape class in order to assure that the shape has the proper bounding box. If this attribute is not properly set, collision detection will not work properly.
|
static |
The resource type for a physics shape.