|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DJoint
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. This relationship is called a constraint -- the words joint and constraint are often used interchangeably.
A joint has a set of parameters that can be set. These include:
Nested Class Summary | |
---|---|
static class |
DJoint.DJointFeedback
|
static class |
DJoint.PARAM
|
static class |
DJoint.PARAM_GROUPS
|
static class |
DJoint.PARAM_N
|
Field Summary | |
---|---|
static int |
P_OFS_1
|
static int |
P_OFS_2
|
static int |
P_OFS_3
|
Method Summary | |
---|---|
void |
attach(DBody body1,
DBody body2)
Attach the joint to some new bodies. |
void |
DESTRUCTOR()
|
void |
disable()
Manually disable a joint. |
void |
enable()
Manually enable a joint. |
DBody |
getBody(int index)
Return the bodies that this joint connects. |
java.lang.Object |
getData()
Get the user-data pointer. |
DJoint.DJointFeedback |
getFeedback()
Gets the datastructure that is to receive the feedback. |
int |
getNumBodies()
Return the number of bodies attached to the joint. |
double |
getParam(DJoint.PARAM_N type)
get joint parameter |
boolean |
isEnabled()
Check whether a joint is enabled. |
void |
setData(java.lang.Object data)
Set the user-data pointer. |
void |
setFeedback(DJoint.DJointFeedback fb)
Sets the datastructure that is to receive the feedback. |
void |
setParam(DJoint.PARAM_N type,
double value)
If not implemented it will do nothing as describe in the doc. |
Field Detail |
---|
static final int P_OFS_1
static final int P_OFS_2
static final int P_OFS_3
Method Detail |
---|
void DESTRUCTOR()
int getNumBodies()
void attach(DBody body1, DBody body2)
void setData(java.lang.Object data)
java.lang.Object getData()
DBody getBody(int index)
index
- return the first (0) or second (1) body.void setFeedback(DJoint.DJointFeedback fb)
The feedback can be used by the user, so that it is known how much force an individual joint exerts.
DJoint.DJointFeedback getFeedback()
void setParam(DJoint.PARAM_N type, double value)
double getParam(DJoint.PARAM_N type)
void enable()
void disable()
boolean isEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |