Package | flare.physics.colliders |
Class | public final class RayCollider |
Inheritance | RayCollider Collider Object |
Property | Defined By | ||
---|---|---|---|
angularVelocity : Vector3D
The world space aligned angular velocity (only rigid bodies). | Collider | ||
collectContacts : Boolean = false
When set to true, the object stores the contact data objects after each physics.step() call. | Collider | ||
contactData : Vector.<ContactData>
The contact datas information stored after each physics.step() call. | Collider | ||
contactGroups : uint
Stores the groups in which this collider has been involved during the last physics.step() call. | Collider | ||
dir : Vector3D
Normalized direction of the ray. | RayCollider | ||
displacement : Vector3D
The world space object displacement used for correcting the position of overlaping objects. | Collider | ||
distance : Number
Maximum distance of the ray. | RayCollider | ||
enabled : Boolean = true
Enable or disable the collider. | Collider | ||
friction : Number = 1.0
The friction of the collider from 0 - no friction, to 1 - full friction (only rigid bodies). | Collider | ||
gravity : Vector3D
The gravity vector. | Collider | ||
groups : uint = 1
Sets or gets the collision groups for each collider. | Collider | ||
invInertia : Matrix3D
The world space inverted inertia matrix. | Collider | ||
invLocalInertia : Matrix3D
The inverted local inertia matrix. | Collider | ||
invMass : Number = 1
The inverse mass of the collider. | Collider | ||
invTransform : Matrix3D
The inverse world transform matrix. | Collider | ||
isRigidBody : Boolean = false
Sets or gets if the collider behaves as a rigid body. | Collider | ||
isStatic : Boolean = false
Sets or gets if the collider behaves as a static object. | Collider | ||
isTrigger : Boolean = false
Sets or gets if the collider behaves as a trigger. | Collider | ||
linearVelocity : Vector3D
The world space aligned linear velocity (only rigid bodies). | Collider | ||
mass : Number = 1
The mass of the collider. | Collider | ||
maxX : Number = 0
The maximum position along the Z-Axis in world space. | Collider | ||
maxY : Number = 0
The maximum position along the Z-Axis in world space. | Collider | ||
maxZ : Number = 0
The maximum position along the Z-Axis in world space. | Collider | ||
minX : Number = 0
The minimum position along the X-Axis in world space. | Collider | ||
minY : Number = 0
The minimum position along the Y-Axis in world space. | Collider | ||
minZ : Number = 0
The minimum position along the Z-Axis in world space. | Collider | ||
neverSleep : Boolean = false
Gets or sets if the colider is allowed to enter sleeping mode. | Collider | ||
numContacts : int
The number of contact datas after each physics.step() call when collectContacts is set to true. | Collider | ||
offset : Vector3D
Sets or gets an offset position within the parent pivot. | Collider | ||
orientation : Vector3D
The orientation in world space in quaternion form. | Collider | ||
parent : Collider
The parent collider. | Collider | ||
pivot : Pivot3D
The pivot associated to this collider. | Collider | ||
position : Vector3D
The position in world space. | Collider | ||
restitution : Number = 0.0
The restitution factor of the collider from 0 - no restitution to 1 - full bouncing (only rigid bodies). | Collider | ||
scaledPivot : Boolean = true
When the collider pivot is scaled, set this property to true to properly calculate the collider transforms. | Collider | ||
shape : int
The shape of the collider. | Collider | ||
sleeping : Boolean = false
Gets or sets whatever the collider is in sleeping mode or not. | Collider | ||
sleepingFactor : Number = 0.9
A factor property which defines how fast the object will enter in sleeping mode, from 0 to 1. | Collider | ||
transform : Matrix3D
The world space transform matrix. | Collider | ||
userData : *
An object to store any custom properties, null by default. | Collider |
Method | Defined By | ||
---|---|---|---|
RayCollider(dir:Vector3D = null, distance:Number = 1000)
Creates a new ray collider. | RayCollider | ||
addCollisionGroups(... args):void
Adds collision groups to the collider. | Collider | ||
applyImpulse(x:Number, y:Number, z:Number, position:Vector3D = null):void
Applies an impulse force on the collider in world space (only rigid bodies). | Collider | ||
applyLocalImpulse(x:Number, y:Number, z:Number, position:Vector3D = null):void
Applies an impulse force on the collider in local space (only rigid bodies). | Collider | ||
applyLocalTorque(x:Number, y:Number, z:Number):void
Applies a torque force on the collider in local space (only rigid bodies). | Collider | ||
applyTorque(x:Number, y:Number, z:Number):void
Applies a torque force on the collider in world space (only rigid bodies). | Collider | ||
awake():void
Exit spleeing mode. | Collider | ||
Clone this collider. | Collider | ||
constrainLocalRotation(x:Number = 1, y:Number = 1, z:Number = 1):void
Allows for constraining rotation angles (only rigid bodies). | Collider | ||
dispose():void
Disposes all resources used by this collider. | Collider | ||
getSupportPoints(axis:Vector3D, out:Vector.<Vector3D>):int
Get the support points along an arbitraty axis. | Collider | ||
hasGroup(index:int):Boolean
Checks if the collider is in the specified group. | Collider | ||
Projects the object along an arbitrary axis. | Collider | ||
removeCollisionGroups(... args):void
Removes collision groups from the collider. | Collider | ||
resetVelocities():void
Resets both, linear and angular velocities (only rigid bodies). | Collider | ||
setCollisionGroups(... args):void
Resets and sets the collision groups to the collider. | Collider | ||
setMass(mass:Number):void
Sets the collider mass and inertia for collisions and physics. | Collider | ||
sleep():void
Enters in sleeping mode. | Collider | ||
update(timeStep:Number):void
Updates the state of the collider properties such as its position, orientation, matrices, boundings. | Collider | ||
updateInertia():void
When multiple colliders are grouped to a parent collider, the parent collider must update its mass and intertia values. | Collider |
dir | property |
public var dir:Vector3D
Normalized direction of the ray. If the ray collider is linked to a pivot, the pivot direction will be used.
distance | property |
public var distance:Number
Maximum distance of the ray.
RayCollider | () | Constructor |
public function RayCollider(dir:Vector3D = null, distance:Number = 1000)
Creates a new ray collider.
Parametersdir:Vector3D (default = null ) — Normalized direction of the ray. If the ray collider is linked to a pivot, the pivot direction will be used.
| |
distance:Number (default = 1000 ) — Maximum distance of the ray.
|