|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.Joint
public abstract class Joint
In real life a joint is something like a hinge, that is used to connect two objects. In ODE a joint is very similar: It is a relationship that is enforced between two bodies so that they can only have certain positions and orientations relative to each other.
Created 20.12.2003 (dd.mm.yyyy)
| Field Summary | |
|---|---|
protected Body |
body1
The first body that this joint is attached to. |
protected Body |
body2
The second body that this joint is attached to. |
protected static String |
BOUNCE_RANGE_MSG
Error message when the bounce range is negative |
protected boolean |
deleted
Flag indicating that this joint has been requested to be deleted. |
protected JointFeedback |
feedback
Dataholder for acquiring feedback information when the user has enabled feedback tracking. |
protected JointGroup |
group
If the user provided a joint group to create the joint with, this will reference the group it is a part of. |
protected org.odejava.ode.SWIGTYPE_p_dJointGroupID |
jointGroupId
The ID of the group that this joint belongs to. |
protected org.odejava.ode.SWIGTYPE_p_dJointID |
jointId
The ODE ID of this joint object. |
protected String |
name
An arbitrary, user-defined name string for the joint. |
| Constructor Summary | |
|---|---|
Joint(String name,
JointGroup jointGroup)
Create a new joint with a given name label and an optional group that it is a member of. |
|
| Method Summary | |
|---|---|
void |
attach(Body body1,
Body body2)
Attach this joint to the two bodies. |
void |
delete()
Request deletion of this joint. |
void |
enableFeedbackTracking()
Create a JointFeedback object and associate it with this joint. |
void |
enableFeedbackTracking(boolean state)
Modify the current joint feedback tracking state. |
Body |
getBody1()
Returns the first body this joint is connected to. |
Body |
getBody2()
Returns the second body this joint is connected to. |
JointFeedback |
getFeedback()
Return detailed information about this joint from the last simulation step. |
JointGroup |
getGroup()
Returns the JointGroup that this joint was attached to when created. |
String |
getName()
Get the currently set name of this joint. |
float |
getParam(int parameter)
Get an unchecked parameter value directly from this joint. |
boolean |
isFeedbackTrackingEnabled()
Check to see if feedback tracking is currently enabled. |
void |
setAxis1(float x,
float y,
float z)
|
void |
setAxis2(float x,
float y,
float z)
|
void |
setName(String name)
Set a new custom name for this joint. |
void |
setParam(int parameter,
float value)
Set a generic, unchecked, parameter directly for this joint. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String BOUNCE_RANGE_MSG
protected org.odejava.ode.SWIGTYPE_p_dJointGroupID jointGroupId
protected org.odejava.ode.SWIGTYPE_p_dJointID jointId
protected String name
protected JointGroup group
protected Body body1
protected Body body2
protected JointFeedback feedback
protected boolean deleted
| Constructor Detail |
|---|
public Joint(String name,
JointGroup jointGroup)
name - A label string to associate with this jointjointGroup - An optional group to associate this joint with| Method Detail |
|---|
public void attach(Body body1,
Body body2)
body1 - The first body reference to attach tobody2 - The second body reference to attach topublic void delete()
public String getName()
public void setName(String name)
name - The new name string to set.public void enableFeedbackTracking()
public void enableFeedbackTracking(boolean state)
state - true to enable feedback tracking, false to disablepublic boolean isFeedbackTrackingEnabled()
public JointFeedback getFeedback()
public JointGroup getGroup()
public Body getBody1()
public Body getBody2()
public void setParam(int parameter,
float value)
OdeConstants. The default implementation in this
class does not support any parameters, and is implemented as an empty
method that silently ignores the request.
parameter - A parameter constant from OdeConstantsvalue - The new value to associate with the parameterpublic float getParam(int parameter)
OdeConstants. The default implementation in this
class does not support any parameters, and shall always return zero.
parameter - A constant describing the parameter to fetch
public void setAxis1(float x,
float y,
float z)
public void setAxis2(float x,
float y,
float z)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||