Package com.github.stephengold.joltjni
Class ConeConstraintSettings
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.ConeConstraintSettings
- All Implemented Interfaces:
ConstConstraintSettings
,ConstJoltPhysicsObject
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
Settings used to construct a
ConeConstraint
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
Return one-half the maximum angle between the twist axes of body 1 and body 2.Copy the constraint location for body 1.Copy the constraint location for body 2.getSpace()
Return which space the other properties are specified in.Copy the twist axis of body 1.Copy the twist axis of body 2.void
setHalfConeAngle
(float halfAngle) Alter the maximum angle between the twist axes of body 1 and body 2.Alter the constraint location for body 1.Alter the constraint location for body 2.void
setSpace
(EConstraintSpace space) Alter which space the other properties are specified in.setTwistAxis1
(Vec3Arg direction) Alter the twist axis of body 1.setTwistAxis2
(Vec3Arg direction) Alter the twist axis of body 2.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
-
ConeConstraintSettings
public ConeConstraintSettings()Instantiate default settings.
-
-
Method Details
-
getHalfConeAngle
public float getHalfConeAngle()Return one-half the maximum angle between the twist axes of body 1 and body 2. The settings are unaffected. (native attribute: mHalfConeAngle)- Returns:
- the half angle (in radians)
-
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)
-
getTwistAxis1
Copy the twist axis of body 1. The settings are unaffected. (native attribute: mTwistAxis1)- Returns:
- a new direction vector
-
getTwistAxis2
Copy the twist axis of body 2. The settings are unaffected. (native attribute: mTwistAxis2)- Returns:
- a new direction vector
-
setHalfConeAngle
public void setHalfConeAngle(float halfAngle) Alter the maximum angle between the twist axes of body 1 and body 2. (native attribute: mHalfConeAngle)- Parameters:
halfAngle
- the desired half angle (in radians, default=0)
-
setPoint1
Alter the constraint location for body 1. (native attribute: mPoint1)- Parameters:
location
- the desired location (not null, unaffected, default=(0,0,0))- Returns:
- the argument, for chaining
-
setPoint2
Alter the constraint location for body 2. (native attribute: mPoint2)- Parameters:
location
- the desired location (not null, unaffected, default=(0,0,0))- Returns:
- the argument, for chaining
-
setSpace
Alter which space the other properties are specified in. (native attribute: mSpace)- Parameters:
space
- enum value (not null, default=WorldSpace)
-
setTwistAxis1
Alter the twist axis of body 1. (native attribute: mTwistAxis1)- Parameters:
direction
- the desired axis direction (not null, unaffected, default=(1,0,0))- Returns:
- the argument, for chaining
-
setTwistAxis2
Alter the twist axis of body 2. (native attribute: mTwistAxis2)- Parameters:
direction
- the desired axis direction (not null, unaffected, default=(1,0,0))- Returns:
- the argument, for chaining
-