|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.physics.PhysicalJoint
public abstract class PhysicalJoint
PhysicalJoint
| Field Summary | |
|---|---|
(package private) float[] |
a1
|
(package private) float[] |
a2
|
(package private) float[] |
a3
|
(package private) float[] |
ax1
|
(package private) float[] |
ax2
|
(package private) float[] |
ax3
|
protected float[] |
axis1
|
protected float[] |
axis2
|
protected float[] |
hiStop
|
protected float[] |
loStop
|
protected String |
name
|
private float[] |
q2
|
private float[] |
q3
|
protected float[] |
rotationBuffer
|
protected JointType |
type
|
| Constructor Summary | |
|---|---|
PhysicalJoint(JointType t,
String n)
Constructor |
|
| Method Summary | |
|---|---|
abstract void |
addTorque(float x,
float y,
float z)
Add a torque to this joint |
abstract float[] |
getAnchor(float[] src)
Get the joints current anchor point, in world coordinates |
abstract float |
getAngle(int axis)
Get the current rotation angle around axis axis |
abstract void |
getAngularVelocity(float[] w)
Get the angular velocity of the joint, in joint coordinates |
abstract void |
getAngularVelocity(float[] w,
int i)
Get the angular velocity of the joint, in joint coordinates |
abstract void |
getForce1(float[] force1)
Get the force applied to body 1 |
abstract void |
getForce2(float[] force2)
Get the torque applied to body 2 |
String |
getName()
|
void |
getRotation(float[] q)
Get the rotation of the joint in local coordinates |
void |
getRotation(float[] q,
int i)
Get the rotation of the joint in local coordinates |
float[] |
getRotationBuffer()
get the current rotation buffer |
abstract void |
getTorque1(float[] torque1)
Get the torque applied to body 1 |
abstract void |
getTorque2(float[] torque2)
Get the torque applied to body 2 |
JointType |
getType()
|
abstract void |
setAnchor(float x,
float y,
float z)
Set the joint anchor point in world coordinates |
void |
setAxis(int ax,
float x,
float y,
float z)
Set the rotation axis |
abstract void |
setDesiredVelocity(int axis,
float value)
Set the desired rotational velocity of a dof of a joint |
void |
setJointMax(int ax,
float max)
Sets the joint rotational limits of a dof/axis, range -pi..pi |
void |
setJointMin(int ax,
float min)
Sets the joint rotational limits of a dof/axis, range -pi..pi |
abstract void |
setMaximumForce(int axis,
float value)
Sets the maximum force of a dof to use to gain the desired velocity |
void |
setName(String name)
|
void |
setRotationBuffer(float[] rotationBuffer)
Set the rotation buffer to which this joint should write it's physical simulation info (=joint rotation after a simulation step). |
String |
toString()
Get the joint name |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected JointType type
protected String name
protected float[] rotationBuffer
protected float[] axis1
protected float[] axis2
protected float[] hiStop
protected float[] loStop
private float[] q2
private float[] q3
float[] a1
float[] a2
float[] a3
float[] ax1
float[] ax2
float[] ax3
| Constructor Detail |
|---|
public PhysicalJoint(JointType t,
String n)
t - typen - name| Method Detail |
|---|
public JointType getType()
public abstract void getTorque1(float[] torque1)
public abstract void getTorque2(float[] torque2)
public abstract void getForce1(float[] force1)
public abstract void getForce2(float[] force2)
public abstract void addTorque(float x,
float y,
float z)
x - y - z - public abstract float getAngle(int axis)
axis - the axis
public abstract void setDesiredVelocity(int axis,
float value)
axis - the axis/dofvalue - the desired rotational velocity
public abstract void setMaximumForce(int axis,
float value)
axis - the axis/dofvalue - the maximum force
public void setJointMin(int ax,
float min)
ax - the dof/axismin - minimum rotation
public void setJointMax(int ax,
float max)
ax - the dof/axismax - maximum rotation
public void setAxis(int ax,
float x,
float y,
float z)
ax - axis 0>=nr>=2, axis 3 is set automaticallyx - xy - yz - z
public abstract void setAnchor(float x,
float y,
float z)
x - y - z - public abstract float[] getAnchor(float[] src)
src - float[3] to copy in, null means create new
public String toString()
toString in class Objectpublic String getName()
public void setName(String name)
name - the name to setpublic void setRotationBuffer(float[] rotationBuffer)
rotationBuffer - the bufferpublic float[] getRotationBuffer()
public void getRotation(float[] q)
q - output: the joint rotationpublic abstract void getAngularVelocity(float[] w)
w - the angular velocity
public abstract void getAngularVelocity(float[] w,
int i)
w - the angular velocity
public void getRotation(float[] q,
int i)
q - output: the joint rotation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||