Appearance
Class: DistanceProxy
A distance proxy is used by the GJK algorithm. It encapsulates any shape.
Constructors
Constructor
new DistanceProxy():
DistanceProxy
Returns
DistanceProxy
Methods
getSupport()
getSupport(
d):number
Get the supporting vertex index in the given direction.
Parameters
d
Returns
number
getSupportVertex()
getSupportVertex(
d):Vec2Value
Get the supporting vertex in the given direction.
Parameters
d
Returns
getVertex()
getVertex(
index):Vec2Value
Get a vertex by index. Used by Distance.
Parameters
index
number
Returns
getVertexCount()
getVertexCount():
number
Get the vertex count.
Returns
number
recycle()
recycle():
void
Returns
void
set()
set(
shape,index):void
Initialize the proxy using the given shape. The shape must remain in scope while the proxy is in use.
Parameters
shape
index
number
Returns
void
setVertices()
setVertices(
vertices,count,radius):void
Initialize the proxy using a vertex cloud and radius. The vertices must remain in scope while the proxy is in use.
Parameters
vertices
count
number
radius
number
Returns
void