Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2016-0-4 21:22

Class enchant.gl.physics.Rigid

Class Summary
Constructor Attributes Constructor Name and Description
 
enchant.gl.physics.Rigid(shape, mass, linearDamping, angularDamping)
Rigid body object.
Field Summary
Field Attributes Field Name and Description
 
Rigid frictions.
 
Rigid restitutions.
 
Ammo rigid body object
 
World that Rigid belongs to

Method Summary

Method Attributes Method Name and Description
 
activate(force)
Make Rigid valid.
 
applyCentralImpulse(powerX, powerY, powerZ)
Add power to Rigid.
 
applyImpulse(powerX, powerY, powerZ, positonX, positonY, positonZ)
Add power to Rigid.
 
Stops Rigid object.
 
contactTest(rigid)
Collision detection with another Rigid object.
 
Kinematize Rigid.
 
Applies rotation expressed in quaternion to Rigid.
 
Set posture expressed in quaternion in Rigid.
 
scale(x, y, z)
Expand and contract Rigid.
 
translate(x, y, z)
Move Rigid in a parallel direciton.

Class Detail

enchant.gl.physics.Rigid(shape, mass, linearDamping, angularDamping)
Rigid body object. Add to World and activate.
Parameters:
shape
Ammo.btCollisionShape object.
{Number} mass
Mass of rigid object.
{Number} linearDamping
Rate of decay of speed on straight line speed of rigid object.
{Number} angularDamping
Rate of decay of angled speed of rigid object.
See:
enchant.gl.physics.RigidBox
enchant.gl.physics.RigidCube
enchant.gl.physics.RigidSphere
enchant.gl.physics.RigidCylinder
enchant.gl.physics.RigidCapsule
enchant.gl.physics.RigidPlane
enchant.gl.physics.RigidContainer

Field Detail

{Number} friction
Rigid frictions.
{Number} restitution
Rigid restitutions.
rigidBody
Ammo rigid body object
world
World that Rigid belongs to

Method Detail

  • activate(force)
    Make Rigid valid.
    Parameters:
    {Boolean} force
    Forcibly make valid.
  • applyCentralImpulse(powerX, powerY, powerZ)
    Add power to Rigid. Power is added to the center of Rigid.
    Parameters:
    {Number} powerX
    Power in x axis.
    {Number} powerY
    Power in y axis.
    {Number} powerZ
    Power in z axis.
  • applyImpulse(powerX, powerY, powerZ, positonX, positonY, positonZ)
    Add power to Rigid. Power is added to the specified position.
    Parameters:
    {Number} powerX
    x axis power.
    {Number} powerY
    y axis power.
    {Number} powerZ
    z axis power.
    {Number} positonX
    Coordinate on x axis to add power to.
    {Number} positonY
    Coordinate on y axis to add power to.
    {Number} positonZ
    Coordinate on z axis to add power to.
  • clearForces()
    Stops Rigid object.
  • {Boolean} contactTest(rigid)
    Collision detection with another Rigid object.
    Parameters:
    {enchant.gl.physics.Rigid} rigid
    Rigid to be judged.
    Returns:
    {Boolean} bool Presence or absence of rigid.
  • kinematize()
    Kinematize Rigid.
  • rotationApply(quat)
    Applies rotation expressed in quaternion to Rigid.
    Parameters:
    {enchant.gl.Quat} quat
  • rotationSet(quat)
    Set posture expressed in quaternion in Rigid.
    Parameters:
    {enchant.gl.Quat} quat
  • scale(x, y, z)
    Expand and contract Rigid. Expand or contract each axis the designated amount from the current rate of expansion in World.
    Parameters:
    {Number} x
    Rate of expansion on x axis.
    {Number} y
    Rate of expansion on y axis.
    {Number} z
    Rate of expansion on z axis.
  • translate(x, y, z)
    Move Rigid in a parallel direciton. Move the designated amount in a parallel direction along each axis from the current World position.
    Parameters:
    {Number} x
    Amount of parallel movement along x axis.
    {Number} y
    Amount of parallel movement along y axis.
    {Number} z
    Amount of parallel movement along z axis.