Package com.jme3.bullet.collision.shapes
Class EmptyShape
java.lang.Object
com.jme3.bullet.NativePhysicsObject
com.jme3.bullet.collision.shapes.CollisionShape
com.jme3.bullet.collision.shapes.EmptyShape
- All Implemented Interfaces:
com.jme3.export.Savable,com.jme3.util.clone.JmeCloneable,Cloneable,Comparable<NativePhysicsObject>
An empty collision shape based on Bullet's
btEmptyShape.-
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.EmptyShape(boolean unused) Instantiate an empty shape. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSplit()Test whether the shape can be split by an arbitrary plane.voidcloneFields(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.floatCalculate how far the shape extends from its center.voidread(com.jme3.export.JmeImporter importer) De-serialize the shape from the specified importer, for example when loading from a J3O file.floatReturn the volume of the shape, including scale and margin.floatReturn the volume of the shape.Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShape
aabbCenter, aabbScaledVolume, boundingBox, boundingBox, canScale, copyShapeProperties, getDefaultMargin, getMargin, getScale, getScaleDp, getShapeType, getShapeType, isConcave, isContactFilterEnabled, isConvex, isInfinite, isNonMoving, isPolyhedral, jmeClone, nativeMargin, readShapeProperties, recalculateAabb, setContactFilterEnabled, setDefaultMargin, setMargin, setNativeId, setScale, setScale, setUserIndex, setUserIndex2, toSplittableShape, toString, updateScale, userIndex, userIndex2, writeMethods 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
-
EmptyShape
protected EmptyShape()No-argument constructor needed by SavableClassUtil. -
EmptyShape
public EmptyShape(boolean unused) Instantiate an empty shape.- Parameters:
unused- to distinguish this from the no-argument constructor
-
-
Method Details
-
unscaledVolume
public float unscaledVolume()Return the volume of the shape.- Returns:
- 0
-
canSplit
public boolean canSplit()Test whether the shape can be split by an arbitrary plane.- Overrides:
canSplitin classCollisionShape- Returns:
- true
-
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 from its center.- Overrides:
maxRadiusin classCollisionShape- Returns:
- 0
-
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
-
scaledVolume
public float scaledVolume()Return the volume of the shape, including scale and margin.- Overrides:
scaledVolumein classCollisionShape- Returns:
- 0
-