SATNarrowphase

SATNarrowphase

Uses the Separation Axis Theorem. Best when your body shapes have few vertices.

Constructor

new SATNarrowphase()

Source:

Members

clmdrecord

Source:

Methods

getCollisionPairs(manager, contactList, clmds)

Source:
Parameters:
Name Type Description
manager Manager
contactList Array.<CollisionPair>
clmds

(static) circleContains(position, radius, point)

Source:
Parameters:
Name Type Description
position Vector2
radius number
point Vector2

(static) findNearSupports(vertices, axis, target)

Source:
Parameters:
Name Type Description
vertices Array.<Vector2>
axis Vector2
target Array.<Vector2>

(static) projectShapesToAxes(shapeB, shapeA, axes, manifold)

Source:
Parameters:
Name Type Description
shapeB Shape
shapeA Shape
axes Array.<Vector_like>
manifold CollisionData

(static) projectVerticesToAxis(vertices, axis, target)

Source:
Parameters:
Name Type Description
vertices Array.<Vector_like>
axis Vector_like
target

(static) shapeContains(shape, point)

Source:
Parameters:
Name Type Description
shape Shape
point Vector2

(static) shapesCollided(shapeA, shapeB, target)

Source:
Parameters:
Name Type Description
shapeA Shape
shapeB Shape
target CollisionData

(static) shapesInBodyCollided(body1, body2, manifold)

Source:
Parameters:
Name Type Description
body1 Body2D
body2 Body2D
manifold CollisionData

(static) verticesContain(vertices, point)

Source:
Parameters:
Name Type Description
vertices Array.<Vector2>
point Vector2