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
ConstructorDescriptionEmpty constructor.EmitterMeshConvexHullShape
(List<Mesh> meshes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
getRandomPoint
(Vector3f store) Randomly selects a point inside the convex hull of a randomly selected mesh.void
getRandomPointAndNormal
(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
setMeshes
Methods 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:
getRandomPoint
in interfaceEmitterShape
- Overrides:
getRandomPoint
in 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. Thenormal
argument is not used.- Specified by:
getRandomPointAndNormal
in interfaceEmitterShape
- Overrides:
getRandomPointAndNormal
in classEmitterMeshFaceShape
- Parameters:
store
- storage for the coordinates of the selected pointnormal
- not used in this class
-