public class BoxCollisionShape extends CollisionShape
margin, objectId, scale
Modifier | Constructor and Description |
---|---|
protected |
BoxCollisionShape()
No-argument constructor needed by SavableClassUtil.
|
|
BoxCollisionShape(Vector3f halfExtents)
Instantiate a box shape with the specified half extents.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createShape()
Instantiate the configured shape in Bullet.
|
Vector3f |
getHalfExtents()
Access the half extents of the box.
|
void |
read(JmeImporter im)
De-serialize this shape, for example when loading from a J3O file.
|
void |
write(JmeExporter ex)
Serialize this shape, for example when saving to a J3O file.
|
finalize, getDefaultMargin, getMargin, getObjectId, getScale, isNonMoving, setDefaultMargin, setMargin, setObjectId, setScale
protected BoxCollisionShape()
public BoxCollisionShape(Vector3f halfExtents)
halfExtents
- the desired unscaled half extents (not null, no
negative component, alias created)public final Vector3f getHalfExtents()
public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class CollisionShape
ex
- exporter (not null)java.io.IOException
- from exporterpublic void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class CollisionShape
im
- importer (not null)java.io.IOException
- from importerprotected void createShape()