Public Member Functions | |
b2ShapeDef () | |
The constructor sets the default shape definition values. | |
Public Attributes | |
b2ShapeType | type |
Holds the shape type for down-casting. | |
void * | userData |
Use this to store application specify shape data. | |
float32 | friction |
The shape's friction coefficient, usually in the range [0,1]. | |
float32 | restitution |
The shape's restitution (elasticity) usually in the range [0,1]. | |
float32 | density |
The shape's density, usually in kg/m^2. | |
uint16 | categoryBits |
The collision category bits. Normally you would just set one bit. | |
uint16 | maskBits |
The collision mask bits. | |
int16 | groupIndex |
Collision groups allow a certain group of objects to never collide (negative) or always collide (positive). | |
bool | isSensor |
A sensor shape collects contact information but never generates a collision response. |
This class defines an abstract shape definition. You can reuse shape definitions safely.
uint16 b2ShapeDef::maskBits |
The collision mask bits.
This states the categories that this shape would accept for collision.
int16 b2ShapeDef::groupIndex |
Collision groups allow a certain group of objects to never collide (negative) or always collide (positive).
Zero means no collision group. Non-zero group filtering always wins against the mask bits.
bool b2ShapeDef::isSensor |
A sensor shape collects contact information but never generates a collision response.