public class SphereCollisionShape extends CollisionShape
| Modifier and Type | Field and Description | 
|---|---|
| protected float | radiuscopy of radius (≥0) | 
margin, objectId, scale| Modifier | Constructor and Description | 
|---|---|
| protected  | SphereCollisionShape()No-argument constructor needed by SavableClassUtil. | 
|   | SphereCollisionShape(float radius)Instantiate a sphere shape with the specified radius. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | createShape()Instantiate the configured shape in Bullet. | 
| float | getRadius()Read the radius of the sphere. | 
| void | read(JmeImporter im)De-serialize this shape, for example when loading from a J3O file. | 
| void | setScale(Vector3f scale)Alter the scaling factors of this shape. | 
| void | write(JmeExporter ex)Serialize this shape, for example when saving to a J3O file. | 
finalize, getDefaultMargin, getMargin, getObjectId, getScale, isNonMoving, setDefaultMargin, setMargin, setObjectIdprotected SphereCollisionShape()
public SphereCollisionShape(float radius)
radius - the desired radius (≥0)public float getRadius()
public void write(JmeExporter ex) throws java.io.IOException
write in interface Savablewrite in class CollisionShapeex - exporter (not null)java.io.IOException - from exporterpublic void read(JmeImporter im) throws java.io.IOException
read in interface Savableread in class CollisionShapeim - importer (not null)java.io.IOException - from importerpublic void setScale(Vector3f scale)
setScale in class CollisionShapescale - the desired scaling factor for each local axis (not null, no
 negative component, unaffected, default=1,1,1)protected void createShape()