Maven module :un.api : api-physics :
Class : un.api.physic.body.RigidBody
Extends/Implements : un.api.physic.body.AbstractBody
Subclasses : -

Physic body, mix from various 3d format (collada,pmx,...)
Reference : Collada 1.5.0 (Chapter 6: Physics Reference,p.200)
Body with a regular shape and material.
author  Johann Sorel


Variables : UPDATE_LOCAL, UPDATE_PARENT, motion, material, geometry, updateMode, fixed
Functions : RigidBody, getMaterial, setMaterial, getGeometry, getUpdateMode, setUpdateMode, getMotion, getAcceleration, setFixed, isFixed, isFree, getWorldPosition, worldTranslate, worldRotate, transform, setWorldPosition, setRootToNodeSpace


public int UPDATE_LOCAL

public int UPDATE_PARENT

protected Motion motion

protected Material material

protected Geometry geometry

protected int updateMode

protected boolean fixed



param  geometry this body geometry, it will not be modified by physics
param  mass body mass
public void RigidBody (Geometry geometry, double mass)


Get rigid body material.
return  Material
public Material getMaterial ()


Set rigid body material.
param  material
public void setMaterial (Material material)


Get the body geometry.
return  Geometry
public Geometry getGeometry ()


Get the update mode for the setWorldToNodeTransform.
return  int , one of UPDATE_X
public int getUpdateMode ()


Set the update mode for the setWorldToNodeTransform.
param  mode , one of UPDATE_X
public void setUpdateMode (int updateMode)

public Motion getMotion ()


Calculate acceleration.
force * (1/mass)
param  buffer
return
public Vector getAcceleration (Vector buffer)

public void setFixed (boolean fixed)

public boolean isFixed ()

public boolean isFree ()

public Vector getWorldPosition (Vector buffer)


Translate body by given translation.
param  translation
public void worldTranslate (Vector translation)


Rotate body using given angular velocity.
param  rotation angular
public void worldRotate (Vector rotation)


transform body using given translation and angular velocity.
param  translation
param  rotation angular
public void transform (Vector translation, Vector rotation)

public void setWorldPosition (Vector ve)

public void setRootToNodeSpace (Matrix wtn)