Packageorg.MARS.dynamics.collision.fine.sat
Classpublic class CircleAxisProjection
InheritanceCircleAxisProjection Inheritance AxisProjection

Projects a circle onto a given axis

This type is intimately tied to SAT collision detection. By projecting a circle onto an axis, we turn our collision detection, per axis, into a one-dimensional query.

See also

CirclePolygonDetector
IBody
AxisProjection


Public Properties
 PropertyDefined by
 Inheritedmax : Number
maximum point of projection along axis
AxisProjection
 Inheritedmin : Number
minimum point of projection along axis
AxisProjection
Public Methods
 MethodDefined by
  
Creates a new CircleAxisProjection
CircleAxisProjection
 Inherited
getDistance(projection:AxisProjection):Number
Gets a signed distance- negative indicates range overlap, zero indicates coincidence and positive indicates a separation
AxisProjection
Protected Methods
 MethodDefined by
  
project(circle:Circle, axis:Vector):void
Projects the circle onto the axis
CircleAxisProjection
Constructor detail
CircleAxisProjection()constructor
public function CircleAxisProjection(circle:Circle, axis:Vector)

Creates a new CircleAxisProjection

Parameters
circle:Circle — Circle to project onto axis
 
axis:Vector — axis to project onto

See also

Method detail
project()method
protected function project(circle:Circle, axis:Vector):void

Projects the circle onto the axis

Parameters
circle:Circle — IBody to project
 
axis:Vector — Vector to project onto

See also

AxisProjection.project