#include <FCDPhysicsShape.h>
Inheritance diagram for FCDPhysicsShape:
Public Member Functions | |
FCDPhysicsShape (FCDocument *document) | |
Constructor: do not use directly. | |
virtual | ~FCDPhysicsShape () |
Destructor. | |
float | GetMass () const |
Retrieves the mass of this shape. | |
const float * | GetMassPointer () const |
void | SetMass (float mass) |
Sets the mass of this shape. | |
bool | IsDensityMoreAccurate () const |
Retrieves whether density of this shape is more accurate than mass. | |
void | SetDensityMoreAccurate (bool value) |
[INTERNAL] Set 'DensityMoreAccurate'. | |
float | GetDensity () const |
Retrieves the density of this shape. | |
const float * | GetDensityPointer () const |
void | SetDensity (float density) |
Sets the density of this shape. | |
bool | IsHollow () const |
Retrives whether this shape is hollow. | |
void | SetHollow (bool _hollow) |
Sets whether this shape is hollow. | |
bool | IsAnalyticalGeometry () const |
Retrieves whether this shape is an analyical geometry such as a box, plane, sphere, cylinder, tapered cylinder, capsule, or tapered capsule. | |
FCDPhysicsAnalyticalGeometry * | GetAnalyticalGeometry () |
Gets the analytic geometry. | |
const FCDPhysicsAnalyticalGeometry * | GetAnalyticalGeometry () const |
See above. | |
void | SetAnalyticalGeometry (FCDPhysicsAnalyticalGeometry *aGeom) |
[INTERNAL] Set the analytical geometry. | |
bool | IsGeometryInstance () const |
Retrieves whether this shape is a geometry instance such as from mesh, convex mesh, or spline. | |
FCDGeometryInstance * | GetGeometryInstance () |
Gets the geometry instance. | |
const FCDGeometryInstance * | GetGeometryInstance () const |
See above. | |
void | SetGeometryInstance (FCDGeometryInstance *instance) |
[INTERNAL] Set the geometry instance. | |
FCDGeometryInstance * | CreateGeometryInstance (FCDGeometry *geom, bool createConvexMesh=false) |
Creates a geometry instance for this shape. | |
FCDPhysicsAnalyticalGeometry * | CreateAnalyticalGeometry (FCDPhysicsAnalyticalGeometry::GeomType type) |
Creates an analytical geometry for this shape. | |
FCDTransformContainer & | GetTransforms () |
Retrieves the transforms for this shape. | |
const FCDTransformContainer & | GetTransforms () const |
See above. | |
FCDTransform * | AddTransform (FCDTransform::Type type, size_t index=(size_t)-1) |
Adds a transform for this shape. | |
FCDPhysicsMaterial * | GetPhysicsMaterial () |
Retrieves the physics material for this shape. | |
const FCDPhysicsMaterial * | GetPhysicsMaterial () const |
See above. | |
void | SetPhysicsMaterial (FCDPhysicsMaterial *physicsMaterial) |
Sets the physics material for this shape. | |
FCDPhysicsMaterial * | AddOwnPhysicsMaterial () |
Adds a physics material for this shape. | |
FCDPhysicsShape * | Clone (FCDPhysicsShape *clone=NULL) const |
Copies the shape into a clone. | |
float | CalculateVolume () const |
Calculates the volume of the shape. | |
void | SetInstanceMaterial (FCDEntityInstance *instance) |
[INTERNAL] Set the material instance. | |
FCDEntityInstance * | GetInstanceMaterial () |
[INTERNAL] Retrieve the material instance. | |
bool | OwnsPhysicsMaterial () |
[INTERNAL] Determin if it owns the material. |
A shape describes the boundary used for collision detection within a rigid body. It belongs to a single rigid body and cannot be referenced from other elements.
|
Constructor: do not use directly. Create new shapes using the FCDPhysicsRigidBody::AddPhysicsShape function.
|
|
Adds a physics material for this shape. This shape is responsible for releasing the physics material.
|
|
Adds a transform for this shape.
|
|
Calculates the volume of the shape. Currently it is calculating a simple bounding box volume if IsGeometryInstance it true, and it is calculating the exact volume if IsAnalyticalGeometry is true. Note that a volume of 1.0f is returned if it is a spline or plane.
|
|
Copies the shape into a clone.
|
|
Creates an analytical geometry for this shape. If IsGeometryInstance returned true before this call, it will return false afterwards as the geometry instance is released.
|
|
Creates a geometry instance for this shape. If IsAnalyticalGeometry returned true before this call, it will return false afterwards as the analytical geometry is released.
|
|
Gets the analytic geometry. NULL is returned if IsAnalyticalGeometry returns false.
|
|
Retrieves the density of this shape.
|
|
Gets the geometry instance. NULL is returned if IsGeometryInstance returns false.
|
|
[INTERNAL] Retrieve the material instance.
|
|
Retrieves the mass of this shape.
|
|
Retrieves the physics material for this shape.
|
|
Retrieves the transforms for this shape.
|
|
Retrieves whether this shape is an analyical geometry such as a box, plane, sphere, cylinder, tapered cylinder, capsule, or tapered capsule.
|
|
Retrieves whether density of this shape is more accurate than mass. It is more accurate if mass is not defined. In that case mass is calculated using approximations when it is non-analytic.
|
|
Retrieves whether this shape is a geometry instance such as from mesh, convex mesh, or spline.
|
|
Retrives whether this shape is hollow.
|
|
[INTERNAL] Determin if it owns the material.
|
|
[INTERNAL] Set the analytical geometry.
|
|
Sets the density of this shape.
|
|
[INTERNAL] Set 'DensityMoreAccurate'. value Value to be set. |
|
[INTERNAL] Set the geometry instance.
|
|
Sets whether this shape is hollow.
|
|
[INTERNAL] Set the material instance. The new material instance. |
|
Sets the mass of this shape.
|
|
Sets the physics material for this shape.
|