public abstract class CollisionShape
extends java.lang.Object
implements com.jme3.export.Savable
| Modifier and Type | Field and Description |
|---|---|
protected com.bulletphysics.collision.shapes.CollisionShape |
cShape |
protected float |
margin
copy of collision margin (in physics-space units, >0, default=0)
|
protected com.jme3.math.Vector3f |
scale |
| Modifier | Constructor and Description |
|---|---|
protected |
CollisionShape() |
| Modifier and Type | Method and Description |
|---|---|
void |
calculateLocalInertia(float mass,
javax.vecmath.Vector3f vector)
used internally, not safe
|
com.bulletphysics.collision.shapes.CollisionShape |
getCShape()
used internally
|
static float |
getDefaultMargin()
Read the default margin for new shapes.
|
float |
getMargin() |
com.jme3.math.Vector3f |
getScale() |
void |
read(com.jme3.export.JmeImporter im) |
void |
setCShape(com.bulletphysics.collision.shapes.CollisionShape cShape)
used internally
|
static void |
setDefaultMargin(float margin)
Alter the default margin for new shapes.
|
void |
setMargin(float margin) |
void |
setScale(com.jme3.math.Vector3f scale) |
void |
write(com.jme3.export.JmeExporter ex) |
protected com.bulletphysics.collision.shapes.CollisionShape cShape
protected com.jme3.math.Vector3f scale
protected float margin
public void calculateLocalInertia(float mass,
javax.vecmath.Vector3f vector)
mass - the desired mass for the bodyvector - storage for the result (not null, modified)public com.bulletphysics.collision.shapes.CollisionShape getCShape()
public void setCShape(com.bulletphysics.collision.shapes.CollisionShape cShape)
cShape - the shape to use (alias created)public void setScale(com.jme3.math.Vector3f scale)
public float getMargin()
public static void setDefaultMargin(float margin)
margin - the desired margin distance (in physics-space units, >0,
default=0.04)public static float getDefaultMargin()
public void setMargin(float margin)
public com.jme3.math.Vector3f getScale()
public void write(com.jme3.export.JmeExporter ex)
throws java.io.IOException
write in interface com.jme3.export.Savablejava.io.IOExceptionpublic void read(com.jme3.export.JmeImporter im)
throws java.io.IOException
read in interface com.jme3.export.Savablejava.io.IOException