Search in sources :

Example 1 with SpawnShapeValue

use of com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue in project libgdx by libgdx.

the class SpawnInfluencerPanel method setCurrentSpawnData.

private void setCurrentSpawnData(SpawnShapeValue spawnShapeValue) {
    SpawnShapeValue local = null;
    if (spawnShapeValue instanceof PointSpawnShapeValue)
        local = pointSpawnShapeValue;
    else if (spawnShapeValue instanceof LineSpawnShapeValue)
        local = lineSpawnShapeValue;
    else if (spawnShapeValue instanceof RectangleSpawnShapeValue)
        local = rectangleSpawnShapeValue;
    else if (spawnShapeValue instanceof EllipseSpawnShapeValue)
        local = ellipseSpawnShapeValue;
    else if (spawnShapeValue instanceof CylinderSpawnShapeValue)
        local = cylinderSpawnShapeValue;
    if (spawnShapeValue instanceof UnweightedMeshSpawnShapeValue)
        local = meshSpawnShapeValue;
    else if (spawnShapeValue instanceof WeightMeshSpawnShapeValue)
        local = weightMeshSpawnShapeValue;
    local.load(spawnShapeValue);
}
Also used : RectangleSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.RectangleSpawnShapeValue) EllipseSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.EllipseSpawnShapeValue) UnweightedMeshSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.UnweightedMeshSpawnShapeValue) WeightMeshSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.WeightMeshSpawnShapeValue) LineSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.LineSpawnShapeValue) LineSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.LineSpawnShapeValue) EllipseSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.EllipseSpawnShapeValue) UnweightedMeshSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.UnweightedMeshSpawnShapeValue) WeightMeshSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.WeightMeshSpawnShapeValue) RectangleSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.RectangleSpawnShapeValue) PointSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.PointSpawnShapeValue) SpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue) PrimitiveSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.PrimitiveSpawnShapeValue) CylinderSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.CylinderSpawnShapeValue) PointSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.PointSpawnShapeValue) CylinderSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.CylinderSpawnShapeValue)

Example 2 with SpawnShapeValue

use of com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue in project libgdx by libgdx.

the class SpawnInfluencerPanel method onTemplateChecked.

@Override
public void onTemplateChecked(Model model, boolean isChecked) {
    //Update the shapes
    SpawnShapeValue shapeValue = null;
    Mesh mesh = model.meshes.get(0);
    weightMeshSpawnShapeValue.setMesh(mesh, model);
    meshSpawnShapeValue.setMesh(mesh, model);
    if (shapeCombo.getSelectedItem() == SPAWN_SHAPE_WEIGHT_MESH) {
        SpawnInfluencer influencer = (SpawnInfluencer) editor.getEmitter().findInfluencer(SpawnInfluencer.class);
        influencer.spawnShapeValue = weightMeshSpawnShapeValue;
    } else if (shapeCombo.getSelectedItem() == SPAWN_SHAPE_MESH) {
        SpawnInfluencer influencer = (SpawnInfluencer) editor.getEmitter().findInfluencer(SpawnInfluencer.class);
        influencer.spawnShapeValue = meshSpawnShapeValue;
    }
    editor.restart();
}
Also used : Mesh(com.badlogic.gdx.graphics.Mesh) SpawnInfluencer(com.badlogic.gdx.graphics.g3d.particles.influencers.SpawnInfluencer) LineSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.LineSpawnShapeValue) EllipseSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.EllipseSpawnShapeValue) UnweightedMeshSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.UnweightedMeshSpawnShapeValue) WeightMeshSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.WeightMeshSpawnShapeValue) RectangleSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.RectangleSpawnShapeValue) PointSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.PointSpawnShapeValue) SpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue) PrimitiveSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.PrimitiveSpawnShapeValue) CylinderSpawnShapeValue(com.badlogic.gdx.graphics.g3d.particles.values.CylinderSpawnShapeValue)

Aggregations

CylinderSpawnShapeValue (com.badlogic.gdx.graphics.g3d.particles.values.CylinderSpawnShapeValue)2 EllipseSpawnShapeValue (com.badlogic.gdx.graphics.g3d.particles.values.EllipseSpawnShapeValue)2 LineSpawnShapeValue (com.badlogic.gdx.graphics.g3d.particles.values.LineSpawnShapeValue)2 PointSpawnShapeValue (com.badlogic.gdx.graphics.g3d.particles.values.PointSpawnShapeValue)2 PrimitiveSpawnShapeValue (com.badlogic.gdx.graphics.g3d.particles.values.PrimitiveSpawnShapeValue)2 RectangleSpawnShapeValue (com.badlogic.gdx.graphics.g3d.particles.values.RectangleSpawnShapeValue)2 SpawnShapeValue (com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue)2 UnweightedMeshSpawnShapeValue (com.badlogic.gdx.graphics.g3d.particles.values.UnweightedMeshSpawnShapeValue)2 WeightMeshSpawnShapeValue (com.badlogic.gdx.graphics.g3d.particles.values.WeightMeshSpawnShapeValue)2 Mesh (com.badlogic.gdx.graphics.Mesh)1 SpawnInfluencer (com.badlogic.gdx.graphics.g3d.particles.influencers.SpawnInfluencer)1