PackageBox2D.Collision
Classpublic class b2DistanceProxy
Sourceb2DistanceProxy.as

A distance proxy is used by the GJK algorithm. It encapsulates any shape.



Public Properties
 PropertyDefined by
  m_count : int
b2DistanceProxy
  m_radius : Number
b2DistanceProxy
  m_vertices : Vector
b2DistanceProxy
Public Methods
 MethodDefined by
  
GetSupport(d:b2Vec2):Number
Get the supporting vertex index in the given direction.
b2DistanceProxy
  
Get the supporting vertex in the given direction.
b2DistanceProxy
  
GetVertex(index:int):b2Vec2
Get a vertex by index.
b2DistanceProxy
  
Get the vertex count.
b2DistanceProxy
  
Set(shape:b2Shape):void
Initialize the proxy using the given shape.
b2DistanceProxy
Property detail
m_countproperty
public var m_count:int
m_radiusproperty 
public var m_radius:Number
m_verticesproperty 
public var m_vertices:Vector
Method detail
GetSupport()method
public function GetSupport(d:b2Vec2):Number

Get the supporting vertex index in the given direction.

Parameters
d:b2Vec2

Returns
Number
GetSupportVertex()method 
public function GetSupportVertex(d:b2Vec2):b2Vec2

Get the supporting vertex in the given direction.

Parameters
d:b2Vec2

Returns
b2Vec2
GetVertex()method 
public function GetVertex(index:int):b2Vec2

Get a vertex by index. Used by b2Distance.

Parameters
index:int

Returns
b2Vec2
GetVertexCount()method 
public function GetVertexCount():int

Get the vertex count.

Returns
int
Set()method 
public function Set(shape:b2Shape):void

Initialize the proxy using the given shape. The shape must remain in scope while the proxy is in use.

Parameters
shape:b2Shape