Package | org.rapidphysics.shapes |
Class | public class RapidCircle |
Inheritance | RapidCircle ![]() ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
![]() | acceleration : Point
Mess with this in your update loop
| RapidObject | |
![]() | active : Boolean | RapidBasic | |
![]() | center : Point
Relative to (x,y)
| RapidObject | |
diameter : Number [read-only] | RapidCircle | ||
![]() | exists : Boolean | RapidBasic | |
![]() | fillColor : uint | RapidObject | |
![]() | fixed : Boolean = false
Set to true to prevent this object from moving
| RapidObject | |
![]() | height : Number
Depending on the shape, height can totally be negative!
| RapidObject | |
![]() | lineColor : uint
0xRRGGBB
| RapidObject | |
![]() | maxVelocity : Point | RapidObject | |
![]() | nextPosition : Point | RapidObject | |
![]() | nextVelocity : Point | RapidObject | |
![]() | nextX : Number | RapidObject | |
![]() | nextY : Number | RapidObject | |
![]() | position : Point | RapidObject | |
![]() | predictMotionFunction : Function
I wrote some code to allow dynamic changes between Euler integration and Verlet integration. | RapidObject | |
![]() | prevX : Number | RapidObject | |
![]() | prevY : Number | RapidObject | |
![]() | radians : Number | RapidObject | |
radius : Number | RapidCircle | ||
![]() | shape : Shape | RapidObject | |
![]() | thickness : Number = 1 | RapidObject | |
![]() | velocity : Point
Mess with this in your update loop
| RapidObject | |
![]() | visible : Boolean | RapidBasic | |
![]() | width : Number
Depending on the shape, width can totally be negative!
| RapidObject | |
![]() | x : Number | RapidObject | |
![]() | y : Number | RapidObject |
Method | Defined By | ||
---|---|---|---|
RapidCircle(X:Number = 0, Y:Number = 0, Radius:Number = 0) | RapidCircle | ||
debugDraw():void [override] | RapidCircle | ||
![]() | destroy():void [override] | RapidObject | |
draw():void [override] | RapidCircle | ||
[static]
If greater than zero, returns the number of pixels that the circles overlap
If less than zero, returns how far away the circles are from touching
If equals zero, the circles are touching
| RapidCircle | ||
[static] | RapidCircle | ||
[static] | RapidCircle | ||
![]() | postUpdate():void [override]
Predicts where this object will be by the next preUpdate()
Provides enough information to draw physics information, and resolve collisions
| RapidObject | |
![]() | preDraw():void [override] | RapidObject | |
![]() | preUpdate():void [override]
Occurs right after collision resolution
Set x to nextX, etc etc
| RapidObject | |
![]() | reset(X:Number, Y:Number):void | RapidObject | |
![]() | setIntegrationMethod(method:Number):void
takes RapidG.INTEGRATION_EULER, etc. | RapidObject | |
![]() | update():void [override]
Add your game's update logic here
| RapidObject |
Method | Defined By | ||
---|---|---|---|
![]() | predictMotionEuler():void | RapidObject | |
![]() | predictMotionVerlet():void | RapidObject | |
updateCenter():void [override] | RapidCircle | ||
![]() | updateMotion():void | RapidObject |
diameter | property |
diameter:Number
[read-only] public function get diameter():Number
radius | property |
public var radius:Number
RapidCircle | () | Constructor |
public function RapidCircle(X:Number = 0, Y:Number = 0, Radius:Number = 0)
X:Number (default = 0 )
| |
Y:Number (default = 0 )
| |
Radius:Number (default = 0 )
|
debugDraw | () | method |
override public function debugDraw():void
draw | () | method |
override public function draw():void
intersection | () | method |
public static function intersection(c1:RapidCircle, c2:RapidCircle):Number
If greater than zero, returns the number of pixels that the circles overlap If less than zero, returns how far away the circles are from touching If equals zero, the circles are touching
Parameters
c1:RapidCircle | |
c2:RapidCircle |
Number —
|
intersects | () | method |
public static function intersects(c1:RapidCircle, c2:RapidCircle):Boolean
Parameters
c1:RapidCircle | |
c2:RapidCircle |
Boolean |
overlap | () | method |
public static function overlap(c1:RapidCircle, c2:RapidCircle):Boolean
Parameters
c1:RapidCircle | |
c2:RapidCircle |
Boolean |
updateCenter | () | method |
override protected function updateCenter():void