A shape configuration is used for construction of shapes. An instance of this class can safely be reused as a shape will not have any references of a field of this class.

Constructor

new()

Default constructor.

Variables

collisionGroup:Int

The collision group bits the shape belongs to. This is used for collision filtering.

Two shapes shape1 and shape2 will collide only if both shape1.collisionGroup & shape2.collisionMask and shape2.collisionGroup & shape1.collisionMask are not zero.

collisionMask:Int

The collision mask bits of the shape. This is used for collision filtering.

Two shapes shape1 and shape2 will collide only if both shape1.collisionGroup & shape2.collisionMask and shape2.collisionGroup & shape1.collisionMask are not zero.

contactCallback:ContactCallback

The contact callback of the shape. The callback methods are called when contact events the shape is involved occurred.

density:Float

The density of the shape, usually in Kg/m^3.

friction:Float

The coefficient of friction of the shape.

geometry:Geometry

The collision geometry of the shape.

position:Vec3

The shape's local position relative to the parent rigid body's origin.

restitution:Float

The coefficient of restitution of the shape.

rotation:Mat3

The shape's local rotation matrix relative to the parent rigid body's rotation.