Search in sources :

Example 1 with Spherical3DWFFunc

use of org.jwildfire.create.tina.variation.Spherical3DWFFunc in project JWildfire by thargor6.

the class FlameMorphService method prepareMorphXForm.

private static void prepareMorphXForm(XForm pXForm) {
    int i = 0;
    while (i < pXForm.getVariationCount()) {
        Variation var = pXForm.getVariation(i);
        if (var.getFunc() instanceof Spherical3DWFFunc) {
            Object invert = var.getFunc().getParameter(Spherical3DWFFunc.PARAM_INVERT);
            if (invert != null && ((Integer) invert) == 1) {
                var.getFunc().setParameter(Spherical3DWFFunc.PARAM_INVERT, 0);
                var.setAmount(-var.getAmount());
            }
        } else if (var.getFunc() instanceof PostMirrorWFFunc) {
            pXForm.removeVariation(var);
            i--;
        }
        i++;
    }
}
Also used : Spherical3DWFFunc(org.jwildfire.create.tina.variation.Spherical3DWFFunc) Variation(org.jwildfire.create.tina.variation.Variation) PostMirrorWFFunc(org.jwildfire.create.tina.variation.PostMirrorWFFunc)

Aggregations

PostMirrorWFFunc (org.jwildfire.create.tina.variation.PostMirrorWFFunc)1 Spherical3DWFFunc (org.jwildfire.create.tina.variation.Spherical3DWFFunc)1 Variation (org.jwildfire.create.tina.variation.Variation)1