#include <PhysicsCollisionShape.h>
Classes | |
struct | Definition |
struct | HeightfieldData |
struct | MeshData |
Public Types | |
enum | Type { SHAPE_NONE, SHAPE_BOX, SHAPE_SPHERE, SHAPE_CAPSULE, SHAPE_MESH, SHAPE_HEIGHTFIELD } |
Public Member Functions | |
PhysicsCollisionShape::Type | getType () const |
btCollisionShape * | getShape () const |
Static Public Member Functions | |
static PhysicsCollisionShape::Definition | box () |
static PhysicsCollisionShape::Definition | box (const Vector3 &extents, const Vector3 ¢er=Vector3::zero(), bool absolute=false) |
static PhysicsCollisionShape::Definition | sphere () |
static PhysicsCollisionShape::Definition | sphere (float radius, const Vector3 ¢er=Vector3::zero(), bool absolute=false) |
static PhysicsCollisionShape::Definition | capsule () |
static PhysicsCollisionShape::Definition | capsule (float radius, float height, const Vector3 ¢er=Vector3::zero(), bool absolute=false) |
static PhysicsCollisionShape::Definition | heightfield () |
static PhysicsCollisionShape::Definition | heightfield (HeightField *heightfield) |
static PhysicsCollisionShape::Definition | mesh (Mesh *mesh) |
Defines the physics collision shape class that all supported shapes derive from.
Defines the supported collision shape types.
static PhysicsCollisionShape::Definition gameplay::PhysicsCollisionShape::box | ( | ) | [static] |
Defines a box shape, using the bounding volume of the node it is attached to.
static PhysicsCollisionShape::Definition gameplay::PhysicsCollisionShape::box | ( | const Vector3 & | extents, |
const Vector3 & | center = Vector3::zero() , |
||
bool | absolute = false |
||
) | [static] |
Defines a box shape, using the specified shape information and center.
extents | Extents of the box shape along the x, y and z axes. |
center | Center point of the box. |
absolute | True to specify that the given center point is an absolute position. By default the center point is treated as relative to the location of the node that the shape is attached to. |
static PhysicsCollisionShape::Definition gameplay::PhysicsCollisionShape::capsule | ( | ) | [static] |
Defines a capsule shape, using the bounding volume of the node it is attached to.
static PhysicsCollisionShape::Definition gameplay::PhysicsCollisionShape::capsule | ( | float | radius, |
float | height, | ||
const Vector3 & | center = Vector3::zero() , |
||
bool | absolute = false |
||
) | [static] |
Defines a capsule shape, using the specified shape information and center.
radius | Radius of the capsule. |
height | Height of the capsule. |
center | Center point of the capsule. |
absolute | True to specify that the given center point is an absolute position. By default the center point is treated as relative to the location of the node that the shape is attached to. |
btCollisionShape* gameplay::PhysicsCollisionShape::getShape | ( | ) | const [inline] |
Returns the internal bullet physics shape object.
Returns the type of this collision shape.
static PhysicsCollisionShape::Definition gameplay::PhysicsCollisionShape::heightfield | ( | ) | [static] |
Defines a heightfield shape, using the height data of a terrain on the node that is attached to.
This method only results in a valid heightfield collision object when the shape is used to create a collision object on a node that has a Terrain attached to it. If there is no Terrain attached to the node, the collision object creation will fail.
static PhysicsCollisionShape::Definition gameplay::PhysicsCollisionShape::heightfield | ( | HeightField * | heightfield | ) | [static] |
Defines a heightfield shape using the specified array of height values.
The dimensions of the heightfield will be (width, maxHeight, height), where width and height are the dimensions of the passed in height array and maxHeight is the maximum height value in the height array.
Heightfield rigid bodies are always assumed be Y-up (height value on the Y axis) and be centered around the X and Z axes.
The heightfield can be scaled once a PhysicsRigidBody has been created for it, using the PhysicsRigidBody::setLocalScaling method.
heightfield | HeightField object containing the array of height values representing the heightfield. |
static PhysicsCollisionShape::Definition gameplay::PhysicsCollisionShape::mesh | ( | Mesh * | mesh | ) | [static] |
Defines a mesh shape using the specified mesh.
static PhysicsCollisionShape::Definition gameplay::PhysicsCollisionShape::sphere | ( | ) | [static] |
Defines a sphere shape, using the bounding volume of the node it is attached to.
static PhysicsCollisionShape::Definition gameplay::PhysicsCollisionShape::sphere | ( | float | radius, |
const Vector3 & | center = Vector3::zero() , |
||
bool | absolute = false |
||
) | [static] |
Defines a sphere shape, using the specified shape information and center.
radius | Radius of the sphere. |
center | Center point of the sphere. |
absolute | True to specify that the given center point is an absolute position. By default the center point is treated as relative to the location of the node that the shape is attached to. |
HeightfieldData* gameplay::PhysicsCollisionShape::heightfieldData |