Package com.jme3.effect.shapes
Class EmitterMeshConvexHullShape
java.lang.Object
com.jme3.effect.shapes.EmitterMeshVertexShape
com.jme3.effect.shapes.EmitterMeshFaceShape
com.jme3.effect.shapes.EmitterMeshConvexHullShape
- All Implemented Interfaces:
EmitterShape,Savable,JmeCloneable,Cloneable
This emitter 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
ConstructorsConstructorDescriptionEmpty constructor.EmitterMeshConvexHullShape(List<Mesh> meshes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidgetRandomPoint(Vector3f store) Randomly selects a point inside the convex hull of a randomly selected mesh.voidgetRandomPointAndNormal(Vector3f store, Vector3f normal) Randomly selects a point inside the convex hull of a randomly selected mesh.Methods inherited from class com.jme3.effect.shapes.EmitterMeshFaceShape
setMeshesMethods inherited from class com.jme3.effect.shapes.EmitterMeshVertexShape
cloneFields, deepClone, jmeClone, read, write
-
Constructor Details
-
EmitterMeshConvexHullShape
public EmitterMeshConvexHullShape()Empty constructor. Sets nothing. -
EmitterMeshConvexHullShape
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 Details
-
getRandomPoint
Randomly selects a point inside the convex hull of a randomly selected mesh.- Specified by:
getRandomPointin interfaceEmitterShape- Overrides:
getRandomPointin classEmitterMeshFaceShape- Parameters:
store- storage for the coordinates of the selected point
-
getRandomPointAndNormal
Randomly selects a point inside the convex hull of a randomly selected mesh. Thenormalargument is not used.- Specified by:
getRandomPointAndNormalin interfaceEmitterShape- Overrides:
getRandomPointAndNormalin classEmitterMeshFaceShape- Parameters:
store- storage for the coordinates of the selected pointnormal- not used in this class
-