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
,ConstShapeSettings
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
Settings used to construct a
PlaneShape
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
default 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 TypeMethodDescriptionfloat
Return the half extent.Return the material.getPlane()
Copy the surface equation.void
setHalfExtent
(float halfExtent) Alter the plane's extent.void
setMaterial
(ConstPhysicsMaterial material) Replace the material.void
setPlane
(ConstPlane plane) Alter the surface equation.Methods inherited from class com.github.stephengold.joltjni.ShapeSettings
clearCachedResult, create, getRefCount, setEmbedded, toRef, toRefC
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
-
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) ornull
for 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) ornull
for 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
null
if 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, ornull
if none (default=null)
-
setPlane
Alter the surface equation. (native attribute: mPlane)- Parameters:
plane
- the desired surface (not null, unaffected)
-