public abstract class CollisionShape extends java.lang.Object implements 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 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() |
Vector3f |
getScale() |
void |
read(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(Vector3f scale) |
void |
write(JmeExporter ex) |
protected com.bulletphysics.collision.shapes.CollisionShape cShape
protected 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(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 Vector3f getScale()
public void write(JmeExporter ex) throws java.io.IOException
public void read(JmeImporter im) throws java.io.IOException