APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.graphics.g3d.particles.values

public final Class WeightMeshSpawnShapeValue

extends MeshSpawnShapeValue
Class Inheritance
Imports
com.badlogic.gdx.graphics.VertexAttributes, .VertexAttributes.Usage, com.badlogic.gdx.math.CumulativeDistribution, .MathUtils, .Vector3

Encapsulate the formulas to spawn a particle on a mesh shape dealing with not uniform area triangles.
Author
Inferno

Field Summary

Modifier and TypeField and Description
private CumulativeDistribution<MeshSpawnShapeValue.Triangle>
Inherited from com.badlogic.gdx.graphics.g3d.particles.values.MeshSpawnShapeValue:
meshmodel

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
calculateWeights()

Calculate the weights of each triangle of the wrapped mesh.

public SpawnShapeValue
public void
public void
Inherited from com.badlogic.gdx.graphics.g3d.particles.values.MeshSpawnShapeValue:
loadloadsavesetMeshsetMesh

Field Detail

distributionback to summary
private CumulativeDistribution<MeshSpawnShapeValue.Triangle> distribution

Constructor Detail

WeightMeshSpawnShapeValueback to summary
public WeightMeshSpawnShapeValue(WeightMeshSpawnShapeValue value)
WeightMeshSpawnShapeValueback to summary
public WeightMeshSpawnShapeValue()

Method Detail

calculateWeightsback to summary
public void calculateWeights()

Calculate the weights of each triangle of the wrapped mesh. If the mesh has indices: the function will calculate the weight of those triangles. If the mesh has not indices: the function will consider the vertices as a triangle strip.

copyback to summary
public SpawnShapeValue copy()

Implements abstract com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue.copy.

Annotations
@Override
initback to summary
public void init()

Overrides com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue.init.

Annotations
@Override
spawnAuxback to summary
public void spawnAux(Vector3 vector, float percent)

Implements abstract com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue.spawnAux.

Annotations
@Override