Package com.github.stephengold.joltjni
Class GearConstraintSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ConstraintSettings
com.github.stephengold.joltjni.TwoBodyConstraintSettings
com.github.stephengold.joltjni.GearConstraintSettings
- All Implemented Interfaces:
ConstConstraintSettings,ConstJoltPhysicsObject,ConstSerializableObject,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
Settings used to construct a
GearConstraint.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.GearConstraintSettings(GearConstraintSettings original) Instantiate a copy of the specified settings. -
Method Summary
Modifier and TypeMethodDescriptionCopy the hinge axis for body 1.Copy the hinge axis for body 2.floatgetRatio()Return the gear ratio.getSpace()Return which space the other properties are specified in.voidsetHingeAxis1(Vec3Arg axis) Alter the hinge axis for body 1.voidsetHingeAxis2(Vec3Arg axis) Alter the hinge axis for body 2.voidsetRatio(float ratio) Alter the gear ratio.voidsetRatio(int numTeeth1, int numTeeth2) Alter the gear ratio.voidsetSpace(EConstraintSpace space) Alter which space the other properties are specified in.Methods inherited from class com.github.stephengold.joltjni.TwoBodyConstraintSettings
create, toRefMethods inherited from class com.github.stephengold.joltjni.ConstraintSettings
getConstraintPriority, getControllerType, getDrawConstraintSize, getEnabled, getNumPositionStepsOverride, getNumVelocityStepsOverride, getRefCount, saveBinaryState, setConstraintPriority, setDrawConstraintSize, setEmbedded, setEnabled, setNumPositionStepsOverride, setNumVelocityStepsOverride, setVirtualAddressAsCoOwner, sRestoreFromBinaryStateMethods inherited from class com.github.stephengold.joltjni.SerializableObject
getRttiMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVaMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstSerializableObject
getRtti
-
Constructor Details
-
GearConstraintSettings
public GearConstraintSettings()Instantiate default settings. -
GearConstraintSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
-
Method Details
-
getHingeAxis1
Copy the hinge axis for body 1. The settings are unaffected. (native attribute: mHingeAxis1)- Returns:
- a new direction vector
-
getHingeAxis2
Copy the hinge axis for body 2. The settings are unaffected. (native attribute: mHingeAxis2)- Returns:
- a new direction vector
-
getRatio
public float getRatio()Return the gear ratio.- Returns:
- the ratio
-
getSpace
Return which space the other properties are specified in. The settings are unaffected. (native attribute: mSpace)- Returns:
- an enum value (not null)
-
setHingeAxis1
Alter the hinge axis for body 1. (native attribute: mHingeAxis1)- Parameters:
axis- the desired direction vector (default=(1,0,0))
-
setHingeAxis2
Alter the hinge axis for body 2. (native attribute: mHingeAxis2)- Parameters:
axis- the desired direction vector (default=(1,0,0))
-
setRatio
public void setRatio(float ratio) Alter the gear ratio.- Parameters:
ratio- the desired ratio (default=1)
-
setRatio
public void setRatio(int numTeeth1, int numTeeth2) Alter the gear ratio.- Parameters:
numTeeth1- the number of teeth in the body 1 gearnumTeeth2- the number of teeth in the body 2 gear
-
setSpace
Alter which space the other properties are specified in. (native attribute: mSpace)- Parameters:
space- enum value (not null, default=WorldSpace)
-