Package | flare.physics.colliders |
Class | public final class BoxCollider |
Inheritance | BoxCollider Collider Object |
Property | Defined By | ||
---|---|---|---|
angularVelocity : Vector3D
The world space aligned angular velocity (only rigid bodies). | Collider | ||
axisX : Vector3D
X-aligned axis in world space. | BoxCollider | ||
axisY : Vector3D
Y-aligned axis in world space. | BoxCollider | ||
axisZ : Vector3D
Z-aligned axis in world space. | BoxCollider | ||
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 | ||
depth : Number
Depth of the box collider. | BoxCollider | ||
displacement : Vector3D
The world space object displacement used for correcting the position of overlaping objects. | Collider | ||
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 | ||
halfDepth : Number
Half depth of the collider. | BoxCollider | ||
halfHeight : Number
Half height of the collider. | BoxCollider | ||
halfWidth : Number
Half width of the collider. | BoxCollider | ||
height : Number
Height of the box collider. | BoxCollider | ||
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 | ||
radius : Number
Approximated radius of the box collider. | BoxCollider | ||
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 | ||
vertex : Vector.<Vector3D>
Vertices of the box collider transformed in world space. | BoxCollider | ||
width : Number
Width of the box collider. | BoxCollider |
Method | Defined By | ||
---|---|---|---|
BoxCollider(width:Number, height:Number, depth:Number)
Creates a new box collider. | BoxCollider | ||
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 |
axisX | property |
public var axisX:Vector3D
X-aligned axis in world space.
axisY | property |
public var axisY:Vector3D
Y-aligned axis in world space.
axisZ | property |
public var axisZ:Vector3D
Z-aligned axis in world space.
depth | property |
public var depth:Number
Depth of the box collider.
halfDepth | property |
public var halfDepth:Number
Half depth of the collider.
halfHeight | property |
public var halfHeight:Number
Half height of the collider.
halfWidth | property |
public var halfWidth:Number
Half width of the collider.
height | property |
public var height:Number
Height of the box collider.
radius | property |
public var radius:Number
Approximated radius of the box collider.
vertex | property |
public var vertex:Vector.<Vector3D>
Vertices of the box collider transformed in world space.
width | property |
public var width:Number
Width of the box collider.
BoxCollider | () | Constructor |
public function BoxCollider(width:Number, height:Number, depth:Number)
Creates a new box collider.
Parameterswidth:Number — Width of the box collider.
| |
height:Number — Height of the box collider.
| |
depth:Number — Depth of the box collider.
|