Class WeightMeshSpawnShapeValue
- java.lang.Object
-
- com.badlogic.gdx.graphics.g3d.particles.values.ParticleValue
-
- com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue
-
- com.badlogic.gdx.graphics.g3d.particles.values.MeshSpawnShapeValue
-
- com.badlogic.gdx.graphics.g3d.particles.values.WeightMeshSpawnShapeValue
-
- All Implemented Interfaces:
ResourceData.Configurable,Json.Serializable
public final class WeightMeshSpawnShapeValue extends MeshSpawnShapeValue
Encapsulate the formulas to spawn a particle on a mesh shape dealing with not uniform area triangles.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.badlogic.gdx.graphics.g3d.particles.values.MeshSpawnShapeValue
MeshSpawnShapeValue.Triangle
-
-
Field Summary
-
Fields inherited from class com.badlogic.gdx.graphics.g3d.particles.values.MeshSpawnShapeValue
mesh, model
-
Fields inherited from class com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue
xOffsetValue, yOffsetValue, zOffsetValue
-
Fields inherited from class com.badlogic.gdx.graphics.g3d.particles.values.ParticleValue
active
-
-
Constructor Summary
Constructors Constructor Description WeightMeshSpawnShapeValue()WeightMeshSpawnShapeValue(WeightMeshSpawnShapeValue value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalculateWeights()Calculate the weights of each triangle of the wrapped mesh.SpawnShapeValuecopy()voidinit()voidspawnAux(Vector3 vector, float percent)-
Methods inherited from class com.badlogic.gdx.graphics.g3d.particles.values.MeshSpawnShapeValue
load, load, save, setMesh, setMesh
-
Methods inherited from class com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue
read, spawn, start, write
-
Methods inherited from class com.badlogic.gdx.graphics.g3d.particles.values.ParticleValue
isActive, setActive
-
-
-
-
Constructor Detail
-
WeightMeshSpawnShapeValue
public WeightMeshSpawnShapeValue(WeightMeshSpawnShapeValue value)
-
WeightMeshSpawnShapeValue
public WeightMeshSpawnShapeValue()
-
-
Method Detail
-
init
public void init()
- Overrides:
initin classSpawnShapeValue
-
calculateWeights
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.
-
spawnAux
public void spawnAux(Vector3 vector, float percent)
- Specified by:
spawnAuxin classSpawnShapeValue
-
copy
public SpawnShapeValue copy()
- Specified by:
copyin classSpawnShapeValue
-
-