b2Shape Class Reference
#include <b2Shape.h>
List of all members.
Detailed Description
A shape is used for collision detection. You can create a shape however you like. Shapes used for simulation in b2World are created automatically when a b2Fixture is created.
Member Enumeration Documentation
- Enumerator:
e_unknown |
|
e_circle |
|
e_polygon |
|
e_typeCount |
|
Constructor & Destructor Documentation
b2Shape::b2Shape |
( |
|
) |
[inline] |
virtual b2Shape::~b2Shape |
( |
|
) |
[inline, virtual] |
Member Function Documentation
virtual void b2Shape::ComputeAABB |
( |
b2AABB * |
aabb, |
|
|
const b2Transform & |
xf | |
|
) |
| | const [pure virtual] |
Given a transform, compute the associated axis aligned bounding box for this shape.
- Parameters:
-
| aabb | returns the axis aligned box. |
| xf | the world transform of the shape. |
Implemented in b2CircleShape, and b2PolygonShape.
virtual void b2Shape::ComputeMass |
( |
b2MassData * |
massData, |
|
|
float32 |
density | |
|
) |
| | const [pure virtual] |
Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin.
- Parameters:
-
| massData | returns the mass data for this shape. |
| density | the density in kilograms per meter squared. |
Implemented in b2CircleShape, and b2PolygonShape.
Get the type of this shape. You can use this to down cast to the concrete shape.
- Returns:
- the shape type.
Cast a ray against this shape.
- Parameters:
-
| output | the ray-cast results. |
| input | the ray-cast input parameters. |
| transform | the transform to be applied to the shape. |
Implemented in b2CircleShape, and b2PolygonShape.
virtual bool b2Shape::TestPoint |
( |
const b2Transform & |
xf, |
|
|
const b2Vec2 & |
p | |
|
) |
| | const [pure virtual] |
Test a point for containment in this shape. This only works for convex shapes.
- Parameters:
-
| xf | the shape world transform. |
| p | a point in world coordinates. |
Implemented in b2CircleShape, and b2PolygonShape.
Member Data Documentation
The documentation for this class was generated from the following file: