|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.Joint
org.odejava.JointHinge
public class JointHinge
Represents a joint that is restricted to a single degree of freedom around a hinge axis between two bodies.
Created 20.12.2003 (dd.mm.yyyy)
| Field Summary |
|---|
| Fields inherited from class org.odejava.Joint |
|---|
body1, body2, BOUNCE_RANGE_MSG, deleted, feedback, group, jointGroupId, jointId, name |
| Constructor Summary | |
|---|---|
JointHinge(String name,
World world)
Create a new Hinge joint that belongs to the given world and has a name. |
|
JointHinge(String name,
World world,
JointGroup jointGroup)
Create a new Hinge joint that belongs to the given world. |
|
JointHinge(World world)
Create a new Hinge joint that belongs to the given world and does not belong to any group. |
|
JointHinge(World world,
JointGroup jointGroup)
Create a new Hinge joint that belongs to the given world. |
|
| Method Summary | ||
|---|---|---|
org.openmali.vecmath2.Vector3f |
getAnchor()
|
|
void |
getAnchor(float[] result)
Get the anchor location the joint, relative to body 1 and place it in the user-provided array. |
|
|
getAnchor(T result)
Get the anchor location the joint, relative to body 1 and place it in the user-provided array. |
|
org.openmali.vecmath2.Vector3f |
getAnchor2()
|
|
void |
getAnchor2(float[] result)
Get the anchor location the joint, relative to body 2 and place it in the user-provided array. |
|
float |
getAngle()
|
|
float |
getAngleRate()
|
|
org.openmali.vecmath2.Vector3f |
getAxis()
|
|
float |
getConstantForceMix()
Get the amount of the constant force mix parameter currently set for positions between the two stops. |
|
float |
getMaxAngleStop()
Fetch the currently set maximum angle stop from this joint. |
|
float |
getMinAngleStop()
Fetch the currently set maximum angle stop from this joint. |
|
float |
getParam(int parameter)
Get an unchecked parameter value directly from this joint. |
|
float |
getStopBounce()
Fetch the current bounce factor for the hinge stop. |
|
float |
getStopCFM()
Get the amount of the stop constant force mix parameter currently set. |
|
float |
getStopERP()
Get the amount of the stop error reduction parameter currently set. |
|
void |
setAnchor(float x,
float y,
float z)
|
|
void |
setAxis(float x,
float y,
float z)
Deprecated. use setAxis1 instead |
|
void |
setAxis1(float x,
float y,
float z)
|
|
void |
setConstantForceMix(float force)
Set the amount of constant force to mix into the system when the bodies are not at a stop. |
|
void |
setMaxAngleStop(float angle)
Set the maximum angle that this joint is permitted to rotate to. |
|
void |
setMinAngleStop(float angle)
Set the minimum angle that this joint is permitted to rotate to. |
|
void |
setParam(int parameter,
float value)
Set a generic, unchecked, parameter directly for this joint. |
|
void |
setStopBounce(float bounce)
Set the bounciness of the stops. |
|
void |
setStopCFM(float force)
Set the amount of stop constant force to mix into the system when the bodies reach a stop. |
|
void |
setStopERP(float erp)
Set the amount of stop bounce error reduction. |
|
| Methods inherited from class org.odejava.Joint |
|---|
attach, delete, enableFeedbackTracking, enableFeedbackTracking, getBody1, getBody2, getFeedback, getGroup, getName, isFeedbackTrackingEnabled, setAxis2, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JointHinge(World world)
world - The world that this belongs to
public JointHinge(String name,
World world)
name - A label string to associate with this jointworld - The world that this belongs to
public JointHinge(World world,
JointGroup jointGroup)
world - The world that this belongs tojointGroup - An optional group to associate this joint with
public JointHinge(String name,
World world,
JointGroup jointGroup)
name - A label string to associate with this jointworld - The world that this belongs tojointGroup - An optional group to associate this joint with| Method Detail |
|---|
public void setAnchor(float x,
float y,
float z)
public org.openmali.vecmath2.Vector3f getAnchor()
public void getAnchor(float[] result)
result - An object to place the values intopublic <T extends org.openmali.vecmath2.Tuple3f> T getAnchor(T result)
result - An object to place the values intopublic org.openmali.vecmath2.Vector3f getAnchor2()
public void getAnchor2(float[] result)
result - An object to place the values into
public void setAxis1(float x,
float y,
float z)
setAxis1 in class Joint
@Deprecated
public void setAxis(float x,
float y,
float z)
x - y - z - public org.openmali.vecmath2.Vector3f getAxis()
public float getAngle()
public float getAngleRate()
public void setConstantForceMix(float force)
force - The amount of force to usepublic float getConstantForceMix()
public void setMinAngleStop(float angle)
throws IllegalArgumentException
Note that if the maximum angle provided is less than the minimum angle at the point of evaluation, ODE ignores all limits.
A value of Float.NEGATIVE_INFINITY can be used to disable the maximum stop.
angle - The minimum stop angle in radians [-π,+π] or
Float.NEGATIVE_INFINITY
IllegalArgumentException - The provided angle is out of the valid
rangepublic float getMinAngleStop()
public void setMaxAngleStop(float angle)
throws IllegalArgumentException
Note that if the maximum angle provided is less than the minimum angle at the point of evaluation, ODE ignores all limits.
A value of Float.POSITIVE_INFINITY can be used to disable the maximum stop.
angle - The maximum stop angle in radians [-π,+π] or
Float.POSITIVE_INFINITY
IllegalArgumentException - The provided angle is out of the valid
rangepublic float getMaxAngleStop()
public void setStopBounce(float bounce)
throws IllegalArgumentException
bounce - The bounciness factor in the range [0,1]
IllegalArgumentException - The bounce factor is out of rangepublic float getStopBounce()
public void setStopERP(float erp)
erp - The amount of error reduction to usepublic float getStopERP()
public void setStopCFM(float force)
force - The amount of force to usepublic float getStopCFM()
public void setParam(int parameter,
float value)
OdeConstants.
setParam in class Jointparameter - A parameter constant from OdeConstantsvalue - The new value to associate with the parameterpublic float getParam(int parameter)
OdeConstants.
getParam in class Jointparameter - A constant describing the parameter to fetch
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||