b2ShapeDef Struct Reference

A shape definition is used to construct a shape. More...

Inheritance diagram for b2ShapeDef:

b2CircleDef b2PolygonDef

List of all members.

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.


Detailed Description

A shape definition is used to construct a shape.

This class defines an abstract shape definition. You can reuse shape definitions safely.


Member Data Documentation

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.


The documentation for this struct was generated from the following file:
Generated on Fri Mar 7 23:58:18 2008 for Box2D by  doxygen 1.5.4