Package | org.rapidphysics |
Class | public class RapidObject |
Inheritance | RapidObject ![]() ![]() |
Subclasses | RapidCircle, RapidLine, RapidPoint, RapidText |
Property | Defined By | ||
---|---|---|---|
acceleration : Point
Mess with this in your update loop
| RapidObject | ||
![]() | active : Boolean | RapidBasic | |
center : Point
Relative to (x,y)
| RapidObject | ||
![]() | 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 | ||
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 |
Property | Defined By | ||
---|---|---|---|
alpha : Number | RapidObject | ||
_point : Point
General usage
| RapidObject |
Method | Defined By | ||
---|---|---|---|
RapidObject(X:Number = 0, Y:Number = 0) | RapidObject | ||
debugDraw():void [override] | RapidObject | ||
destroy():void [override] | RapidObject | ||
draw():void [override] | RapidObject | ||
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 this function if your shape has a different center
| RapidObject | ||
updateMotion():void | RapidObject |
_point | property |
protected var _point:Point
General usage
acceleration | property |
public var acceleration:Point
Mess with this in your update loop
alpha | property |
protected var alpha:Number
center | property |
public var center:Point
Relative to (x,y)
fillColor | property |
public var fillColor:uint
fixed | property |
public var fixed:Boolean = false
Set to true to prevent this object from moving
height | property |
public var height:Number
Depending on the shape, height can totally be negative!
lineColor | property |
public var lineColor:uint
0xRRGGBB
maxVelocity | property |
public var maxVelocity:Point
nextPosition | property |
public var nextPosition:Point
nextVelocity | property |
public var nextVelocity:Point
nextX | property |
nextX:Number
public function get nextX():Number
public function set nextX(value:Number):void
nextY | property |
nextY:Number
public function get nextY():Number
public function set nextY(value:Number):void
position | property |
public var position:Point
predictMotionFunction | property |
public var predictMotionFunction:Function
I wrote some code to allow dynamic changes between Euler integration and Verlet integration. This isn't too practical for actual usage, but good for engine development
prevX | property |
public var prevX:Number
prevY | property |
public var prevY:Number
radians | property |
public var radians:Number
shape | property |
public var shape:Shape
thickness | property |
public var thickness:Number = 1
velocity | property |
public var velocity:Point
Mess with this in your update loop
width | property |
public var width:Number
Depending on the shape, width can totally be negative!
x | property |
x:Number
public function get x():Number
public function set x(value:Number):void
y | property |
y:Number
public function get y():Number
public function set y(value:Number):void
RapidObject | () | Constructor |
public function RapidObject(X:Number = 0, Y:Number = 0)
X:Number (default = 0 )
| |
Y:Number (default = 0 )
|
debugDraw | () | method |
override public function debugDraw():void
destroy | () | method |
override public function destroy():void
draw | () | method |
override public function draw():void
postUpdate | () | method |
override public function postUpdate():void
Predicts where this object will be by the next preUpdate() Provides enough information to draw physics information, and resolve collisions
predictMotionEuler | () | method |
protected function predictMotionEuler():void
predictMotionVerlet | () | method |
protected function predictMotionVerlet():void
preDraw | () | method |
override public function preDraw():void
preUpdate | () | method |
override public function preUpdate():void
Occurs right after collision resolution Set x to nextX, etc etc
reset | () | method |
public function reset(X:Number, Y:Number):void
Parameters
X:Number | |
Y:Number |
setIntegrationMethod | () | method |
public function setIntegrationMethod(method:Number):void
takes RapidG.INTEGRATION_EULER, etc.
Parameters
method:Number |
update | () | method |
override public function update():void
Add your game's update logic here
updateCenter | () | method |
protected function updateCenter():void
Override this function if your shape has a different center
updateMotion | () | method |
protected function updateMotion():void