Package | flare.collisions |
Class | public class MouseCollision |
Inheritance | MouseCollision ![]() |
Property | Defined By | ||
---|---|---|---|
camera : Camera3D
Camera to be used in checks. | MouseCollision | ||
collided : Boolean [read-only]
Returns whether collision occurred or not in the last check. | MouseCollision | ||
collisionCount : int [read-only]
Returns the number of objects to be checked. | MouseCollision | ||
collisionTime : int [read-only]
Returns the time taken to perform the last check in milliseconds. | MouseCollision | ||
data : Vector.<CollisionInfo>
CollisionInfo-type vector with the results of the collision. | MouseCollision | ||
ray : RayCollision [read-only]
An instance of ray collision used to do the tests. | MouseCollision |
Method | Defined By | ||
---|---|---|---|
MouseCollision(camera:Camera3D = null)
Creates a new MouseCollision object. | MouseCollision | ||
addCollisionWith(pivot:Pivot3D, includeChildren:Boolean = true):void
Adds objects that will be used to check for collisions. | MouseCollision | ||
dispose():void | MouseCollision | ||
removeCollisionWith(pivot:Pivot3D, includeChildren:Boolean = true):void
Removes a Pivot3D in order to stop its checking process. | MouseCollision | ||
test(x:Number, y:Number, getAllPolysUnderPoint:Boolean = false, ignoreInvisible:Boolean = true, ignoreBackFace:Boolean = true):Boolean
Performs the collision check. | MouseCollision |
camera | property |
camera:Camera3D
Camera to be used in checks.
public function get camera():Camera3D
public function set camera(value:Camera3D):void
collided | property |
collided:Boolean
[read-only] Returns whether collision occurred or not in the last check.
public function get collided():Boolean
collisionCount | property |
collisionCount:int
[read-only] Returns the number of objects to be checked.
public function get collisionCount():int
collisionTime | property |
collisionTime:int
[read-only] Returns the time taken to perform the last check in milliseconds.
public function get collisionTime():int
data | property |
public var data:Vector.<CollisionInfo>
CollisionInfo-type vector with the results of the collision.
ray | property |
ray:RayCollision
[read-only] An instance of ray collision used to do the tests.
public function get ray():RayCollision
MouseCollision | () | Constructor |
public function MouseCollision(camera:Camera3D = null)
Creates a new MouseCollision object. Camera and canvas are both optional. If null, those used during the collision are selected.
Parameterscamera:Camera3D (default = null ) — Camera3D object that will be used to check the collision.
|
addCollisionWith | () | method |
public function addCollisionWith(pivot:Pivot3D, includeChildren:Boolean = true):void
Adds objects that will be used to check for collisions.
Parameters
pivot:Pivot3D — Pivot3D object to be checked for collisions
| |
includeChildren:Boolean (default = true ) — defines whether Pivot3D children are to be included.
|
dispose | () | method |
public function dispose():void
removeCollisionWith | () | method |
public function removeCollisionWith(pivot:Pivot3D, includeChildren:Boolean = true):void
Removes a Pivot3D in order to stop its checking process.
Parameters
pivot:Pivot3D — Pivot3D object to be removed.
| |
includeChildren:Boolean (default = true ) — defines whether Pivot3D children are to be removed.
|
test | () | method |
public function test(x:Number, y:Number, getAllPolysUnderPoint:Boolean = false, ignoreInvisible:Boolean = true, ignoreBackFace:Boolean = true):Boolean
Performs the collision check. "x" and "y" coordinates are relative to the canvas.
Parameters
x:Number — Canvas X coordinate.
| |
y:Number — Canvas Y coordinate.
| |
getAllPolysUnderPoint:Boolean (default = false ) — Defines whether all the collisions or only the first collision are to be taken.
| |
ignoreInvisible:Boolean (default = true ) — Defines whether invisible objects are to be ignored.
| |
ignoreBackFace:Boolean (default = true )
|
Boolean — true if collision occurred.
|