com.jme3.effect.shapes
Class EmitterMeshFaceShape

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

public class EmitterMeshFaceShape
extends EmitterMeshVertexShape

This emiter shape emits the particles from the given shape's faces.


Field Summary
 
Fields inherited from class com.jme3.effect.shapes.EmitterMeshVertexShape
normals, vertices
 
Constructor Summary
EmitterMeshFaceShape()
          Empty constructor.
EmitterMeshFaceShape(java.util.List<Mesh> meshes)
          Constructor.
 
Method Summary
 void getRandomPoint(Vector3f store)
          This method fills the point with coordinates of randomly selected point on a random face.
 void getRandomPointAndNormal(Vector3f store, Vector3f normal)
          This method fills the point with coordinates of randomly selected point on a random face.
 void setMeshes(java.util.List<Mesh> meshes)
          This method sets the meshes that will form the emiter's shape.
 
Methods inherited from class com.jme3.effect.shapes.EmitterMeshVertexShape
deepClone, read, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmitterMeshFaceShape

public EmitterMeshFaceShape()
Empty constructor. Sets nothing.


EmitterMeshFaceShape

public EmitterMeshFaceShape(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)
Description copied from class: EmitterMeshVertexShape
This method sets the meshes that will form the emiter's shape.

Overrides:
setMeshes in class EmitterMeshVertexShape
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 point on a random face.

Specified by:
getRandomPoint in interface EmitterShape
Overrides:
getRandomPoint in class EmitterMeshVertexShape
Parameters:
store - the variable to store with coordinates of randomly selected selected point on a random face

getRandomPointAndNormal

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

Specified by:
getRandomPointAndNormal in interface EmitterShape
Overrides:
getRandomPointAndNormal in class EmitterMeshVertexShape
Parameters:
store - the variable to store with coordinates of randomly selected selected point on a random face
normal - filled with selected face's normal