Package | org.rapidphysics.shapes |
Class | public class RapidLine |
Inheritance | RapidLine ![]() ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
![]() | acceleration : Point
Mess with this in your update loop
| RapidObject | |
![]() | active : Boolean | RapidBasic | |
![]() | center : Point
Relative to (x,y)
| RapidObject | |
end : Point [read-only] | RapidLine | ||
![]() | 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 | |
normal : Point
The normal for this line
| RapidLine | ||
![]() | 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 |
Method | Defined By | ||
---|---|---|---|
RapidLine(startX:Number = 0, startY:Number = 0, endX:Number = 0, endY:Number = 0) | RapidLine | ||
debugDraw():void [override] | RapidLine | ||
destroy():void [override] | RapidLine | ||
draw():void [override] | RapidLine | ||
getDirection():Point | RapidLine | ||
getNormalizedDirection():Point | RapidLine | ||
[static]
Returns the point of intersection, null otherwise
| RapidLine | ||
[static]
Returns true if the lines intersect
| RapidLine | ||
![]() | 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] | RapidLine | ||
![]() | reset(X:Number, Y:Number):void | RapidObject | |
setEnd(X:Number, Y:Number):void | RapidLine | ||
![]() | setIntegrationMethod(method:Number):void
takes RapidG.INTEGRATION_EULER, etc. | RapidObject | |
update():void [override] | RapidLine |
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 | |
updateNormal():void | RapidLine |
end | property |
end:Point
[read-only] public function get end():Point
normal | property |
public var normal:Point
The normal for this line
RapidLine | () | Constructor |
public function RapidLine(startX:Number = 0, startY:Number = 0, endX:Number = 0, endY:Number = 0)
startX:Number (default = 0 )
| |
startY:Number (default = 0 )
| |
endX:Number (default = 0 )
| |
endY:Number (default = 0 )
|
debugDraw | () | method |
override public function debugDraw():void
destroy | () | method |
override public function destroy():void
draw | () | method |
override public function draw():void
getDirection | () | method |
public function getDirection():Point
ReturnsPoint |
getNormalizedDirection | () | method |
public function getNormalizedDirection():Point
ReturnsPoint |
intersection | () | method |
public static function intersection(line1:RapidLine, line2:RapidLine):Point
Returns the point of intersection, null otherwise
Parameters
line1:RapidLine | |
line2:RapidLine |
Point —
|
intersects | () | method |
public static function intersects(line1:RapidLine, line2:RapidLine):Boolean
Returns true if the lines intersect
Parameters
line1:RapidLine | |
line2:RapidLine |
Boolean —
|
preUpdate | () | method |
override public function preUpdate():void
setEnd | () | method |
public function setEnd(X:Number, Y:Number):void
Parameters
X:Number | |
Y:Number |
update | () | method |
override public function update():void
updateNormal | () | method |
protected function updateNormal():void