Search in sources :

Example 6 with EditPlane

use of org.jwildfire.create.tina.base.EditPlane in project JWildfire by thargor6.

the class Affine3DMutation method execute.

@Override
public void execute(Layer pLayer) {
    Flame flame = pLayer.getOwner();
    flame.setCamPitch(30 + Math.random() * 20.0);
    flame.setCamYaw(15 - Math.random() * 30.0);
    flame.setCamPerspective(0.05 + Math.random() * 0.2);
    flame.setCamDOFArea(0.2 + Math.random() * 0.5);
    if (!flame.isPreserveZ() && Math.random() > 0.33) {
        flame.setPreserveZ(true);
    }
    EditPlane editPlane = flame.getEditPlane();
    try {
        flame.setEditPlane(Math.random() < 0.5 ? EditPlane.YZ : EditPlane.ZX);
        apply(pLayer, 0.75);
        flame.setEditPlane(Math.random() < 0.5 ? EditPlane.YZ : EditPlane.ZX);
        apply(pLayer, 0.2);
        flame.setEditPlane(Math.random() < 0.5 ? EditPlane.YZ : EditPlane.ZX);
        apply(pLayer, 0.1);
    } finally {
        flame.setEditPlane(editPlane);
    }
}
Also used : EditPlane(org.jwildfire.create.tina.base.EditPlane) Flame(org.jwildfire.create.tina.base.Flame)

Aggregations

EditPlane (org.jwildfire.create.tina.base.EditPlane)6 Flame (org.jwildfire.create.tina.base.Flame)1 Variation (org.jwildfire.create.tina.variation.Variation)1