|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jmex.physics.material.Material
public class Material
A material specifies contact and mass details about a collision geometry or physics node.
PhysicsCollisionGeometry.setMaterial(Material),
PhysicsNode.setMaterial(Material)| Field Summary | |
|---|---|
static Material |
CONCRETE
|
static Material |
DEFAULT
|
static Material |
GHOST
|
static Material |
GLASS
|
static Material |
GRANITE
|
static Material |
ICE
|
static Material |
IRON
|
static Material |
OSMIUM
|
static Material |
PLASTIC
|
static Material |
RUBBER
|
static Material |
SPONGE
|
static Material |
WOOD
|
| Constructor Summary | |
|---|---|
Material()
Create a new material without name. |
|
Material(java.lang.String name)
Create a new material. |
|
| Method Summary | |
|---|---|
static Material |
checkForCommonMaterial(Material material)
Returns whether the given material is one of the common materials (GLASS, WOOD, etc.). |
java.lang.Class |
getClassTag()
|
ContactHandlingDetails |
getContactHandlingDetails(Material contactMaterial)
Query contact details of this material with another material. |
com.jme.renderer.ColorRGBA |
getDebugColor(com.jme.renderer.ColorRGBA color)
getter for field debugColor |
float |
getDensity()
Density of this material. |
java.lang.String |
getName()
|
float |
getSpringPenetrationDepth()
|
com.jme.math.Vector3f |
getSurfaceMotion(com.jme.math.Vector3f store)
|
void |
putContactHandlingDetails(Material contactMaterial,
ContactHandlingDetails details)
Specify contact details like friction (mu), bouciness etc. |
void |
read(com.jme.util.export.JMEImporter im)
|
void |
setDebugColor(com.jme.renderer.ColorRGBA value)
setter for field debugColor |
void |
setDensity(float value)
Change the density of this material. |
void |
setName(java.lang.String name)
Sets the name of the material, can be null |
void |
setSpringPenetrationDepth(float springPenetrationDepth)
|
void |
setSurfaceMotion(com.jme.math.Vector3f motion)
Surface motion - if set, the surface is assumed to be moving independently of the motion of the nodes. |
java.lang.String |
toString()
|
void |
write(com.jme.util.export.JMEExporter ex)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Material IRON
public static final Material WOOD
public static final Material CONCRETE
public static final Material GRANITE
public static final Material GLASS
public static final Material PLASTIC
public static final Material RUBBER
public static final Material ICE
public static final Material DEFAULT
public static final Material GHOST
public static final Material OSMIUM
public static final Material SPONGE
| Constructor Detail |
|---|
public Material(java.lang.String name)
name - name for this material, can be nullpublic Material()
| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - name of the materialpublic float getDensity()
public void setDensity(float value)
value - new valuepublic com.jme.renderer.ColorRGBA getDebugColor(com.jme.renderer.ColorRGBA color)
color - where to put the debug color (null to create a new ColorRGBA)
public void setDebugColor(com.jme.renderer.ColorRGBA value)
value - new valuepublic ContactHandlingDetails getContactHandlingDetails(Material contactMaterial)
contactMaterial - the second material
public void putContactHandlingDetails(Material contactMaterial,
ContactHandlingDetails details)
material1.getContactHandlingDetails( material2 )material2.getContactHandlingDetails( material1 )
contactMaterial - contact material, null for setting default detailsdetails - contact details for specified contact pair / default, null to clearpublic void setSurfaceMotion(com.jme.math.Vector3f motion)
motion - this vector specifies the motion of the surface in geometry coordinate space. This results in a
motion relative to the world rotation of the geometry but independent from the direction of the surface itself.public com.jme.math.Vector3f getSurfaceMotion(com.jme.math.Vector3f store)
store - where to store the retrieved value (null to create a new vector)
setSurfaceMotion(com.jme.math.Vector3f)public java.lang.String toString()
toString in class java.lang.Objectpublic float getSpringPenetrationDepth()
public void setSpringPenetrationDepth(float springPenetrationDepth)
public static Material checkForCommonMaterial(Material material)
material - The material to check
public java.lang.Class getClassTag()
getClassTag in interface com.jme.util.export.Savable
public void read(com.jme.util.export.JMEImporter im)
throws java.io.IOException
read in interface com.jme.util.export.Savablejava.io.IOException
public void write(com.jme.util.export.JMEExporter ex)
throws java.io.IOException
write in interface com.jme.util.export.Savablejava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||