|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.physics.PhysicalJoint
hmi.physics.ode.OdeJoint
public class OdeJoint
OdeJoint Note: axis2 (default: y axis) must always be limited between -0.5pi..0.5pi
| Field Summary | |
|---|---|
private org.odejava.Body |
box1
|
private org.odejava.Body |
box2
|
private org.odejava.JointGroup |
jointGroup
|
private org.odejava.Joint |
physicalJoint
|
private org.odejava.JointAMotor |
physicalMotor
|
private float[] |
q
|
private float[] |
w1
|
private float[] |
w2
|
private org.odejava.World |
world
|
| Fields inherited from class hmi.physics.PhysicalJoint |
|---|
axis1, axis2, hiStop, loStop, name, rotationBuffer, type |
| Constructor Summary | |
|---|---|
OdeJoint(JointType t,
String name,
org.odejava.World w,
org.odejava.JointGroup jg)
|
|
| Method Summary | |
|---|---|
void |
addTorque(float x,
float y,
float z)
Add a torque to this joint |
void |
attach(RigidBody b1,
RigidBody b2)
|
private void |
createJoint()
|
float[] |
getAnchor(float[] src)
Get the joints current anchor point, in world coordinates |
float |
getAngle(int axis)
Get the current rotation angle around axis axis |
void |
getAngularVelocity(float[] w)
Get the angular velocity of the joint, in joint coordinates |
void |
getAngularVelocity(float[] w,
int i)
Get the angular velocity of the joint, in joint coordinates |
void |
getForce1(float[] force)
Get the force applied to body 1 |
void |
getForce2(float[] force)
Get the torque applied to body 2 |
void |
getTorque1(float[] torque)
Get the torque applied to body 1 |
void |
getTorque2(float[] torque)
Get the torque applied to body 2 |
void |
setAnchor(float x,
float y,
float z)
Set the joint anchor point in world coordinates |
void |
setAxis(int axis,
float x,
float y,
float z)
Set the rotation axis |
void |
setDesiredVelocity(int axis,
float value)
Set the desired rotational velocity of a dof of a joint |
void |
setJointMax(int axis,
float max)
Sets the joint rotational limits of a dof/axis, range -pi..pi |
void |
setJointMin(int axis,
float min)
Sets the joint rotational limits of a dof/axis, range -pi..pi |
void |
setMaximumForce(int axis,
float value)
Sets the maximum force of a dof to use to gain the desired velocity |
| Methods inherited from class hmi.physics.PhysicalJoint |
|---|
getName, getRotation, getRotation, getRotationBuffer, getType, setName, setRotationBuffer, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private org.odejava.Joint physicalJoint
private org.odejava.JointAMotor physicalMotor
private org.odejava.JointGroup jointGroup
private org.odejava.World world
private org.odejava.Body box1
private org.odejava.Body box2
private float[] w1
private float[] w2
private float[] q
| Constructor Detail |
|---|
public OdeJoint(JointType t,
String name,
org.odejava.World w,
org.odejava.JointGroup jg)
| Method Detail |
|---|
private void createJoint()
public void getTorque1(float[] torque)
PhysicalJoint
getTorque1 in class PhysicalJointpublic void getTorque2(float[] torque)
PhysicalJoint
getTorque2 in class PhysicalJointpublic void getForce2(float[] force)
PhysicalJoint
getForce2 in class PhysicalJointpublic void getForce1(float[] force)
PhysicalJoint
getForce1 in class PhysicalJoint
public void addTorque(float x,
float y,
float z)
PhysicalJoint
addTorque in class PhysicalJointpublic float getAngle(int axis)
PhysicalJoint
getAngle in class PhysicalJointaxis - the axis
public void setDesiredVelocity(int axis,
float value)
PhysicalJoint
setDesiredVelocity in class PhysicalJointaxis - the axis/dofvalue - the desired rotational velocity
public void setMaximumForce(int axis,
float value)
PhysicalJoint
setMaximumForce in class PhysicalJointaxis - the axis/dofvalue - the maximum force
public void setJointMin(int axis,
float min)
PhysicalJoint
setJointMin in class PhysicalJointaxis - the dof/axismin - minimum rotation
public void setJointMax(int axis,
float max)
PhysicalJoint
setJointMax in class PhysicalJointaxis - the dof/axismax - maximum rotation
public void setAxis(int axis,
float x,
float y,
float z)
PhysicalJoint
setAxis in class PhysicalJointaxis - axis 0>=nr>=2, axis 3 is set automaticallyx - xy - yz - zpublic float[] getAnchor(float[] src)
PhysicalJoint
getAnchor in class PhysicalJointsrc - float[3] to copy in, null means create new
public void setAnchor(float x,
float y,
float z)
PhysicalJoint
setAnchor in class PhysicalJoint
public void attach(RigidBody b1,
RigidBody b2)
public void getAngularVelocity(float[] w)
PhysicalJoint
getAngularVelocity in class PhysicalJointw - the angular velocity
public void getAngularVelocity(float[] w,
int i)
PhysicalJoint
getAngularVelocity in class PhysicalJointw - the angular velocity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||