Go to the source code of this file.
Defines |
#define | b2CircleShape_SetType(shape, type) b2Shape_SetType(shape, type) |
| Set type.
|
#define | b2CircleShape_GetType(shape) b2Shape_GetType(shape) |
| Get shape type.
|
#define | b2CircleShape_SetRadius(shape, radius) b2Shape_SetRadius(shape, radius) |
| Set shape radius.
|
#define | b2CircleShape_GetRadius(shape) b2Shape_GetRadius(shape) |
| Get shape radius.
|
Functions |
b2CircleShape * | b2CircleShape_Create () |
| Create b2CircleShape.
|
void | b2CircleShape_Destroy (b2CircleShape *shape) |
| Destroy b2Circle shape.
|
b2Shape * | b2CircleShape_Clone (b2CircleShape *shape, b2BlockAllocator *allocator) |
| Clone a b2CircleShape.
|
var | b2CircleShape_TestPoint (b2CircleShape *shape, const b2Transform *transform, const VECTOR *p) |
| Test if a point is contained inside a shape.
|
var | b2CircleShape_RayCast (b2CircleShape *shape, b2RayCastOutput *output, const b2RayCastInput *input, const b2Transform *transform) |
| Perform a raycast test with a b2CircleShape.
|
void | b2CircleShape_ComputeAABB (b2CircleShape *shape, b2AABB *aabb, const b2Transform *transform) |
| Compute shape AABB.
|
void | b2CircleShape_ComputeMass (b2CircleShape *shape, b2MassData *massData, var density) |
| Compute shape mass.
|
var | b2CircleShape_GetSupport (b2CircleShape *shape, const VECTOR *d) |
| Get the supporting vertex index in the given direction.
|
void | b2CircleShape_GetSupportVertex (b2CircleShape *shape, const VECTOR *d, VECTOR *outSupport) |
| Get the supporting vertex in the given direction.
|
var | b2CircleShape_GetVertexCount (b2CircleShape *shape) |
| Get the vertex count.
|
void | b2CircleShape_GetVertex (b2CircleShape *shape, var index, VECTOR *outVertex) |
| Get a vertex by index. Used by b2Distance.
|
void | b2CircleShape_SetPosition (b2CircleShape *shape, const VECTOR *position) |
| Set Position.
|
void | b2CircleShape_GetPosition (b2CircleShape *shape, VECTOR *outPosition) |
| Get Position.
|
Define Documentation
#define b2CircleShape_GetRadius |
( |
|
shape | ) |
b2Shape_GetRadius(shape) |
Get shape radius.
- Parameters:
-
- Returns:
- The shape radius.
Definition at line 125 of file b2CircleShape.h.
#define b2CircleShape_GetType |
( |
|
shape | ) |
b2Shape_GetType(shape) |
Get shape type.
- Parameters:
-
- Returns:
- The shape type
- E_UNKNOWN
- E_CIRCLE
- E_POLYGON
- E_TYPECOUNT
Definition at line 113 of file b2CircleShape.h.
#define b2CircleShape_SetRadius |
( |
|
shape, |
|
|
|
radius |
|
) |
| b2Shape_SetRadius(shape, radius) |
Set shape radius.
- Parameters:
-
shape | The shape. |
radius | The new radius. |
Definition at line 119 of file b2CircleShape.h.
#define b2CircleShape_SetType |
( |
|
shape, |
|
|
|
type |
|
) |
| b2Shape_SetType(shape, type) |
Set type.
Set the b2Shape type.
- Parameters:
-
shape | The shape. |
type | The new type. |
Definition at line 103 of file b2CircleShape.h.
Function Documentation
Compute shape AABB.
- See also:
- b2Shape_ComputeAABB
- Parameters:
-
shape | The b2Shape instance. |
aabb | returns the axis aligned box. |
xf | the world transform of the shape. |
Compute shape mass.
The inertia tensor is computed about the local origin.
- See also:
- b2Shape_ComputeMass
- Parameters:
-
shape | The b2Shape instance. |
massData | returns the mass data for this shape. |
density | the density in kilograms per meter squared. |
Destroy b2Circle shape.
- Parameters:
-
shape | The shape instance to destroy. The instance becomes invalid. |
void b2CircleShape_GetPosition |
( |
b2CircleShape * |
shape, |
|
|
VECTOR * |
outPosition |
|
) |
| |
Get Position.
- Parameters:
-
shape | The shape instance. |
outPosition | A pre-initialized vector to receive the position. |
var b2CircleShape_GetSupport |
( |
b2CircleShape * |
shape, |
|
|
const VECTOR * |
d |
|
) |
| |
Get the supporting vertex index in the given direction.
- Parameters:
-
shape | The b2Shape instance. |
d | The direction vector. |
- Returns:
- The supporting vertex index.
void b2CircleShape_GetSupportVertex |
( |
b2CircleShape * |
shape, |
|
|
const VECTOR * |
d, |
|
|
VECTOR * |
outSupport |
|
) |
| |
Get the supporting vertex in the given direction.
- Parameters:
-
shape | The b2Shape instance. |
d | The direction vector. |
outSupport | A pre-initialized VECTOR to receive the support vertex. |
void b2CircleShape_GetVertex |
( |
b2CircleShape * |
shape, |
|
|
var |
index, |
|
|
VECTOR * |
outVertex |
|
) |
| |
Get a vertex by index. Used by b2Distance.
- Parameters:
-
shape | The b2Shape instance. |
index | The vertex index. |
outVertex | A pre-initialized VECTOR to receive the vertex position. |
Get the vertex count.
- Parameters:
-
- Returns:
- The vertex count
Perform a raycast test with a b2CircleShape.
Implement b2Shape.
- Parameters:
-
shape | The shape instance. |
output | A pre initialized b2RayCastOutput to receive the result. |
input | The raycast input parameters. |
- Returns:
- 1 if the raycast succeded, 0 otherwise.
void b2CircleShape_SetPosition |
( |
b2CircleShape * |
shape, |
|
|
const VECTOR * |
position |
|
) |
| |
Set Position.
- Parameters:
-
shape | The b2Shape instance. |
position | The desired position as a vector. |
Test if a point is contained inside a shape.
Implement b2Shape.
- Parameters:
-
shape | The shape instance. |
transform | The b2Transform to be used. |
p | The point to be tested. |
- Returns:
- 1 if the point is contained in the shape, 0 otherwise.