Package com.jme3.bullet.collision.shapes
Class SphereCollisionShape
java.lang.Object
com.jme3.bullet.collision.shapes.CollisionShape
com.jme3.bullet.collision.shapes.SphereCollisionShape
- All Implemented Interfaces:
Savable
Basic sphere collision shape
-
Field Summary
Fields inherited from class com.jme3.bullet.collision.shapes.CollisionShape
cShape, margin, scale
-
Constructor Summary
ModifierConstructorDescriptionprotected
SphereCollisionShape
(float radius) creates a SphereCollisionShape with the given radius -
Method Summary
Modifier and TypeMethodDescriptionprotected void
float
void
read
(JmeImporter im) void
write
(JmeExporter ex) Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShape
calculateLocalInertia, getCShape, getDefaultMargin, getMargin, getScale, setCShape, setDefaultMargin, setMargin, setScale
-
Field Details
-
radius
protected float radius
-
-
Constructor Details
-
SphereCollisionShape
protected SphereCollisionShape() -
SphereCollisionShape
public SphereCollisionShape(float radius) creates a SphereCollisionShape with the given radius- Parameters:
radius
- the desired radius (in unscaled units)
-
-
Method Details
-
getRadius
public float getRadius() -
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classCollisionShape
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classCollisionShape
- Throws:
IOException
-
createShape
protected void createShape()
-