|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.Joint
org.odejava.JointHinge2
public class JointHinge2
A joint that allows movement along two separate axis, with the calculations implemented as the joints connected in series. There is also a suspension setting allowing the use of this joint in places like a wheel of a car.
A Hinge-2 joint has two axes located around a common anchor point. Axis 1 is specified relative to the first body and axis 2 is specified relative to the second body. Axis 1 can have limits and a motor, axis 2 can only have a motor.
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 | |
|---|---|
JointHinge2(String name,
World world)
Create a new Hinge2 joint that belongs to the given world and has a name. |
|
JointHinge2(String name,
World world,
JointGroup jointGroup)
Create a new Hinge-2 joint that belongs to the given world. |
|
JointHinge2(World world)
Create a new Hinge2 joint that belongs to the given world and does not belong to any group. |
|
JointHinge2(World world,
JointGroup jointGroup)
Create a new Hinge-2 joint that belongs to the given world. |
|
| Method Summary | ||
|---|---|---|
org.openmali.vecmath2.Vector3f |
getAnchor()
Get the anchor location of the joint, relative to body 1. |
|
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 of the joint, relative to body 1, and place it in the user-provided data structure. |
|
org.openmali.vecmath2.Vector3f |
getAnchor2()
Get the anchor location of the joint, relative to body 2. |
|
void |
getAnchor2(float[] result)
Get the anchor location the joint, relative to body 2 and place it in the user-provided array. |
|
|
getAnchor2(T result)
Get the anchor location of the joint, relative to body 2, and place it in the user-provided data structure. |
|
float |
getAngle1()
|
|
float |
getAngle1Rate()
|
|
float |
getAngle2Rate()
|
|
org.openmali.vecmath2.Vector3f |
getAxis1()
Get the axis 1 direction vector. |
|
void |
getAxis1(float[] result)
Get the axis 1 direction vector and place it in the user-provided array. |
|
org.openmali.vecmath2.Vector3f |
getAxis1(org.openmali.vecmath2.Vector3f result)
Get the axis 1 direction vector, and place it in the user-provided data structure. |
|
org.openmali.vecmath2.Vector3f |
getAxis2()
Get the axis 2 direction vector. |
|
void |
getAxis2(float[] result)
Get the axis 2 direction vector and place it in the user-provided array. |
|
org.openmali.vecmath2.Vector3f |
getAxis2(org.openmali.vecmath2.Vector3f result)
Get the axis 2 direction vector, and place it in the user-provided data structure. |
|
float |
getConstantForceMix()
Get the amount of the constant force mix parameter currently set for axis 1 positions between the two stops. |
|
float |
getConstantForceMix2()
Get the amount of the constant force mix parameter currently set for axis 2 positions between the two stops. |
|
float |
getDesiredAngularVelocity1()
Get the requested angular speed currently set axis 1. |
|
float |
getDesiredAngularVelocity2()
Get the requested angular speed currently set axis 2. |
|
float |
getMaxAngleStop()
Fetch the currently set maximum angle stop for axis 1 from this joint. |
|
float |
getMaxTorque1()
Get the amount of the torque currently set for the motor on axis 1. |
|
float |
getMaxTorque2()
Get the amount of the torque currently set for the motor on axis 2. |
|
float |
getMinAngleStop()
Fetch the currently set maximum angle stop for axis 1from this joint. |
|
float |
getParam(int parameter)
Get an unchecked parameter value directly from this joint. |
|
float |
getStopBounce()
Fetch the current bounce factor for the stop on axis 1. |
|
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. |
|
float |
getSuspensionCFM()
Get the amount of the suspension constant force mix parameter currently set. |
|
float |
getSuspensionERP()
Get the amount of the suspension error reduction parameter currently set. |
|
void |
setAnchor(float x,
float y,
float z)
Set the anchor location to a new value, using individual values. |
|
void |
setAnchor(org.openmali.vecmath2.Vector3f position)
Set the anchor location, relative to body 1 to a new value, using a vector. |
|
void |
setAxis1(float x,
float y,
float z)
Set the axis 1 vector to a new value, using individual values. |
|
void |
setAxis2(float x,
float y,
float z)
Set the axis 2 vector to a new value, using individual values. |
|
void |
setConstantForceMix(float force)
Set the amount of constant force to mix into the system on axis 1 when the bodies are not at a stop. |
|
void |
setConstantForceMix2(float force)
Set the amount of constant force to mix into the system on axis 2 when the bodies are not at a stop. |
|
void |
setDesiredAngularVelocity1(float speed)
Set the angular speed that you would like axis 1 to achieve. |
|
void |
setDesiredAngularVelocity2(float speed)
Set the angular speed that you would like axis 2 to achieve. |
|
void |
setMaxAngleStop(float angle)
Set the maximum angle that this joint is permitted to rotate to around axis 1. |
|
void |
setMaxTorque1(float torque)
Set the amount of torque on axis 1 that can be applied by the motor, in order to reach the desired angular velocity. |
|
void |
setMaxTorque2(float torque)
Set the amount of torque on axis 2 that can be applied by the motor, in order to reach the desired angular velocity. |
|
void |
setMinAngleStop(float angle)
Set the minimum angle that this joint is permitted to rotate to around axis 1. |
|
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 for axis 1. |
|
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. |
|
void |
setSuspensionCFM(float force)
Set the amount of suspension constant force to mix into the system when the bodies are travelling between the stops on axis 1. |
|
void |
setSuspensionERP(float erp)
Set the amount of suspension error reduction. |
|
| Methods inherited from class org.odejava.Joint |
|---|
attach, delete, enableFeedbackTracking, enableFeedbackTracking, getBody1, getBody2, getFeedback, getGroup, getName, isFeedbackTrackingEnabled, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JointHinge2(World world)
world - The world that this belongs to
public JointHinge2(String name,
World world)
name - A label string to associate with this jointworld - The world that this belongs to
public JointHinge2(World world,
JointGroup jointGroup)
world - The world that this belongs tojointGroup - An optional group to associate this joint with
public JointHinge2(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)
x - The x component of the the anchor locationy - The y component of the the anchor locationz - The z component of the the anchor locationpublic final void setAnchor(org.openmali.vecmath2.Vector3f position)
position - A vector holding the anchor locationpublic org.openmali.vecmath2.Vector3f getAnchor()
getAnchor(null).
public <T extends org.openmali.vecmath2.Tuple3f> T getAnchor(T result)
result - An object to place the values into or null
public void getAnchor(float[] result)
result - An object to place the values intopublic org.openmali.vecmath2.Vector3f getAnchor2()
getAnchor2(null).
public <T extends org.openmali.vecmath2.Tuple3f> T getAnchor2(T result)
result - An object to place the values into or null
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 Jointx - The x component of the the axis vectory - The y component of the the axis vectorz - The z component of the the axis vectorpublic org.openmali.vecmath2.Vector3f getAxis1()
getAxis1(null).
public org.openmali.vecmath2.Vector3f getAxis1(org.openmali.vecmath2.Vector3f result)
result - An object to place the values into or null
public void getAxis1(float[] result)
result - An object to place the values into
public void setAxis2(float x,
float y,
float z)
setAxis2 in class Jointx - The x component of the the axis vectory - The y component of the the axis vectorz - The z component of the the axis vectorpublic org.openmali.vecmath2.Vector3f getAxis2()
getAxis2(null).
public org.openmali.vecmath2.Vector3f getAxis2(org.openmali.vecmath2.Vector3f result)
result - An object to place the values into or null
public void getAxis2(float[] result)
result - An object to place the values intopublic float getAngle1()
public float getAngle1Rate()
public float getAngle2Rate()
public void setDesiredAngularVelocity1(float speed)
speed - The speed that should be achievedpublic float getDesiredAngularVelocity1()
public void setDesiredAngularVelocity2(float speed)
speed - The speed that should be achievedpublic float getDesiredAngularVelocity2()
public void setMaxTorque1(float torque)
throws IllegalArgumentException
torque - The amount of torque to use in Nm
IllegalArgumentException - The torque value is negativepublic float getMaxTorque1()
public void setMaxTorque2(float torque)
throws IllegalArgumentException
torque - The amount of torque to use in Nm
IllegalArgumentException - The torque value is negativepublic float getMaxTorque2()
public void setConstantForceMix(float force)
force - The amount of force to usepublic float getConstantForceMix()
public void setConstantForceMix2(float force)
force - The amount of force to usepublic float getConstantForceMix2()
public void setSuspensionERP(float erp)
erp - The amount of error reduction to usepublic float getSuspensionERP()
public void setSuspensionCFM(float force)
force - The amount of force to usepublic float getSuspensionCFM()
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 minimum 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 | ||||||||