|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.physics.RigidBody
hmi.physics.ode.OdeRigidBody
public class OdeRigidBody
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hmi.animation.VObject |
|---|
VObject.Predicate |
| Field Summary | |
|---|---|
private org.odejava.Body |
body
|
private org.slf4j.Logger |
logger
|
private OdeMass |
mass
|
private int |
shapeNr
|
private org.odejava.Space |
space
|
private float[] |
tempq
|
private float[] |
tempv
|
private org.odejava.World |
world
|
| Fields inherited from class hmi.physics.RigidBody |
|---|
collisionShapes, id, name, rotationBuffer, sid, translationBuffer |
| Constructor Summary | |
|---|---|
OdeRigidBody(String n,
org.odejava.World w,
org.odejava.Space s)
Constructor |
|
| Method Summary | |
|---|---|
OdeCollisionBox |
addBox(float[] halfExtends)
Add a collision box to the local origin |
OdeCollisionBox |
addBox(float[] q,
float[] tr,
float[] halfExtends)
Adds a collision box |
OdeCollisionCapsule |
addCapsule(float[] q,
float[] tr,
float radius,
float height)
Adds a collision capsule, aligned with y-axis |
OdeCollisionCapsule |
addCapsule(float radius,
float height)
Adds a collision capsule, aligned with y-axis |
private void |
addCollisionGeom(org.odejava.PlaceableGeom g)
|
void |
addForce(float x,
float y,
float z)
|
void |
addForceAtPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
|
void |
addForceAtRelPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
|
void |
addRelForce(float x,
float y,
float z)
|
void |
addRelForceAtRelPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
|
void |
addRelTorque(float x,
float y,
float z)
|
OdeCollisionSphere |
addSphere(float radius)
Adds a collision sphere at the local origin |
OdeCollisionSphere |
addSphere(float[] tr,
float radius)
Adds a collision capsule, aligned with y-axis |
void |
addTorque(float x,
float y,
float z)
|
void |
adjustMass(float m)
Sets the new mass |
protected void |
checkForce(float x,
float y,
float z)
|
void |
clear()
prepares the body for removal |
Mass |
createMass()
|
void |
getAngularVelocity(float[] result)
Returns the angular velocity vector in the form of a float array of length three. |
void |
getAngularVelocity(float[] vc,
int vcIndex)
Like getAngularVelocity(wa), but starting at the specified offset. |
org.odejava.Body |
getBody()
|
void |
getCOM(float[] com)
|
void |
getForce(float[] force)
|
void |
getInertiaTensor(float[] I)
|
float |
getMass()
|
void |
getPointRelPosition(float[] dst,
float[] point)
Gets the world position of a point on the body, returns the result in dst |
void |
getPointVelocity(float[] dst,
float[] point)
Get the velocity of a point on the rigid body, returns the result in dst |
void |
getRelativePointVelocity(float[] dst,
float[] point)
Get the velocity of a point on the rigid body, in coordinates relative to the body. |
void |
getRotation(float[] result)
Returns the rotation quaternion in a float array of length four. |
void |
getRotation(float[] result,
int idx)
Like getRotation(ra), but starting at the specified offset. |
void |
getTorque(float[] torque)
|
void |
getTranslation(float[] pos)
Returns the translation vector in the form of a float array of length three |
void |
getTranslation(float[] pos,
int idx)
Like getTranslation(ta), but starting at the specified offset |
void |
getVelocity(float[] result)
Returns the velocity vector in the form of a float array of length three. |
void |
getVelocity(float[] result,
int idx)
Like getVelocity(va), but starting at the specified offset. |
private void |
removeCollisionGeom(org.odejava.PlaceableGeom g)
|
void |
removeCollisionShape(CollisionShape s)
Removes a collision shape |
void |
rotateInertiaTensor(float[] q)
|
void |
setAngularVelocity(float x,
float y,
float z)
Sets the angular velocity vector from three floats. |
void |
setCOM(float[] com)
|
void |
setEnabled(boolean enabled)
Disables or enables the body. |
void |
setForce(float x,
float y,
float z)
|
void |
setId(String n)
Sets the id for this VObject. |
void |
setInertiaTensor(float[] I)
|
void |
setMass(OdeMass m)
|
void |
setRotation(float w,
float x,
float y,
float z)
Sets the rotation quaternion from four floats. |
void |
setTorque(float x,
float y,
float z)
|
void |
setTranslation(float x,
float y,
float z)
Sets the current translation vector from three floats. |
void |
setVelocity(float x,
float y,
float z)
Sets the velocity vector from three floats. |
void |
translateInertiaTensor(float[] v)
|
| Methods inherited from class hmi.physics.RigidBody |
|---|
addForce, addForceAtPos, addForceAtRelPos, addRelForce, addRelForceAtRelPos, addRelTorque, addRotationBuffer, addTorque, addTranslationBuffer, copy, getCollisionShapes, getId, getName, getRotationBuffer, getScale, getScale, getScaleBuffer, getSid, getTranslationBuffer, setAngularVelocity, setAngularVelocity, setAxisAngle, setMass, setName, setRotation, setRotation, setScale, setScale, setSid, setTranslation, setTranslation, setVelocity, setVelocity |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.odejava.Body body
private org.odejava.World world
private org.odejava.Space space
private OdeMass mass
private int shapeNr
private float[] tempv
private float[] tempq
private org.slf4j.Logger logger
| Constructor Detail |
|---|
public OdeRigidBody(String n,
org.odejava.World w,
org.odejava.Space s)
n - new name, id, sidw - ODE worlds - ODE space| Method Detail |
|---|
public float getMass()
getMass in class RigidBodypublic void setMass(OdeMass m)
public void setId(String n)
VObject
setId in interface VObjectsetId in class RigidBody
public void setTranslation(float x,
float y,
float z)
VObject
setTranslation in interface VObjectsetTranslation in class RigidBody
public void setRotation(float w,
float x,
float y,
float z)
VObject
setRotation in interface VObjectsetRotation in class RigidBody
public void setAngularVelocity(float x,
float y,
float z)
VObject
setAngularVelocity in interface VObjectsetAngularVelocity in class RigidBody
public void setForce(float x,
float y,
float z)
setForce in class RigidBody
protected void checkForce(float x,
float y,
float z)
public void addForce(float x,
float y,
float z)
addForce in class RigidBody
public void addForceAtRelPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
addForceAtRelPos in class RigidBody
public void addForceAtPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
addForceAtPos in class RigidBody
public void setVelocity(float x,
float y,
float z)
VObject
setVelocity in interface VObjectsetVelocity in class RigidBody
public void setTorque(float x,
float y,
float z)
setTorque in class RigidBody
public void addTorque(float x,
float y,
float z)
addTorque in class RigidBodypublic org.odejava.Body getBody()
public void getTranslation(float[] pos)
VObject
getTranslation in interface VObjectgetTranslation in class RigidBody
public void getTranslation(float[] pos,
int idx)
VObject
private void addCollisionGeom(org.odejava.PlaceableGeom g)
private void removeCollisionGeom(org.odejava.PlaceableGeom g)
public void getRotation(float[] result)
VObject
getRotation in interface VObjectgetRotation in class RigidBody
public void getRotation(float[] result,
int idx)
VObject
getRotation in interface VObjectgetRotation in class RigidBodypublic void getAngularVelocity(float[] result)
VObject
getAngularVelocity in interface VObjectgetAngularVelocity in class RigidBody
public void getAngularVelocity(float[] vc,
int vcIndex)
VObject
getAngularVelocity in interface VObjectgetAngularVelocity in class RigidBodypublic void getVelocity(float[] result)
VObject
getVelocity in interface VObjectgetVelocity in class RigidBody
public void getVelocity(float[] result,
int idx)
VObject
public void adjustMass(float m)
RigidBody
adjustMass in class RigidBodypublic OdeCollisionBox addBox(float[] halfExtends)
RigidBody
addBox in class RigidBodyhalfExtends - half-sizes along x,y,z
public OdeCollisionBox addBox(float[] q,
float[] tr,
float[] halfExtends)
RigidBody
addBox in class RigidBodyq - local rotationtr - local translationhalfExtends - half-sizes along x,y,z
public OdeCollisionCapsule addCapsule(float[] q,
float[] tr,
float radius,
float height)
RigidBody
addCapsule in class RigidBodyq - local rotationtr - local translationradius - radius of the balls and cylinderheight - (on y-axis)
public OdeCollisionCapsule addCapsule(float radius,
float height)
RigidBody
addCapsule in class RigidBodyradius - radius of the balls and cylinderheight - (on y-axis) of the cylinder
public OdeCollisionSphere addSphere(float[] tr,
float radius)
RigidBody
addSphere in class RigidBodytr - local translationradius - radius of the balls and cylinderpublic OdeCollisionSphere addSphere(float radius)
RigidBody
addSphere in class RigidBodyradius - radius of the spherepublic void getCOM(float[] com)
getCOM in class RigidBodypublic void getInertiaTensor(float[] I)
getInertiaTensor in class RigidBodypublic void setCOM(float[] com)
setCOM in class RigidBodypublic void setInertiaTensor(float[] I)
setInertiaTensor in class RigidBodypublic void removeCollisionShape(CollisionShape s)
RigidBody
removeCollisionShape in class RigidBodypublic void clear()
RigidBody
clear in class RigidBody
public void getPointRelPosition(float[] dst,
float[] point)
RigidBody
getPointRelPosition in class RigidBody
public void getPointVelocity(float[] dst,
float[] point)
RigidBody
getPointVelocity in class RigidBody
public void getRelativePointVelocity(float[] dst,
float[] point)
RigidBody
getRelativePointVelocity in class RigidBody
public void addRelTorque(float x,
float y,
float z)
addRelTorque in class RigidBodypublic void getTorque(float[] torque)
getTorque in class RigidBodypublic void getForce(float[] force)
getForce in class RigidBodypublic void setEnabled(boolean enabled)
RigidBody
setEnabled in class RigidBody
public void addRelForce(float x,
float y,
float z)
addRelForce in class RigidBody
public void addRelForceAtRelPos(float fx,
float fy,
float fz,
float px,
float py,
float pz)
addRelForceAtRelPos in class RigidBodypublic void rotateInertiaTensor(float[] q)
rotateInertiaTensor in class RigidBodypublic void translateInertiaTensor(float[] v)
translateInertiaTensor in class RigidBodypublic Mass createMass()
createMass in class RigidBody
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||