public class SliderJoint extends PhysicsJoint
From the Bullet manual:
The slider constraint allows the body to rotate around one axis and translate
along this axis.
Modifier and Type | Field and Description |
---|---|
protected Matrix3f |
rotA |
protected Matrix3f |
rotB |
protected boolean |
useLinearReferenceFrameA |
collisionBetweenLinkedBodys, nodeA, nodeB, objectId, pivotA, pivotB
Modifier | Constructor and Description |
---|---|
protected |
SliderJoint()
No-argument constructor needed by SavableClassUtil.
|
|
SliderJoint(PhysicsRigidBody nodeA,
PhysicsRigidBody nodeB,
Vector3f pivotA,
Vector3f pivotB,
boolean useLinearReferenceFrameA)
Instantiate a SliderJoint.
|
|
SliderJoint(PhysicsRigidBody nodeA,
PhysicsRigidBody nodeB,
Vector3f pivotA,
Vector3f pivotB,
Matrix3f rotA,
Matrix3f rotB,
boolean useLinearReferenceFrameA)
Instantiate a SliderJoint.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createJoint()
Instantiate the configured constraint in Bullet.
|
float |
getDampingDirAng()
Read the joint's damping for on-axis rotation between the limits.
|
float |
getDampingDirLin()
Read the joint's damping for on-axis translation between the limits.
|
float |
getDampingLimAng()
Read the joint's damping for on-axis rotation hitting the limits.
|
float |
getDampingLimLin()
Read the joint's damping for on-axis translation hitting the limits.
|
float |
getDampingOrthoAng()
Read the joint's damping for off-axis rotation.
|
float |
getDampingOrthoLin()
Read the joint's damping for off-axis translation.
|
float |
getLowerAngLimit()
Read the joint's lower limit for on-axis rotation.
|
float |
getLowerLinLimit()
Read the joint's lower limit for on-axis translation.
|
float |
getMaxAngMotorForce()
Read the maximum force of the rotation motor.
|
float |
getMaxLinMotorForce()
Read the maximum force of the translation motor.
|
float |
getRestitutionDirAng()
Read the joint's restitution for on-axis rotation between the limits.
|
float |
getRestitutionDirLin()
Read the joint's restitution for on-axis translation between the limits.
|
float |
getRestitutionLimAng()
Read the joint's restitution for on-axis rotation hitting the limits.
|
float |
getRestitutionLimLin()
Read the joint's restitution for on-axis translation hitting the limits.
|
float |
getRestitutionOrthoAng()
Read the joint's restitution for off-axis rotation.
|
float |
getRestitutionOrthoLin()
Read the joint's restitution for off-axis translation.
|
float |
getSoftnessDirAng()
Read the joint's softness for on-axis rotation between the limits.
|
float |
getSoftnessDirLin()
Read the joint's softness for on-axis translation between the limits.
|
float |
getSoftnessLimAng()
Read the joint's softness for on-axis rotation hitting the limits.
|
float |
getSoftnessLimLin()
Read the joint's softness for on-axis translation hitting the limits.
|
float |
getSoftnessOrthoAng()
Read the joint's softness for off-axis rotation.
|
float |
getSoftnessOrthoLin()
Read the joint's softness for off-axis translation.
|
float |
getTargetAngMotorVelocity()
Read the velocity target of the rotation motor.
|
float |
getTargetLinMotorVelocity()
Read the velocity target of the translation motor.
|
float |
getUpperAngLimit()
Read the joint's upper limit for on-axis rotation.
|
float |
getUpperLinLimit()
Read the joint's upper limit for on-axis translation.
|
boolean |
isPoweredAngMotor()
Test whether the rotation motor is powered.
|
boolean |
isPoweredLinMotor()
Test whether the translation motor is powered.
|
void |
read(JmeImporter im)
De-serialize this joint, for example when loading from a J3O file.
|
void |
setDampingDirAng(float dampingDirAng)
Alter the joint's damping for on-axis rotation between the limits.
|
void |
setDampingDirLin(float dampingDirLin)
Alter the joint's damping for on-axis translation between the limits.
|
void |
setDampingLimAng(float dampingLimAng)
Alter the joint's damping for on-axis rotation hitting the limits.
|
void |
setDampingLimLin(float dampingLimLin)
Alter the joint's damping for on-axis translation hitting the limits.
|
void |
setDampingOrthoAng(float dampingOrthoAng)
Alter the joint's damping for off-axis rotation.
|
void |
setDampingOrthoLin(float dampingOrthoLin)
Alter the joint's damping for off-axis translation.
|
void |
setLowerAngLimit(float lowerAngLimit)
Alter the joint's lower limit for on-axis rotation.
|
void |
setLowerLinLimit(float lowerLinLimit)
Alter the joint's lower limit for on-axis translation.
|
void |
setMaxAngMotorForce(float maxAngMotorForce)
Alter the maximum force of the rotation motor.
|
void |
setMaxLinMotorForce(float maxLinMotorForce)
Alter the maximum force of the translation motor.
|
void |
setPoweredAngMotor(boolean poweredAngMotor)
Alter whether the rotation motor is powered.
|
void |
setPoweredLinMotor(boolean poweredLinMotor)
Alter whether the translation motor is powered.
|
void |
setRestitutionDirAng(float restitutionDirAng)
Alter the joint's restitution for on-axis rotation between the limits.
|
void |
setRestitutionDirLin(float restitutionDirLin)
Alter the joint's restitution for on-axis translation between the limits.
|
void |
setRestitutionLimAng(float restitutionLimAng)
Alter the joint's restitution for on-axis rotation hitting the limits.
|
void |
setRestitutionLimLin(float restitutionLimLin)
Alter the joint's restitution for on-axis translation hitting the limits.
|
void |
setRestitutionOrthoAng(float restitutionOrthoAng)
Alter the joint's restitution for off-axis rotation.
|
void |
setRestitutionOrthoLin(float restitutionOrthoLin)
Alter the joint's restitution for off-axis translation.
|
void |
setSoftnessDirAng(float softnessDirAng)
Alter the joint's softness for on-axis rotation between the limits.
|
void |
setSoftnessDirLin(float softnessDirLin)
Alter the joint's softness for on-axis translation between the limits.
|
void |
setSoftnessLimAng(float softnessLimAng)
Alter the joint's softness for on-axis rotation hitting the limits.
|
void |
setSoftnessLimLin(float softnessLimLin)
Alter the joint's softness for on-axis translation hitting the limits.
|
void |
setSoftnessOrthoAng(float softnessOrthoAng)
Alter the joint's softness for off-axis rotation.
|
void |
setSoftnessOrthoLin(float softnessOrthoLin)
Alter the joint's softness for off-axis translation.
|
void |
setTargetAngMotorVelocity(float targetAngMotorVelocity)
Alter the velocity target of the rotation motor.
|
void |
setTargetLinMotorVelocity(float targetLinMotorVelocity)
Alter the velocity target of the translation motor.
|
void |
setUpperAngLimit(float upperAngLimit)
Alter the joint's upper limit for on-axis rotation.
|
void |
setUpperLinLimit(float upperLinLimit)
Alter the joint's upper limit for on-axis translation.
|
void |
write(JmeExporter ex)
Serialize this joint, for example when saving to a J3O file.
|
destroy, finalize, getAppliedImpulse, getBodyA, getBodyB, getObjectId, getPivotA, getPivotB, isCollisionBetweenLinkedBodys, setCollisionBetweenLinkedBodys
protected Matrix3f rotA
protected Matrix3f rotB
protected boolean useLinearReferenceFrameA
protected SliderJoint()
public SliderJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Matrix3f rotA, Matrix3f rotB, boolean useLinearReferenceFrameA)
nodeA
- the 1st body connected by the joint (not null, alias
created)nodeB
- the 2nd body connected by the joint (not null, alias
created)pivotA
- the local offset of the connection point in node A (not
null, alias created)pivotB
- the local offset of the connection point in node B (not
null, alias created)rotA
- the local orientation of the connection to node A (not null, alias created)rotB
- the local orientation of the connection to node B (not null, alias created)useLinearReferenceFrameA
- true→use node A, false→use node
Bpublic SliderJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, boolean useLinearReferenceFrameA)
nodeA
- the 1st body connected by the joint (not null, alias
created)nodeB
- the 2nd body connected by the joint (not null, alias
created)pivotA
- the local offset of the connection point in node A (not
null, alias created)pivotB
- the local offset of the connection point in node B (not
null, alias created)useLinearReferenceFrameA
- true→use node A, false→use node
Bpublic float getLowerLinLimit()
public void setLowerLinLimit(float lowerLinLimit)
lowerLinLimit
- the desired lower limit (default=-1)public float getUpperLinLimit()
public void setUpperLinLimit(float upperLinLimit)
upperLinLimit
- the desired upper limit (default=1)public float getLowerAngLimit()
public void setLowerAngLimit(float lowerAngLimit)
lowerAngLimit
- the desired lower limit angle (in radians,
default=0)public float getUpperAngLimit()
public void setUpperAngLimit(float upperAngLimit)
upperAngLimit
- the desired upper limit angle (in radians,
default=0)public float getSoftnessDirLin()
public void setSoftnessDirLin(float softnessDirLin)
softnessDirLin
- the desired softness (default=1)public float getRestitutionDirLin()
public void setRestitutionDirLin(float restitutionDirLin)
restitutionDirLin
- the desired restitution (bounce) factor
(default=0.7)public float getDampingDirLin()
public void setDampingDirLin(float dampingDirLin)
dampingDirLin
- the desired viscous damping ratio (0→no
damping, 1→critically damped, default=0)public float getSoftnessDirAng()
public void setSoftnessDirAng(float softnessDirAng)
softnessDirAng
- the desired softness (default=1)public float getRestitutionDirAng()
public void setRestitutionDirAng(float restitutionDirAng)
restitutionDirAng
- the desired restitution (bounce) factor
(default=0.7)public float getDampingDirAng()
public void setDampingDirAng(float dampingDirAng)
dampingDirAng
- the desired viscous damping ratio (0→no
damping, 1→critically damped, default=0)public float getSoftnessLimLin()
public void setSoftnessLimLin(float softnessLimLin)
softnessLimLin
- the desired softness (default=1)public float getRestitutionLimLin()
public void setRestitutionLimLin(float restitutionLimLin)
restitutionLimLin
- the desired restitution (bounce) factor
(default=0.7)public float getDampingLimLin()
public void setDampingLimLin(float dampingLimLin)
dampingLimLin
- the desired viscous damping ratio (0→no
damping, 1→critically damped, default=1)public float getSoftnessLimAng()
public void setSoftnessLimAng(float softnessLimAng)
softnessLimAng
- the desired softness (default=1)public float getRestitutionLimAng()
public void setRestitutionLimAng(float restitutionLimAng)
restitutionLimAng
- the desired restitution (bounce) factor
(default=0.7)public float getDampingLimAng()
public void setDampingLimAng(float dampingLimAng)
dampingLimAng
- the desired viscous damping ratio (0→no
damping, 1→critically damped, default=1)public float getSoftnessOrthoLin()
public void setSoftnessOrthoLin(float softnessOrthoLin)
softnessOrthoLin
- the desired softness (default=1)public float getRestitutionOrthoLin()
public void setRestitutionOrthoLin(float restitutionOrthoLin)
restitutionOrthoLin
- the desired restitution (bounce) factor
(default=0.7)public float getDampingOrthoLin()
public void setDampingOrthoLin(float dampingOrthoLin)
dampingOrthoLin
- the desired viscous damping ratio (0→no
damping, 1→critically damped, default=1)public float getSoftnessOrthoAng()
public void setSoftnessOrthoAng(float softnessOrthoAng)
softnessOrthoAng
- the desired softness (default=1)public float getRestitutionOrthoAng()
public void setRestitutionOrthoAng(float restitutionOrthoAng)
restitutionOrthoAng
- the desired restitution (bounce) factor
(default=0.7)public float getDampingOrthoAng()
public void setDampingOrthoAng(float dampingOrthoAng)
dampingOrthoAng
- the desired viscous damping ratio (0→no
damping, 1→critically damped, default=1)public boolean isPoweredLinMotor()
public void setPoweredLinMotor(boolean poweredLinMotor)
poweredLinMotor
- true to power the motor, false to de-power it
(default=false)public float getTargetLinMotorVelocity()
public void setTargetLinMotorVelocity(float targetLinMotorVelocity)
targetLinMotorVelocity
- the desired velocity target (default=0)public float getMaxLinMotorForce()
public void setMaxLinMotorForce(float maxLinMotorForce)
maxLinMotorForce
- the desired maximum force (default=0)public boolean isPoweredAngMotor()
public void setPoweredAngMotor(boolean poweredAngMotor)
poweredAngMotor
- true to power the motor, false to de-power it
(default=false)public float getTargetAngMotorVelocity()
public void setTargetAngMotorVelocity(float targetAngMotorVelocity)
targetAngMotorVelocity
- the desired velocity target (in radians per
second, default=0)public float getMaxAngMotorForce()
public void setMaxAngMotorForce(float maxAngMotorForce)
maxAngMotorForce
- the desired maximum force (default=0)public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class PhysicsJoint
ex
- exporter (not null)java.io.IOException
- from exporterpublic void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class PhysicsJoint
im
- importer (not null)java.io.IOException
- from importerprotected void createJoint()