Package com.github.stephengold.joltjni
Class DistanceConstraintSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ConstraintSettings
com.github.stephengold.joltjni.TwoBodyConstraintSettings
com.github.stephengold.joltjni.DistanceConstraintSettings
- All Implemented Interfaces:
ConstConstraintSettings,ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Settings used to construct a
DistanceConstraint.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccess the spring settings.floatReturn the upper limit on distance.floatReturn the lower limit on distance.Copy the constraint location for body 1.Copy the constraint location for body 2.getSpace()Return which space the other properties are specified in.voidsetMaxDistance(float distance) Alter the upper limit on distance.voidsetMinDistance(float distance) Alter the lower limit on distance.voidAlter the constraint location for body 1.voidAlter the constraint location for body 2.voidsetSpace(EConstraintSpace space) Alter which space the other properties are specified in.Methods inherited from class com.github.stephengold.joltjni.TwoBodyConstraintSettings
createMethods inherited from class com.github.stephengold.joltjni.ConstraintSettings
getConstraintPriority, getEnabled, getNumPositionStepsOverride, getNumVelocityStepsOverride, getRefCount, setConstraintPriority, setEmbedded, setEnabled, setNumPositionStepsOverride, setNumVelocityStepsOverride, toRefMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, 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, va
-
Constructor Details
-
DistanceConstraintSettings
public DistanceConstraintSettings()Instantiate default settings.
-
-
Method Details
-
getLimitsSpringSettings
Access the spring settings. The constraint settings are unaffected. (native attribute: mLimitsSpringSettings)- Returns:
- a new JVM object with the pre-existing native object assigned
-
getMaxDistance
public float getMaxDistance()Return the upper limit on distance. The settings are unaffected. (native attribute: mMaxDistance)- Returns:
- the upper limit
-
getMinDistance
public float getMinDistance()Return the lower limit on distance. The settings are unaffected. (native attribute: mMinDistance)- Returns:
- the lower limit
-
getPoint1
Copy the constraint location for body 1. The settings are unaffected. (native attribute: mPoint1)- Returns:
- a new location vector
-
getPoint2
Copy the constraint location for body 2. The settings are unaffected. (native attribute: mPoint2)- Returns:
- a new location vector
-
getSpace
Return which space the other properties are specified in. The settings are unaffected. (native attribute: mSpace)- Returns:
- an enum value (not null)
-
setMaxDistance
public void setMaxDistance(float distance) Alter the upper limit on distance. (native attribute: mMaxDistance)- Parameters:
distance- the upper limit (default=-1)
-
setMinDistance
public void setMinDistance(float distance) Alter the lower limit on distance. (native attribute: mMinDistance)- Parameters:
distance- the upper limit (default=-1)
-
setPoint1
Alter the constraint location for body 1. (native attribute: mPoint1)- Parameters:
location- the desired location (not null, unaffected, default=(0,0,0))
-
setPoint2
Alter the constraint location for body 2. (native attribute: mPoint2)- Parameters:
location- the desired location (not null, unaffected, default=(0,0,0))
-
setSpace
Alter which space the other properties are specified in. (native attribute: mSpace)- Parameters:
space- enum value (not null, default=WorldSpace)
-