Package | flare.physics.colliders |
Class | public class MeshCollider |
Inheritance | MeshCollider ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
![]() | angularVelocity : Vector3D
The world space aligned angular velocity (only rigid bodies). | Collider | |
bvh : BVH [read-only]
Gets a reference to the root BVH node. | MeshCollider | ||
![]() | 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 | |
![]() | 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 | |
![]() | 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 | |
mesh : Mesh3D [read-only]
Reference to the mesh used as a shape. | MeshCollider | ||
![]() | 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 | |
![]() | 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 | |
tris : Vector.<Triangle> [read-only]
Gets all the triangle objects of the mesh collider. | MeshCollider |
Method | Defined By | ||
---|---|---|---|
MeshCollider(mesh:Mesh3D)
Creates a new mesh collider. | MeshCollider | ||
![]() | 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 | |
![]() |
Projects the object along an arbitrary axis. | Collider | |
![]() | resetVelocities():void
Resets both, linear and angular velocities (only rigid bodies). | 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 |
bvh | property |
bvh:BVH
[read-only] Gets a reference to the root BVH node.
public function get bvh():BVH
mesh | property |
mesh:Mesh3D
[read-only] Reference to the mesh used as a shape.
public function get mesh():Mesh3D
tris | property |
tris:Vector.<Triangle>
[read-only] Gets all the triangle objects of the mesh collider.
public function get tris():Vector.<Triangle>
MeshCollider | () | Constructor |
public function MeshCollider(mesh:Mesh3D)
Creates a new mesh collider.
Parametersmesh:Mesh3D — Mesh to be used as a shape.
|