com.jme3.effect.shapes
Class EmitterMeshVertexShape

java.lang.Object
  extended by com.jme3.effect.shapes.EmitterMeshVertexShape
All Implemented Interfaces:
EmitterShape, Savable, java.lang.Cloneable
Direct Known Subclasses:
EmitterMeshFaceShape

public class EmitterMeshVertexShape
extends java.lang.Object
implements EmitterShape

This emiter shape emits the particles from the given shape's vertices


Field Summary
protected  java.util.List<java.util.List<Vector3f>> normals
           
protected  java.util.List<java.util.List<Vector3f>> vertices
           
 
Constructor Summary
EmitterMeshVertexShape()
          Empty constructor.
EmitterMeshVertexShape(java.util.List<Mesh> meshes)
          Constructor.
 
Method Summary
 EmitterShape deepClone()
          This method creates a deep clone of the current instance of the emitter shape.
 void getRandomPoint(Vector3f store)
          This method fills the point with coordinates of randomly selected mesh vertex.
 void getRandomPointAndNormal(Vector3f store, Vector3f normal)
          This method fills the point with coordinates of randomly selected mesh vertex.
 void read(JmeImporter im)
           
 void setMeshes(java.util.List<Mesh> meshes)
          This method sets the meshes that will form the emiter's shape.
 void write(JmeExporter ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vertices

protected java.util.List<java.util.List<Vector3f>> vertices

normals

protected java.util.List<java.util.List<Vector3f>> normals
Constructor Detail

EmitterMeshVertexShape

public EmitterMeshVertexShape()
Empty constructor. Sets nothing.


EmitterMeshVertexShape

public EmitterMeshVertexShape(java.util.List<Mesh> meshes)
Constructor. It stores a copy of vertex list of all meshes.

Parameters:
meshes - a list of meshes that will form the emitter's shape
Method Detail

setMeshes

public void setMeshes(java.util.List<Mesh> meshes)
This method sets the meshes that will form the emiter's shape.

Parameters:
meshes - a list of meshes that will form the emitter's shape

getRandomPoint

public void getRandomPoint(Vector3f store)
This method fills the point with coordinates of randomly selected mesh vertex.

Specified by:
getRandomPoint in interface EmitterShape
Parameters:
store - the variable to store with coordinates of randomly selected mesh vertex

getRandomPointAndNormal

public void getRandomPointAndNormal(Vector3f store,
                                    Vector3f normal)
This method fills the point with coordinates of randomly selected mesh vertex. The normal param is filled with selected vertex's normal.

Specified by:
getRandomPointAndNormal in interface EmitterShape
Parameters:
store - the variable to store with coordinates of randomly selected mesh vertex
normal - filled with selected vertex's normal

deepClone

public EmitterShape deepClone()
Description copied from interface: EmitterShape
This method creates a deep clone of the current instance of the emitter shape.

Specified by:
deepClone in interface EmitterShape
Returns:
deep clone of the current instance of the emitter shape

write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException