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
FieldsFields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
enableContactFilter, logger, margin, scaleFields inherited from class com.jme3.bullet.NativePhysicsObject
loggerN -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNo-argument constructor needed by SavableClassUtil.PlaneCollisionShape(com.jme3.math.Plane plane) Instantiate a plane shape defined by the specified plane. -
Method Summary
Modifier and TypeMethodDescriptionvoidcloneFields(com.jme3.util.clone.Cloner cloner, Object original) Callback fromClonerto convert this shallow-cloned shape into a deep-cloned one, using the specified Cloner and original to resolve copied fields.final com.jme3.math.PlanegetPlane()Copy the defining plane.floatCalculate how far the shape extends.voidread(com.jme3.export.JmeImporter importer) De-serialize the shape from the specified importer, for example when loading from a J3O file.voidwrite(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, userIndex2Methods 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 fromClonerto convert this shallow-cloned shape into a deep-cloned one, using the specified Cloner and original to resolve copied fields.- Specified by:
cloneFieldsin interfacecom.jme3.util.clone.JmeCloneable- Overrides:
cloneFieldsin 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:
maxRadiusin classCollisionShape- Returns:
- positive infinity
-
read
De-serialize the shape from the specified importer, for example when loading from a J3O file.- Specified by:
readin interfacecom.jme3.export.Savable- Overrides:
readin 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:
writein interfacecom.jme3.export.Savable- Overrides:
writein classCollisionShape- Parameters:
exporter- (not null)- Throws:
IOException- from the exporter
-