Package com.jme3.bullet.collision.shapes
Class PlaneCollisionShape
java.lang.Object
com.jme3.bullet.NativePhysicsObject
com.jme3.bullet.collision.shapes.CollisionShape
com.jme3.bullet.collision.shapes.PlaneCollisionShape
- All Implemented Interfaces:
com.jme3.export.Savable
,com.jme3.util.clone.JmeCloneable
,Cloneable
,Comparable<NativePhysicsObject>
A planar collision shape based on Bullet's
btStaticPlaneShape
. Not
for use in dynamic bodies. Collisions between
HeightfieldCollisionShape
, MeshCollisionShape
, and
PlaneCollisionShape
objects are never detected. Similarly, collisions
between GImpactCollisionShape
objects and PlaneCollisionShape
objects are never detected.-
Field Summary
Fields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
enableContactFilter, logger, margin, scale
Fields inherited from class com.jme3.bullet.NativePhysicsObject
loggerN
-
Constructor Summary
ModifierConstructorDescriptionprotected
No-argument constructor needed by SavableClassUtil.PlaneCollisionShape
(com.jme3.math.Plane plane) Instantiate a plane shape defined by the specified plane. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cloneFields
(com.jme3.util.clone.Cloner cloner, Object original) Callback fromCloner
to convert this shallow-cloned shape into a deep-cloned one, using the specified Cloner and original to resolve copied fields.final com.jme3.math.Plane
getPlane()
Copy the defining plane.float
Calculate how far the shape extends.void
read
(com.jme3.export.JmeImporter importer) De-serialize the shape from the specified importer, for example when loading from a J3O file.void
write
(com.jme3.export.JmeExporter exporter) Serialize this shape to the specified exporter, for example when saving to a J3O file.Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShape
aabbCenter, aabbScaledVolume, boundingBox, boundingBox, canScale, canSplit, copyShapeProperties, getDefaultMargin, getMargin, getScale, getScaleDp, getShapeType, getShapeType, isConcave, isContactFilterEnabled, isConvex, isInfinite, isNonMoving, isPolyhedral, jmeClone, nativeMargin, readShapeProperties, recalculateAabb, scaledVolume, setContactFilterEnabled, setDefaultMargin, setMargin, setNativeId, setScale, setScale, setUserIndex, setUserIndex2, toSplittableShape, toString, updateScale, userIndex, userIndex2
Methods inherited from class com.jme3.bullet.NativePhysicsObject
compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeIdNotTracked, unassignNativeObject
-
Field Details
-
logger2
message logger for this class
-
-
Constructor Details
-
PlaneCollisionShape
protected PlaneCollisionShape()No-argument constructor needed by SavableClassUtil. -
PlaneCollisionShape
public PlaneCollisionShape(com.jme3.math.Plane plane) Instantiate a plane shape defined by the specified plane.- Parameters:
plane
- the desired plane (not null, unaffected)
-
-
Method Details
-
getPlane
public final com.jme3.math.Plane getPlane()Copy the defining plane.- Returns:
- a new instance (not null)
-
cloneFields
Callback fromCloner
to convert this shallow-cloned shape into a deep-cloned one, using the specified Cloner and original to resolve copied fields.- Specified by:
cloneFields
in interfacecom.jme3.util.clone.JmeCloneable
- Overrides:
cloneFields
in classCollisionShape
- Parameters:
cloner
- the Cloner that's cloning this shape (not null)original
- the instance from which this shape was shallow-cloned (not null, unaffected)
-
maxRadius
public float maxRadius()Calculate how far the shape extends.- Overrides:
maxRadius
in classCollisionShape
- Returns:
- positive infinity
-
read
De-serialize the shape from the specified importer, for example when loading from a J3O file.- Specified by:
read
in interfacecom.jme3.export.Savable
- Overrides:
read
in classCollisionShape
- Parameters:
importer
- (not null)- Throws:
IOException
- from the importer
-
write
Serialize this shape to the specified exporter, for example when saving to a J3O file.- Specified by:
write
in interfacecom.jme3.export.Savable
- Overrides:
write
in classCollisionShape
- Parameters:
exporter
- (not null)- Throws:
IOException
- from the exporter
-