Package com.github.stephengold.joltjni
Class PlaneShapeSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ShapeSettings
com.github.stephengold.joltjni.PlaneShapeSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Settings used to construct a
PlaneShape.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatdefault half-extent for thePlaneShape -
Constructor Summary
ConstructorsConstructorDescriptionPlaneShapeSettings(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, create, getRefCount, setEmbedded, toRefMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, startCleaner, toString, va
-
Field Details
-
cDefaultHalfExtent
public static final float cDefaultHalfExtentdefault half-extent for thePlaneShape- See Also:
-
-
Constructor Details
-
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)
-
-
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, or null for none (default=null)
-
setPlane
Alter the surface equation. (native attribute: mPlane)- Parameters:
plane- the desired surface (not null, unaffected)
-