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

Class enchant.gl.physics.PhySprite3D

Class Summary
Constructor Attributes Constructor Name and Description
 
Physical Sprite.
Field Summary
Field Attributes Field Name and Description
 
PhySprite3D frictions.
 
PhySprite3D restitutions.

Method Summary

Method Attributes Method Name and Description
 
applyCentralImpulse(powerX, powerY, powerZ)
Add power to rigid body.
 
applyImpulse(powerX, powerY, powerZ, positonX, positonY, positonZ)
Add power to rigid body.
 
 
contactTest(sprite)
Collision detection with another PhySprite3D.
 
Kinematize Rigid.
 
Rotation line acquired from quaternion is applied in rotation line.
 
Set rotation line acquired from quaternion in rotation line.
 
scale(x, y, z)
Expand and contract PhySprite3D.
 
translate(x, y, z)
Move PhySprite3D horizontally.

Class Detail

enchant.gl.physics.PhySprite3D(rigid)
Physical Sprite. If you add to PhySprite3D, physical calculation will be applied when stepSimulation is called up.
Parameters:
{enchant.gl.physics.Rigid} rigid
See:
enchant.gl.physics.PhyBox
enchant.gl.physics.PhyCube
enchant.gl.physics.PhySphere
enchant.gl.physics.PhyCylinder
enchant.gl.physics.PhyCapsule
enchant.gl.physics.PhyPlane
enchant.gl.physics.PhyContainer

Field Detail

{Number} friction
PhySprite3D frictions.
See:
enchant.gl.physics.Rigid#friction
{Number} restitution
PhySprite3D restitutions.
See:
enchant.gl.physics.Rigid#restitution

Method Detail

  • applyCentralImpulse(powerX, powerY, powerZ)
    Add power to rigid body. Power is added to center of rigid body.
    Parameters:
    {Number} powerX
    Power on x axis.
    {Number} powerY
    Power on y axis.
    {Number} powerZ
    Power on z axis.
    See:
    enchant.gl.physics.Rigid#applyCentralImpulse
  • applyImpulse(powerX, powerY, powerZ, positonX, positonY, positonZ)
    Add power to rigid body. Power is added to designated position.
    Parameters:
    {Number} powerX
    x axis power.
    {Number} powerY
    y axis power.
    {Number} powerZ
    z axis power.
    {Number} positonX
    x coordinates to which power is added.
    {Number} positonY
    y coordinates to which power is added.
    {Number} positonZ
    z coordinates to which power is added.
    See:
    enchant.gl.physics.Rigid#applyImpulse
  • clearForces()
  • {Boolean} contactTest(sprite)
    Collision detection with another PhySprite3D.
    Parameters:
    {enchant.gl.physics.PhySprite3D} sprite
    PhySprite3D to be detected.
    Returns:
    {Boolean} bool Presence or absence of collision.
  • kinematize()
    Kinematize Rigid.
  • rotationApply(quat)
    Rotation line acquired from quaternion is applied in rotation line. Posture in World will also be changed.
    Parameters:
    {enchant.gl.Quat} quat
  • rotationSet(quat)
    Set rotation line acquired from quaternion in rotation line. Posture in World will also be changed.
    Parameters:
    {enchant.gl.Quat} quat
  • scale(x, y, z)
    Expand and contract PhySprite3D. The expansion rate displayed on the expansion rate in World will be changed at the same time.
    Parameters:
    {Number} x
    x axis expansion rate.
    {Number} y
    y axis expansion rate.
    {Number} z
    z axis expansion rate.
  • translate(x, y, z)
    Move PhySprite3D horizontally. Displayed position and World position will be changed.
    Parameters:
    {Number} x
    Amount of parallel movement on x axis.
    {Number} y
    Amount of parallel movement on y axis.
    {Number} z
    Amount of parallel movement on z axis.