|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.physics.RigidBody
public abstract class RigidBody
Rigid body
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hmi.animation.VObject |
|---|
VObject.Predicate |
| Field Summary | |
|---|---|
protected ArrayList<CollisionShape> |
collisionShapes
|
protected String |
id
|
protected String |
name
|
protected ArrayList<float[]> |
rotationBuffer
|
protected String |
sid
|
protected ArrayList<float[]> |
translationBuffer
|
| Constructor Summary | |
|---|---|
RigidBody()
|
|
| Method Summary | |
|---|---|
abstract CollisionBox |
addBox(float[] halfExtends)
Add a collision box to the local origin |
abstract CollisionBox |
addBox(float[] q,
float[] tr,
float[] halfExtends)
Adds a collision box |
abstract CollisionCapsule |
addCapsule(float[] q,
float[] tr,
float radius,
float height)
Adds a collision capsule, aligned with y-axis |
abstract CollisionCapsule |
addCapsule(float radius,
float height)
Adds a collision capsule, aligned with y-axis |
void |
addForce(float[] force)
|
abstract void |
addForce(float x,
float y,
float z)
|
void |
addForceAtPos(float[] force,
float[] pos)
|
abstract void |
addForceAtPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
|
void |
addForceAtRelPos(float[] force,
float[] pos)
|
abstract void |
addForceAtRelPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
|
void |
addRelForce(float[] force)
|
abstract void |
addRelForce(float x,
float y,
float z)
|
void |
addRelForceAtRelPos(float[] force,
float[] pos)
|
abstract void |
addRelForceAtRelPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
|
void |
addRelTorque(float[] t)
|
abstract void |
addRelTorque(float x,
float y,
float z)
|
void |
addRotationBuffer(float[] rotBuf)
|
abstract CollisionSphere |
addSphere(float radius)
Adds a collision sphere at the local origin |
abstract CollisionSphere |
addSphere(float[] tr,
float radius)
Adds a collision capsule, aligned with y-axis |
void |
addTorque(float[] t)
|
abstract void |
addTorque(float x,
float y,
float z)
|
void |
addTranslationBuffer(float[] transBuf)
|
abstract void |
adjustMass(float mass)
Sets the new mass |
void |
clear()
prepares the body for removal |
void |
copy()
|
abstract Mass |
createMass()
|
abstract void |
getAngularVelocity(float[] result)
Returns the angular velocity vector in the form of a float array of length three. |
abstract void |
getAngularVelocity(float[] vc,
int vcIndex)
Like getAngularVelocity(wa), but starting at the specified offset. |
ArrayList<CollisionShape> |
getCollisionShapes()
|
abstract void |
getCOM(float[] com)
|
abstract void |
getForce(float[] force)
|
String |
getId()
Returns an interned String that specifies the id. |
abstract void |
getInertiaTensor(float[] I)
|
abstract float |
getMass()
|
String |
getName()
Returns an interned String that specifies the name. |
abstract void |
getPointRelPosition(float[] dst,
float[] point)
Gets the world position of a point on the body, returns the result in dst |
abstract void |
getPointVelocity(float[] dst,
float[] point)
Get the velocity of a point on the rigid body, returns the result in dst |
abstract void |
getRelativePointVelocity(float[] dst,
float[] point)
Get the velocity of a point on the rigid body, in coordinates relative to the body. |
abstract void |
getRotation(float[] result)
Returns the rotation quaternion in a float array of length four. |
abstract void |
getRotation(float[] r,
int index)
Like getRotation(ra), but starting at the specified offset. |
float[] |
getRotationBuffer()
|
void |
getScale(float[] r)
Returns the scale vector in a float array of length three. |
void |
getScale(float[] r,
int index)
Like getScale(sa), but starting at the specified offset. |
float[] |
getScaleBuffer()
|
String |
getSid()
Returns an interned String that specifies the sid. |
abstract void |
getTorque(float[] torque)
|
abstract void |
getTranslation(float[] pos)
Returns the translation vector in the form of a float array of length three |
float[] |
getTranslationBuffer()
|
abstract void |
getVelocity(float[] result)
Returns the velocity vector in the form of a float array of length three. |
abstract void |
removeCollisionShape(CollisionShape s)
Removes a collision shape |
abstract void |
rotateInertiaTensor(float[] q)
|
void |
setAngularVelocity(float[] aVel)
Sets the angular velocity vector from a float array of length three. |
void |
setAngularVelocity(float[] vc,
int vcIndex)
Like setAngularVelocity(wa), but starting at the specified offset. |
abstract void |
setAngularVelocity(float x,
float y,
float z)
Sets the angular velocity vector from three floats. |
void |
setAxisAngle(float ax,
float ay,
float az,
float angle)
Sets the rotation quaternion derived from a rotation axis (ax, ay, az) and a rotation angle angle, specified in radians. |
abstract void |
setCOM(float[] com)
|
abstract void |
setEnabled(boolean enabled)
Disables or enables the body. |
abstract void |
setForce(float x,
float y,
float z)
|
void |
setId(String id)
Sets the id for this VObject. |
abstract void |
setInertiaTensor(float[] I)
|
void |
setMass(Mass m)
|
void |
setName(String n)
Sets the name for this VObject. |
void |
setRotation(float[] rot)
Sets the rotation quaternion from a float array of length four. |
void |
setRotation(float[] ra,
int raIndex)
Like setRotation(ra), but starting at the specified offset. |
abstract void |
setRotation(float w,
float x,
float y,
float z)
Sets the rotation quaternion from four floats. |
void |
setScale(float[] sa)
Sets the scale vector from a float array of lebgth three. |
void |
setScale(float[] sa,
int saIndex)
Like setScale(sa), but starting at the specified offset |
void |
setSid(String sid)
Sets the sid for this VObject. |
abstract void |
setTorque(float x,
float y,
float z)
|
void |
setTranslation(float[] pos)
Sets the translation vector from a float array of length three. |
void |
setTranslation(float[] ta,
int taIndex)
Like setTranslation(ta), but starting at the specified offset. |
abstract void |
setTranslation(float x,
float y,
float z)
Sets the current translation vector from three floats. |
void |
setVelocity(float[] velocity)
Sets the velocity vector from a float array of length three. |
void |
setVelocity(float[] vc,
int vcIndex)
Like setVelocity(va), but starting at the specified offset. |
abstract void |
setVelocity(float x,
float y,
float z)
Sets the velocity vector from three floats. |
abstract void |
translateInertiaTensor(float[] v)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hmi.animation.VObject |
|---|
getTranslation, getVelocity |
| Field Detail |
|---|
protected ArrayList<float[]> rotationBuffer
protected ArrayList<float[]> translationBuffer
protected ArrayList<CollisionShape> collisionShapes
protected String id
protected String sid
protected String name
| Constructor Detail |
|---|
public RigidBody()
| Method Detail |
|---|
public String getName()
VObject
getName in interface VObjectpublic void setName(String n)
VObject
setName in interface VObjectpublic void setMass(Mass m)
public void copy()
public void clear()
public abstract CollisionBox addBox(float[] halfExtends)
halfExtends - half-sizes along x,y,z
public abstract CollisionBox addBox(float[] q,
float[] tr,
float[] halfExtends)
q - local rotationtr - local translationhalfExtends - half-sizes along x,y,zpublic abstract CollisionSphere addSphere(float radius)
radius - radius of the sphere
public abstract CollisionSphere addSphere(float[] tr,
float radius)
tr - local translationradius - radius of the balls and cylinder
public abstract CollisionCapsule addCapsule(float[] q,
float[] tr,
float radius,
float height)
q - local rotationtr - local translationradius - radius of the balls and cylinderheight - (on y-axis)
public abstract CollisionCapsule addCapsule(float radius,
float height)
radius - radius of the balls and cylinderheight - (on y-axis) of the cylinderpublic abstract void removeCollisionShape(CollisionShape s)
public void addRotationBuffer(float[] rotBuf)
rotBuf - the rotationBuffer to setpublic void addTranslationBuffer(float[] transBuf)
transBuf - the translationBuffer to setpublic abstract void setEnabled(boolean enabled)
public abstract void getCOM(float[] com)
public abstract void getInertiaTensor(float[] I)
public abstract void setCOM(float[] com)
public abstract void setInertiaTensor(float[] I)
public abstract void rotateInertiaTensor(float[] q)
public abstract void translateInertiaTensor(float[] v)
public abstract float getMass()
public abstract void getTorque(float[] torque)
public abstract void getForce(float[] force)
public abstract void setTranslation(float x,
float y,
float z)
VObject
setTranslation in interface VObjectpublic void setTranslation(float[] pos)
VObject
setTranslation in interface VObject
public void setTranslation(float[] ta,
int taIndex)
VObject
setTranslation in interface VObjectpublic abstract void getTranslation(float[] pos)
VObject
getTranslation in interface VObject
public abstract void setRotation(float w,
float x,
float y,
float z)
VObject
setRotation in interface VObjectpublic void setRotation(float[] rot)
VObject
setRotation in interface VObject
public void setRotation(float[] ra,
int raIndex)
VObject
setRotation in interface VObject
public void setAxisAngle(float ax,
float ay,
float az,
float angle)
VObject
setAxisAngle in interface VObjectpublic abstract void getRotation(float[] result)
VObject
getRotation in interface VObject
public abstract void getRotation(float[] r,
int index)
VObject
getRotation in interface VObject
public abstract void setAngularVelocity(float x,
float y,
float z)
VObject
setAngularVelocity in interface VObjectpublic void setAngularVelocity(float[] aVel)
VObject
setAngularVelocity in interface VObject
public void setAngularVelocity(float[] vc,
int vcIndex)
VObject
setAngularVelocity in interface VObjectpublic abstract void getAngularVelocity(float[] result)
VObject
getAngularVelocity in interface VObject
public abstract void getAngularVelocity(float[] vc,
int vcIndex)
VObject
getAngularVelocity in interface VObject
public abstract void setVelocity(float x,
float y,
float z)
VObject
setVelocity in interface VObjectpublic void setVelocity(float[] velocity)
VObject
setVelocity in interface VObject
public void setVelocity(float[] vc,
int vcIndex)
VObject
setVelocity in interface VObjectpublic abstract void getVelocity(float[] result)
VObject
getVelocity in interface VObject
public abstract void setForce(float x,
float y,
float z)
public abstract void addForce(float x,
float y,
float z)
public void addForce(float[] force)
public abstract void addRelForce(float x,
float y,
float z)
public void addRelForce(float[] force)
public abstract void addForceAtPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
public void addForceAtPos(float[] force,
float[] pos)
public abstract void addForceAtRelPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
public void addForceAtRelPos(float[] force,
float[] pos)
public abstract void addRelForceAtRelPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
public void addRelForceAtRelPos(float[] force,
float[] pos)
public abstract void setTorque(float x,
float y,
float z)
public abstract void addTorque(float x,
float y,
float z)
public void addTorque(float[] t)
public abstract void addRelTorque(float x,
float y,
float z)
public void addRelTorque(float[] t)
public abstract void adjustMass(float mass)
public abstract void getRelativePointVelocity(float[] dst,
float[] point)
public abstract void getPointVelocity(float[] dst,
float[] point)
public abstract void getPointRelPosition(float[] dst,
float[] point)
public ArrayList<CollisionShape> getCollisionShapes()
public String getId()
VObject
getId in interface VObjectpublic String getSid()
VObject
getSid in interface VObjectpublic void setId(String id)
VObject
setId in interface VObjectpublic void setSid(String sid)
VObject
setSid in interface VObjectpublic void setScale(float[] sa)
VObject
setScale in interface VObject
public void setScale(float[] sa,
int saIndex)
VObject
setScale in interface VObjectpublic float[] getTranslationBuffer()
public void getScale(float[] r)
VObject
getScale in interface VObject
public void getScale(float[] r,
int index)
VObject
getScale in interface VObjectpublic float[] getScaleBuffer()
public float[] getRotationBuffer()
public abstract Mass createMass()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||