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
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.EmptyShape
(boolean unused) Instantiate an empty shape. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canSplit()
Test whether the shape can be split by an arbitrary plane.void
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.float
Calculate how far the shape extends from its center.void
read
(com.jme3.export.JmeImporter importer) De-serialize the shape from the specified importer, for example when loading from a J3O file.float
Return the volume of the shape, including scale and margin.float
Return 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, write
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
-
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:
canSplit
in classCollisionShape
- Returns:
- true
-
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 from its center.- Overrides:
maxRadius
in classCollisionShape
- Returns:
- 0
-
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
-
scaledVolume
public float scaledVolume()Return the volume of the shape, including scale and margin.- Overrides:
scaledVolume
in classCollisionShape
- Returns:
- 0
-