com.jme3.effect.shapes
Class EmitterMeshConvexHullShape

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

public class EmitterMeshConvexHullShape
extends EmitterMeshFaceShape

This emiter shape emits the particles from the given shape's interior constrained by its convex hull (a geometry that tightly wraps the mesh). So in case of multiple meshes some vertices may appear in a space between them.


Field Summary
 
Fields inherited from class com.jme3.effect.shapes.EmitterMeshVertexShape
normals, vertices
 
Constructor Summary
EmitterMeshConvexHullShape()
          Empty constructor.
EmitterMeshConvexHullShape(java.util.List<Mesh> meshes)
          Constructor.
 
Method Summary
 void getRandomPoint(Vector3f store)
          This method fills the point with coordinates of randomly selected point inside a convex hull of randomly selected mesh.
 void getRandomPointAndNormal(Vector3f store, Vector3f normal)
          This method fills the point with coordinates of randomly selected point inside a convex hull of randomly selected mesh.
 
Methods inherited from class com.jme3.effect.shapes.EmitterMeshFaceShape
setMeshes
 
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

EmitterMeshConvexHullShape

public EmitterMeshConvexHullShape()
Empty constructor. Sets nothing.


EmitterMeshConvexHullShape

public EmitterMeshConvexHullShape(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

getRandomPoint

public void getRandomPoint(Vector3f store)
This method fills the point with coordinates of randomly selected point inside a convex hull of randomly selected mesh.

Specified by:
getRandomPoint in interface EmitterShape
Overrides:
getRandomPoint in class EmitterMeshFaceShape
Parameters:
store - the variable to store with coordinates of randomly selected selected point inside a convex hull of randomly selected mesh

getRandomPointAndNormal

public void getRandomPointAndNormal(Vector3f store,
                                    Vector3f normal)
This method fills the point with coordinates of randomly selected point inside a convex hull of randomly selected mesh. The normal param is not used.

Specified by:
getRandomPointAndNormal in interface EmitterShape
Overrides:
getRandomPointAndNormal in class EmitterMeshFaceShape
Parameters:
store - the variable to store with coordinates of randomly selected selected point inside a convex hull of randomly selected mesh
normal - not used in this class