Package com.jme3.effect.shapes
Class EmitterMeshFaceShape
java.lang.Object
com.jme3.effect.shapes.EmitterMeshVertexShape
com.jme3.effect.shapes.EmitterMeshFaceShape
- All Implemented Interfaces:
- EmitterShape,- Savable,- JmeCloneable,- Cloneable
- Direct Known Subclasses:
- EmitterMeshConvexHullShape
This emitter shape emits the particles from the given shape's faces.
- 
Field SummaryFields inherited from class com.jme3.effect.shapes.EmitterMeshVertexShapenormals, vertices
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidgetRandomPoint(Vector3f store) Randomly selects a point on a random face of one of the stored meshes.voidgetRandomPointAndNormal(Vector3f store, Vector3f normal) Randomly selects a point on a random face of one of the stored meshes, and also sets the normal of that selected face.voidSets the meshes for this emitter shape.Methods inherited from class com.jme3.effect.shapes.EmitterMeshVertexShapecloneFields, deepClone, jmeClone, read, write
- 
Constructor Details- 
EmitterMeshFaceShapepublic EmitterMeshFaceShape()Empty constructor. Sets nothing.
- 
EmitterMeshFaceShapeConstructor. Initializes the emitter shape with a list of meshes. The vertices and normals for all triangles of these meshes are extracted and stored internally.- Parameters:
- meshes- a list of- Meshobjects that will define the shape from which particles are emitted.
 
 
- 
- 
Method Details- 
setMeshesSets the meshes for this emitter shape. This method extracts all triangle vertices and computes their normals, storing them internally for subsequent particle emission.- Overrides:
- setMeshesin class- EmitterMeshVertexShape
- Parameters:
- meshes- a list of- Meshobjects to set as the emitter's shape.
 
- 
getRandomPointRandomly selects a point on a random face of one of the stored meshes. The point is generated using barycentric coordinates to ensure uniform distribution within the selected triangle.- Specified by:
- getRandomPointin interface- EmitterShape
- Overrides:
- getRandomPointin class- EmitterMeshVertexShape
- Parameters:
- store- a- Vector3fobject where the coordinates of the selected point will be stored.
 
- 
getRandomPointAndNormalRandomly selects a point on a random face of one of the stored meshes, and also sets the normal of that selected face. The point is generated using barycentric coordinates for uniform distribution.- Specified by:
- getRandomPointAndNormalin interface- EmitterShape
- Overrides:
- getRandomPointAndNormalin class- EmitterMeshVertexShape
- Parameters:
- store- a- Vector3fobject where the coordinates of the selected point will be stored.
- normal- a- Vector3fobject where the normal of the selected face will be stored.
 
 
-