Package com.github.stephengold.joltjni
Class PulleyConstraintSettings
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.PulleyConstraintSettings
- All Implemented Interfaces:
ConstConstraintSettings
,ConstJoltPhysicsObject
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
Settings used to construct a
PulleyConstraint
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCopy the location at which the constraint will attach to body 1.Copy the location at which the constraint will attach to body 2.Copy the location to which body 1 is connected.Copy the location to which body 2 is connected.float
Return the maximum length of the line segments.float
Return the minimum length of the line segments.float
getRatio()
Return the ratio between the 2 line segments.getSpace()
Return which space the body points are specified in.void
setBodyPoint1
(RVec3Arg location) Alter the location at which the constraint will attach to body 1.void
setBodyPoint2
(RVec3Arg location) Alter the location at which the constraint will attach to body 2.void
setFixedPoint1
(RVec3Arg location) Alter the location to which body 1 is connected.void
setFixedPoint2
(RVec3Arg location) Alter the location to which body 2 is connected.float
setMaxLength
(float length) Alter the maximum length of the line segments.float
setMinLength
(float length) Alter the minimum length of the line segments.void
setRatio
(float ratio) Alter the ratio between the 2 line segments.void
setSpace
(EConstraintSpace space) Alter which space the body points are specified in.Methods inherited from class com.github.stephengold.joltjni.TwoBodyConstraintSettings
create, toRef
Methods inherited from class com.github.stephengold.joltjni.ConstraintSettings
getConstraintPriority, getControllerType, getDrawConstraintSize, getEnabled, getNumPositionStepsOverride, getNumVelocityStepsOverride, getRefCount, setConstraintPriority, setDrawConstraintSize, setEmbedded, setEnabled, setNumPositionStepsOverride, setNumVelocityStepsOverride
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Constructor Details
-
PulleyConstraintSettings
public PulleyConstraintSettings()Instantiate default settings.
-
-
Method Details
-
getBodyPoint1
Copy the location at which the constraint will attach to body 1. The settings are unaffected. (native attribute: mBodyPoint1)- Returns:
- a location vector
-
getBodyPoint2
Copy the location at which the constraint will attach to body 2. The settings are unaffected. (native attribute: mBodyPoint2)- Returns:
- a location vector
-
getFixedPoint1
Copy the location to which body 1 is connected. The settings are unaffected. (native attribute: mFixedPoint1)- Returns:
- a location vector (in system coordinates)
-
getFixedPoint2
Copy the location to which body 2 is connected. The settings are unaffected. (native attribute: mFixedPoint2)- Returns:
- a location vector (in system coordinates)
-
getMaxLength
public float getMaxLength()Return the maximum length of the line segments. The settings are unaffected. (native attribute: mMaxLength)- Returns:
- the length (in meters, or -1 to use the creation length)
-
getMinLength
public float getMinLength()Return the minimum length of the line segments. The settings are unaffected. (native attribute: mMinLength)- Returns:
- the length (in meters, or -1 to use the creation length)
-
getRatio
public float getRatio()Return the ratio between the 2 line segments. The settings are unaffected. (native attribute: mRatio)- Returns:
- the ratio
-
getSpace
Return which space the body points are specified in. The settings are unaffected. (native attribute: mSpace)- Returns:
- an enum value (not null)
-
setBodyPoint1
Alter the location at which the constraint will attach to body 1. (native attribute: mBodyPoint1)- Parameters:
location
- the desired location (not null, unaffected, default=(0,0,0))
-
setBodyPoint2
Alter the location at which the constraint will attach to body 2. (native attribute: mBodyPoint2)- Parameters:
location
- the desired location (not null, unaffected, default=(0,0,0))
-
setFixedPoint1
Alter the location to which body 1 is connected. (native attribute: mFixedPoint1)- Parameters:
location
- the desired location (in system coordinates, not null, unaffected, default=(0,0,0))
-
setFixedPoint2
Alter the location to which body 2 is connected. (native attribute: mFixedPoint2)- Parameters:
location
- the desired location (in system coordinates, not null, unaffected, default=(0,0,0))
-
setMaxLength
public float setMaxLength(float length) Alter the maximum length of the line segments. (native attribute: mMaxLength)- Parameters:
length
- (in meters, or -1 to use the creation length, default=-1)- Returns:
- the argument, for chaining
-
setMinLength
public float setMinLength(float length) Alter the minimum length of the line segments. (native attribute: mMinLength)- Parameters:
length
- (in meters, or -1 to use the creation length, default=0)- Returns:
- the argument, for chaining
-
setRatio
public void setRatio(float ratio) Alter the ratio between the 2 line segments. (native attribute: mRatio)- Parameters:
ratio
- the desired ratio (default=1)
-
setSpace
Alter which space the body points are specified in. (native attribute: mSpace)- Parameters:
space
- the desired constraint space (not null, default=WorldSpace)
-