Package com.github.stephengold.joltjni
Class WheelSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.WheelSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstWheelSettings,AutoCloseable,Comparable<ConstJoltPhysicsObject>
- Direct Known Subclasses:
WheelSettingsWv
Settings used to construct a
Wheel.-
Method Summary
Modifier and TypeMethodDescriptionCopy the location of the attachment point.floatReturn the radius of the wheel.floatgetWidth()Return the width of the wheel.voidsetPosition(Vec3Arg position) Alter the location of the attachment point.voidsetRadius(float radius) Alter the radius of the wheel.voidsetWidth(float width) Alter the width of the wheel.abstract ReftoRef()Create a counted reference to the nativeWheelSettings.Methods 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
-
Method Details
-
setPosition
Alter the location of the attachment point. (native attribute: mPosition)- Parameters:
position- the location of the attachment point (in the body's local system, not null, unaffected, default=(0,0,0))
-
setRadius
public void setRadius(float radius) Alter the radius of the wheel. (native attribute: mRadius)- Parameters:
radius- the desired radius (in meters, default=0.3)
-
setWidth
public void setWidth(float width) Alter the width of the wheel. (native attribute: mWidth)- Parameters:
width- the desired width (in meters, default=0.1)
-
toRef
Create a counted reference to the nativeWheelSettings.- Returns:
- a new JVM object with a new native object assigned
-
getPosition
Copy the location of the attachment point. The settings are unaffected. (native attribute: mPosition)- Specified by:
getPositionin interfaceConstWheelSettings- Returns:
- a new location vector (in the body's local system)
-
getRadius
public float getRadius()Return the radius of the wheel. The settings are unaffected. (native attribute: mRadius)- Specified by:
getRadiusin interfaceConstWheelSettings- Returns:
- the radius (in maters)
-
getWidth
public float getWidth()Return the width of the wheel. The settings are unaffected. (native attribute: mWidth)- Specified by:
getWidthin interfaceConstWheelSettings- Returns:
- the width (in maters)
-