Packageorg.rapidphysics.shapes
Classpublic class RapidCircle
InheritanceRapidCircle Inheritance RapidObject Inheritance RapidBasic Inheritance Object

A circle class to enable circle collisions x and y are the center of the circle



Public Properties
 PropertyDefined By
 Inheritedacceleration : Point
Mess with this in your update loop
RapidObject
 Inheritedactive : Boolean
RapidBasic
 Inheritedcenter : Point
Relative to (x,y)
RapidObject
  diameter : Number
[read-only]
RapidCircle
 Inheritedexists : Boolean
RapidBasic
 InheritedfillColor : uint
RapidObject
 Inheritedfixed : Boolean = false
Set to true to prevent this object from moving
RapidObject
 Inheritedheight : Number
Depending on the shape, height can totally be negative!
RapidObject
 InheritedlineColor : uint
0xRRGGBB
RapidObject
 InheritedmaxVelocity : Point
RapidObject
 InheritednextPosition : Point
RapidObject
 InheritednextVelocity : Point
RapidObject
 InheritednextX : Number
RapidObject
 InheritednextY : Number
RapidObject
 Inheritedposition : Point
RapidObject
 InheritedpredictMotionFunction : Function
I wrote some code to allow dynamic changes between Euler integration and Verlet integration.
RapidObject
 InheritedprevX : Number
RapidObject
 InheritedprevY : Number
RapidObject
 Inheritedradians : Number
RapidObject
  radius : Number
RapidCircle
 Inheritedshape : Shape
RapidObject
 Inheritedthickness : Number = 1
RapidObject
 Inheritedvelocity : Point
Mess with this in your update loop
RapidObject
 Inheritedvisible : Boolean
RapidBasic
 Inheritedwidth : Number
Depending on the shape, width can totally be negative!
RapidObject
 Inheritedx : Number
RapidObject
 Inheritedy : Number
RapidObject
Protected Properties
 PropertyDefined By
 Inheritedalpha : Number
RapidObject
 Inherited_point : Point
General usage
RapidObject
Public Methods
 MethodDefined By
  
RapidCircle(X:Number = 0, Y:Number = 0, Radius:Number = 0)
RapidCircle
  
debugDraw():void
[override]
RapidCircle
 Inherited
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
 Inherited
postUpdate():void
[override] Predicts where this object will be by the next preUpdate() Provides enough information to draw physics information, and resolve collisions
RapidObject
 Inherited
preDraw():void
[override]
RapidObject
 Inherited
preUpdate():void
[override] Occurs right after collision resolution Set x to nextX, etc etc
RapidObject
 Inherited
reset(X:Number, Y:Number):void
RapidObject
 Inherited
setIntegrationMethod(method:Number):void
takes RapidG.INTEGRATION_EULER, etc.
RapidObject
 Inherited
update():void
[override] Add your game's update logic here
RapidObject
Protected Methods
 MethodDefined By
 Inherited
RapidObject
 Inherited
RapidObject
  
[override]
RapidCircle
 Inherited
RapidObject
Property Detail
diameterproperty
diameter:Number  [read-only]


Implementation
    public function get diameter():Number
radiusproperty 
public var radius:Number

Constructor Detail
RapidCircle()Constructor
public function RapidCircle(X:Number = 0, Y:Number = 0, Radius:Number = 0)



Parameters
X:Number (default = 0)
 
Y:Number (default = 0)
 
Radius:Number (default = 0)
Method Detail
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

Returns
Number
intersects()method 
public static function intersects(c1:RapidCircle, c2:RapidCircle):Boolean

Parameters

c1:RapidCircle
 
c2:RapidCircle

Returns
Boolean
overlap()method 
public static function overlap(c1:RapidCircle, c2:RapidCircle):Boolean

Parameters

c1:RapidCircle
 
c2:RapidCircle

Returns
Boolean
updateCenter()method 
override protected function updateCenter():void