Package com.github.stephengold.joltjni
Class PlaneShapeSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ShapeSettings
com.github.stephengold.joltjni.PlaneShapeSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstSerializableObject,ConstShapeSettings,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
Settings used to construct a
PlaneShape.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatdefault half-extent for thePlaneShape -
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.PlaneShapeSettings(PlaneShapeSettings original) Instantiate a copy of the specified settings.PlaneShapeSettings(ConstPlane plane) Instantiate settings for the specified plane.PlaneShapeSettings(ConstPlane plane, ConstPhysicsMaterial material) Instantiate settings for the specified plane and material.PlaneShapeSettings(ConstPlane plane, ConstPhysicsMaterial material, float halfExtent) Instantiate settings for the specified plane, material, and extent. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the half extent.Return the material.getPlane()Copy the surface equation.voidsetHalfExtent(float halfExtent) Alter the plane's extent.voidsetMaterial(ConstPhysicsMaterial material) Replace the material.voidsetPlane(ConstPlane plane) Alter the surface equation.Methods inherited from class com.github.stephengold.joltjni.ShapeSettings
clearCachedResult, cloneShapeSettings, create, getRefCount, setEmbedded, setVirtualAddressAsCoOwner, toRef, toRefCMethods 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
-
Field Details
-
cDefaultHalfExtent
public static final float cDefaultHalfExtentdefault half-extent for thePlaneShape- See Also:
-
-
Constructor Details
-
PlaneShapeSettings
public PlaneShapeSettings()Instantiate default settings. -
PlaneShapeSettings
Instantiate settings for the specified plane.- Parameters:
plane- the desired surface plane (not null, unaffected)
-
PlaneShapeSettings
Instantiate settings for the specified plane and material.- Parameters:
plane- the desired surface plane (not null, unaffected)material- the desired surface properties (not null, unaffected) ornullfor default properties (default=null)
-
PlaneShapeSettings
Instantiate settings for the specified plane, material, and extent.- Parameters:
plane- the desired surface plane (not null, unaffected)material- the desired surface properties (not null, unaffected) ornullfor default properties (default=null)halfExtent- the desired radius of the bounding box (>0, default=1000)
-
PlaneShapeSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
-
Method Details
-
getHalfExtent
public float getHalfExtent()Return the half extent. The settings are unaffected. (native attribute: mHalfExtent)- Returns:
- half the extent
-
getMaterial
Return the material. The settings are unaffected. (native attribute: mMaterial)- Returns:
- a new JVM object with the pre-existing native object assigned, or
nullif none
-
getPlane
Copy the surface equation. The settings are unaffected. (native attribute: mPlane)- Returns:
- a new
Plane
-
setHalfExtent
public void setHalfExtent(float halfExtent) Alter the plane's extent. (native attribute: mHalfExtent)- Parameters:
halfExtent- one-half of the desired extent
-
setMaterial
Replace the material. (native attribute: mMaterial)- Parameters:
material- the desired material, ornullif none (default=null)
-
setPlane
Alter the surface equation. (native attribute: mPlane)- Parameters:
plane- the desired surface (not null, unaffected, default=((0,0,0),0))
-