PackageBox2D.Dynamics.Contacts
Classpublic class b2Contact
Subclassesb2CircleContact, b2NullContact, b2PolyAndCircleContact, b2PolygonContact

typedef b2Contactb2ContactCreateFcn(b2Shapeshape1, b2Shapeshape2, b2BlockAllocatorallocator); typedef void b2ContactDestroyFcn(b2Contactcontact, b2BlockAllocatorallocator);



Public Properties
 PropertyDefined by
  e_islandFlag : uint = 0x0004
[static]
b2Contact
  e_nonSolidFlag : uint = 0x0001
[static]
b2Contact
  e_slowFlag : uint = 0x0002
[static]
b2Contact
  e_toiFlag : uint = 0x0008
[static]
b2Contact
  s_initialized : Boolean = false
[static]
b2Contact
  s_registers : Array
[static]
b2Contact
Public Methods
 MethodDefined by
  
b2Contact(s1:b2Shape = null, s2:b2Shape = null)
b2Contact
  
AddType(createFcn:Function, destroyFcn:Function, type1:int, type2:int):void
[static]
b2Contact
  
Create(shape1:b2Shape, shape2:b2Shape, allocator:*):b2Contact
[static]
b2Contact
  
Destroy(contact:b2Contact, allocator:*):void
[static]
b2Contact
  
Evaluate(listener:b2ContactListener):void
b2Contact
  
Get the number of manifolds.
b2Contact
  
GetManifolds():Array
b2Contact
  
Get the next contact in the world's contact list.
b2Contact
  
Get the first shape in this contact.
b2Contact
  
Get the second shape in this contact.
b2Contact
  
[static]
b2Contact
  
IsSolid():Boolean
Is this contact solid?
b2Contact
  
Update(listener:b2ContactListener):void
b2Contact
Property detail
e_islandFlagproperty
public static var e_islandFlag:uint = 0x0004
e_nonSolidFlagproperty 
public static var e_nonSolidFlag:uint = 0x0001
e_slowFlagproperty 
public static var e_slowFlag:uint = 0x0002
e_toiFlagproperty 
public static var e_toiFlag:uint = 0x0008
m_flagsproperty 
b2internal var m_flags:uint
m_frictionproperty 
b2internal var m_friction:Number
m_manifoldCountproperty 
b2internal var m_manifoldCount:int
m_nextproperty 
b2internal var m_next:b2Contact
m_node1property 
b2internal var m_node1:b2ContactEdge
m_node2property 
b2internal var m_node2:b2ContactEdge
m_prevproperty 
b2internal var m_prev:b2Contact
m_restitutionproperty 
b2internal var m_restitution:Number
m_shape1property 
b2internal var m_shape1:b2Shape
m_shape2property 
b2internal var m_shape2:b2Shape
m_toiproperty 
b2internal var m_toi:Number
s_initializedproperty 
public static var s_initialized:Boolean = false
s_registersproperty 
public static var s_registers:Array
Constructor detail
b2Contact()constructor
public function b2Contact(s1:b2Shape = null, s2:b2Shape = null)Parameters
s1:b2Shape (default = null)
 
s2:b2Shape (default = null)
Method detail
AddType()method
public static function AddType(createFcn:Function, destroyFcn:Function, type1:int, type2:int):voidParameters
createFcn:Function
 
destroyFcn:Function
 
type1:int
 
type2:int
Create()method 
public static function Create(shape1:b2Shape, shape2:b2Shape, allocator:*):b2ContactParameters
shape1:b2Shape
 
shape2:b2Shape
 
allocator:*

Returns
b2Contact
Destroy()method 
public static function Destroy(contact:b2Contact, allocator:*):voidParameters
contact:b2Contact
 
allocator:*
Evaluate()method 
public function Evaluate(listener:b2ContactListener):voidParameters
listener:b2ContactListener
GetManifoldCount()method 
public function GetManifoldCount():int

Get the number of manifolds. This is 0 or 1 between convex shapes. This may be greater than 1 for convex-vs-concave shapes. Each manifold holds up to two contact points with a shared contact normal.

Returns
int
GetManifolds()method 
public function GetManifolds():Array

Returns
Array
GetNext()method 
public function GetNext():b2Contact

Get the next contact in the world's contact list.

Returns
b2Contact
GetShape1()method 
public function GetShape1():b2Shape

Get the first shape in this contact.

Returns
b2Shape
GetShape2()method 
public function GetShape2():b2Shape

Get the second shape in this contact.

Returns
b2Shape
InitializeRegisters()method 
public static function InitializeRegisters():void
IsSolid()method 
public function IsSolid():Boolean

Is this contact solid?

Returns
Boolean — true if this contact should generate a response.
Update()method 
public function Update(listener:b2ContactListener):voidParameters
listener:b2ContactListener