PackageBox2D.Collision
Classpublic class b2Distance



Public Properties
 PropertyDefined by
  g_GJK_Iterations : int = 0
[static]
b2Distance
Public Methods
 MethodDefined by
  
Distance(x1:b2Vec2, x2:b2Vec2, shape1:b2Shape, xf1:b2XForm, shape2:b2Shape, xf2:b2XForm):Number
[static]
b2Distance
  
DistanceCC(x1:b2Vec2, x2:b2Vec2, circle1:b2CircleShape, xf1:b2XForm, circle2:b2CircleShape, xf2:b2XForm):Number
[static]
b2Distance
  
DistanceGeneric(x1:b2Vec2, x2:b2Vec2, shape1:b2XForm, xf1:b2XForm, shape2:*, xf2:*):Number
[static]
b2Distance
  
DistancePC(x1:b2Vec2, x2:b2Vec2, polygon:b2PolygonShape, xf1:b2XForm, circle:b2CircleShape, xf2:b2XForm):Number
[static]
b2Distance
  
InPoints(w:b2Vec2, points:Array, pointCount:int):Boolean
[static]
b2Distance
  
ProcessThree(x1:b2Vec2, x2:b2Vec2, p1s:Array, p2s:Array, points:Array):int
[static] Possible regions: - points[2] - edge points[0]-points[2] - edge points[1]-points[2] - inside the triangle
b2Distance
  
ProcessTwo(x1:b2Vec2, x2:b2Vec2, p1s:Array, p2s:Array, points:Array):int
[static] GJK using Voronoi regions (Christer Ericson) and region selection optimizations (Casey Muratori).
b2Distance
Property detail
g_GJK_Iterationsproperty
public static var g_GJK_Iterations:int = 0
Method detail
Distance()method
public static function Distance(x1:b2Vec2, x2:b2Vec2, shape1:b2Shape, xf1:b2XForm, shape2:b2Shape, xf2:b2XForm):NumberParameters
x1:b2Vec2
 
x2:b2Vec2
 
shape1:b2Shape
 
xf1:b2XForm
 
shape2:b2Shape
 
xf2:b2XForm

Returns
Number
DistanceCC()method 
public static function DistanceCC(x1:b2Vec2, x2:b2Vec2, circle1:b2CircleShape, xf1:b2XForm, circle2:b2CircleShape, xf2:b2XForm):NumberParameters
x1:b2Vec2
 
x2:b2Vec2
 
circle1:b2CircleShape
 
xf1:b2XForm
 
circle2:b2CircleShape
 
xf2:b2XForm

Returns
Number
DistanceGeneric()method 
public static function DistanceGeneric(x1:b2Vec2, x2:b2Vec2, shape1:b2XForm, xf1:b2XForm, shape2:*, xf2:*):NumberParameters
x1:b2Vec2
 
x2:b2Vec2
 
shape1:b2XForm
 
xf1:b2XForm
 
shape2:*
 
xf2:*

Returns
Number
DistancePC()method 
public static function DistancePC(x1:b2Vec2, x2:b2Vec2, polygon:b2PolygonShape, xf1:b2XForm, circle:b2CircleShape, xf2:b2XForm):NumberParameters
x1:b2Vec2
 
x2:b2Vec2
 
polygon:b2PolygonShape
 
xf1:b2XForm
 
circle:b2CircleShape
 
xf2:b2XForm

Returns
Number
InPoints()method 
public static function InPoints(w:b2Vec2, points:Array, pointCount:int):BooleanParameters
w:b2Vec2
 
points:Array
 
pointCount:int

Returns
Boolean
ProcessThree()method 
public static function ProcessThree(x1:b2Vec2, x2:b2Vec2, p1s:Array, p2s:Array, points:Array):int

Possible regions: - points[2] - edge points[0]-points[2] - edge points[1]-points[2] - inside the triangle

Parameters
x1:b2Vec2
 
x2:b2Vec2
 
p1s:Array
 
p2s:Array
 
points:Array

Returns
int
ProcessTwo()method 
public static function ProcessTwo(x1:b2Vec2, x2:b2Vec2, p1s:Array, p2s:Array, points:Array):int

GJK using Voronoi regions (Christer Ericson) and region selection optimizations (Casey Muratori). The origin is either in the region of points[1] or in the edge region. The origin is not in region of points[0] because that is the old point.

Parameters
x1:b2Vec2
 
x2:b2Vec2
 
p1s:Array
 
p2s:Array
 
points:Array

Returns
int