| Package | org.MARS.dynamics.collision.fine.sat |
| Class | public class PolygonAxisProjection |
| Inheritance | PolygonAxisProjection AxisProjection |
This type is intimately tied to SAT collision detection. By projecting a polygon onto an axis, we turn our collision detection, per axis, into a one-dimensional query.
See also
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new AxisProjection
| PolygonAxisProjection | ||
![]() |
getDistance(projection:AxisProjection):Number
Gets a signed distance- negative indicates range overlap, zero indicates coincidence
and positive indicates a separation
| AxisProjection | |
| Method | Defined by | ||
|---|---|---|---|
|
Projects the body onto the axis
| PolygonAxisProjection | ||
| PolygonAxisProjection | () | constructor |
public function PolygonAxisProjection(body:Polygon, axis:Vector)Creates a new AxisProjection
Parametersbody:Polygon — IBody to project onto axis
|
|
axis:Vector — axis to project onto
|
See also
| project | () | method |
protected function project(body:Shape, axis:Vector):voidProjects the body onto the axis
Parametersbody:Shape — IBody to project
|
|
axis:Vector — Vector to project onto
|