PackageBox2D.Collision.Shapes
Classpublic class b2Shape
Subclassesb2CircleShape, b2PolyShape



Public Properties
 PropertyDefined by
  m_body : b2Body
b2Shape
  m_categoryBits : uint
b2Shape
  m_friction : Number
b2Shape
  m_groupIndex : int
b2Shape
  m_maskBits : uint
b2Shape
  m_maxRadius : Number
b2Shape
  m_next : b2Shape
b2Shape
  m_position : b2Vec2
b2Shape
  m_proxyId : uint
b2Shape
  m_R : b2Mat22
b2Shape
  m_restitution : Number
b2Shape
  m_type : int
b2Shape
  m_userData : * = null
b2Shape
Public Methods
 MethodDefined by
  
b2Shape
  
Create(def:b2ShapeDef, body:b2Body, center:b2Vec2):b2Shape
[static]
b2Shape
  
Destroy(shape:b2Shape):void
[static]
b2Shape
  
DestroyProxy():void
b2Shape
  
b2Shape
  
GetMaxRadius():Number
b2Shape
  
b2Shape
  
b2Shape
  
b2Shape
  
GetType():int
b2Shape
  
b2Shape
  
PolyCentroid(vs:Array, count:int, out:b2Vec2):void
[static]
b2Shape
  
PolyMass(massData:b2MassData, vs:Array, count:int, rho:Number):void
[static]
b2Shape
  
QuickSync(position:b2Vec2, R:b2Mat22):void
b2Shape
  
ResetProxy(broadPhase:b2BroadPhase):void
b2Shape
  
Support(dX:Number, dY:Number, out:b2Vec2):void
b2Shape
  
Synchronize(position1:b2Vec2, R1:b2Mat22, position2:b2Vec2, R2:b2Mat22):void
b2Shape
  
TestPoint(p:b2Vec2):Boolean
b2Shape
Public Constants
 ConstantDefined by
  e_boxShape : int = 1
[static]
b2Shape
  e_circleShape : int = 0
[static]
b2Shape
  e_meshShape : int = 3
[static]
b2Shape
  e_polyShape : int = 2
[static]
b2Shape
  e_shapeTypeCount : int = 4
[static]
b2Shape
  e_unknownShape : int = -1
[static]
b2Shape
Property detail
m_bodyproperty
public var m_body:b2Body
m_categoryBitsproperty 
public var m_categoryBits:uint
m_frictionproperty 
public var m_friction:Number
m_groupIndexproperty 
public var m_groupIndex:int
m_maskBitsproperty 
public var m_maskBits:uint
m_maxRadiusproperty 
public var m_maxRadius:Number
m_nextproperty 
public var m_next:b2Shape
m_positionproperty 
public var m_position:b2Vec2
m_proxyIdproperty 
public var m_proxyId:uint
m_Rproperty 
public var m_R:b2Mat22
m_restitutionproperty 
public var m_restitution:Number
m_typeproperty 
public var m_type:int
m_userDataproperty 
public var m_userData:* = null
Constructor detail
b2Shape()constructor
public function b2Shape(def:b2ShapeDef, body:b2Body)Parameters
def:b2ShapeDef
 
body:b2Body
Method detail
Create()method
public static function Create(def:b2ShapeDef, body:b2Body, center:b2Vec2):b2ShapeParameters
def:b2ShapeDef
 
body:b2Body
 
center:b2Vec2

Returns
b2Shape
Destroy()method 
public static function Destroy(shape:b2Shape):voidParameters
shape:b2Shape
DestroyProxy()method 
public function DestroyProxy():void
GetBody()method 
public function GetBody():b2Body

Returns
b2Body
GetMaxRadius()method 
public function GetMaxRadius():Number

Returns
Number
GetNext()method 
public function GetNext():b2Shape

Returns
b2Shape
GetPosition()method 
public function GetPosition():b2Vec2

Returns
b2Vec2
GetRotationMatrix()method 
public function GetRotationMatrix():b2Mat22

Returns
b2Mat22
GetType()method 
public function GetType():int

Returns
int
GetUserData()method 
public function GetUserData():*

Returns
*
PolyCentroid()method 
public static function PolyCentroid(vs:Array, count:int, out:b2Vec2):voidParameters
vs:Array
 
count:int
 
out:b2Vec2
PolyMass()method 
public static function PolyMass(massData:b2MassData, vs:Array, count:int, rho:Number):voidParameters
massData:b2MassData
 
vs:Array
 
count:int
 
rho:Number
QuickSync()method 
public function QuickSync(position:b2Vec2, R:b2Mat22):voidParameters
position:b2Vec2
 
R:b2Mat22
ResetProxy()method 
public function ResetProxy(broadPhase:b2BroadPhase):voidParameters
broadPhase:b2BroadPhase
Support()method 
public function Support(dX:Number, dY:Number, out:b2Vec2):voidParameters
dX:Number
 
dY:Number
 
out:b2Vec2
Synchronize()method 
public function Synchronize(position1:b2Vec2, R1:b2Mat22, position2:b2Vec2, R2:b2Mat22):voidParameters
position1:b2Vec2
 
R1:b2Mat22
 
position2:b2Vec2
 
R2:b2Mat22
TestPoint()method 
public function TestPoint(p:b2Vec2):BooleanParameters
p:b2Vec2

Returns
Boolean
Constant detail
e_boxShapeconstant
public static const e_boxShape:int = 1
e_circleShapeconstant 
public static const e_circleShape:int = 0
e_meshShapeconstant 
public static const e_meshShape:int = 3
e_polyShapeconstant 
public static const e_polyShape:int = 2
e_shapeTypeCountconstant 
public static const e_shapeTypeCount:int = 4
e_unknownShapeconstant 
public static const e_unknownShape:int = -1