PackageBox2D.Collision.Shapes
Classpublic class b2ShapeDef
Subclassesb2CircleDef, b2EdgeChainDef, b2PolygonDef
Sourceb2ShapeDef.as

A shape definition is used to construct a shape. This class defines an abstract shape definition. You can reuse shape definitions safely.



Public Properties
 PropertyDefined by
  density : Number = 0.0
The shape's density, usually in kg/m^2.
b2ShapeDef
  filter : b2FilterData
Contact filtering data.
b2ShapeDef
  friction : Number = 0.2
The shape's friction coefficient, usually in the range [0,1].
b2ShapeDef
  isSensor : Boolean = false
A sensor shape collects contact information but never generates a collision response.
b2ShapeDef
  restitution : Number = 0.0
The shape's restitution (elasticity) usually in the range [0,1].
b2ShapeDef
  type : int
Holds the shape type for down-casting.
b2ShapeDef
  userData : * = null
Use this to store application specify shape data.
b2ShapeDef
Property detail
densityproperty
public var density:Number = 0.0

The shape's density, usually in kg/m^2.

filterproperty 
public var filter:b2FilterData

Contact filtering data.

frictionproperty 
public var friction:Number = 0.2

The shape's friction coefficient, usually in the range [0,1].

isSensorproperty 
public var isSensor:Boolean = false

A sensor shape collects contact information but never generates a collision response.

restitutionproperty 
public var restitution:Number = 0.0

The shape's restitution (elasticity) usually in the range [0,1].

typeproperty 
public var type:int

Holds the shape type for down-casting.

userDataproperty 
public var userData:* = null

Use this to store application specify shape data.