class
MeshEmissionHelper
Contains common functionality for particle mesh emitters.
Public
Methods
Initialize
Initializes the emission helper if the provided mesh contains necessary data for particle emission.
Otherwise reports any issues in the log.
- mesh
- Mesh to validate.
- perVertex
- Set to true if particle emission is happening on mesh vertices.
- skinning
- Set to true if the mesh will be animated using skinning.
Returns: True if initialized, or false if issues were detected.
GetSequentialVertex
Returns the next sequential vertex on the mesh and increments the internal counter so the next vertex is returned on the following call.
Loops around if end is reached. Returns vertex position, normal and index.
GetRandomVertex
Randomly picks a vertex on the mesh and returns its position, normal and index.
GetRandomEdge
Randomly picks an edge on the mesh and returns the position, normal and indices of its vertices.
GetRandomTriangle
Randomly picks an triangle on the mesh and returns the position, normal and indices of its vertices.
GetBlendMatrix
Evaluates a blend matrix for a vertex at the specified index.