Search in sources :

Example 1 with FlameParams

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

the class IFlamesController method copyBaseFlameParamsToOthersButton_clicked.

public void copyBaseFlameParamsToOthersButton_clicked() {
    saveUndoPoint();
    int currIdx = getCurrFlameIndex();
    FlameParams src = getIFlamesFunc().getFlameParams(getCurrFlameIndex());
    for (int i = 0; i < IFlamesFunc.MAX_FLAME_COUNT; i++) {
        if (i != currIdx) {
            FlameParams dst = getIFlamesFunc().getFlameParams(i);
            dst.setSize(src.getSize());
            dst.setSizeVar(src.getSizeVar());
            dst.setCentreX(src.getCentreX());
            dst.setCentreY(src.getCentreY());
            dst.setCentreZ(src.getCentreZ());
            dst.setRotateAlpha(src.getRotateAlpha());
            dst.setRotateAlphaVar(src.getRotateAlphaVar());
            dst.setRotateBeta(src.getRotateBeta());
            dst.setRotateBetaVar(src.getRotateBetaVar());
            dst.setRotateGamma(src.getRotateGamma());
            dst.setRotateGammaVar(src.getRotateGammaVar());
            dst.setInstancing(src.isInstancing());
        }
    }
    enableControls();
    refreshBaseFlamePreview();
    refreshIFlame();
}
Also used : FlameParams(org.jwildfire.create.tina.variation.iflames.FlameParams)

Example 2 with FlameParams

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

the class IFlamesController method copyDynamicsParamsToOthersButton_clicked.

public void copyDynamicsParamsToOthersButton_clicked() {
    saveUndoPoint();
    int currIdx = getCurrFlameIndex();
    FlameParams src = getIFlamesFunc().getFlameParams(getCurrFlameIndex());
    for (int i = 0; i < IFlamesFunc.MAX_FLAME_COUNT; i++) {
        if (i != currIdx) {
            FlameParams dst = getIFlamesFunc().getFlameParams(i);
            dst.setRadialAcceleration(src.getRadialAcceleration());
            dst.setRadialAccelerationVar(src.getRadialAccelerationVar());
            dst.setTangentialAcceleration(src.getTangentialAcceleration());
            dst.setTangentialAccelerationVar(src.getTangentialAccelerationVar());
            dst.setSpeedX(src.getSpeedX());
            dst.setSpeedXVar(src.getSpeedXVar());
            dst.setSpeedY(src.getSpeedY());
            dst.setSpeedYVar(src.getSpeedYVar());
            dst.setSpeedZ(src.getSpeedZ());
            dst.setSpeedZVar(src.getSpeedZVar());
            dst.setRotateAlphaSpeed(src.getRotateAlphaSpeed());
            dst.setRotateAlphaSpeedVar(src.getRotateAlphaSpeedVar());
            dst.setRotateBetaSpeed(src.getRotateBetaSpeed());
            dst.setRotateBetaSpeedVar(src.getRotateBetaSpeedVar());
            dst.setRotateGammaSpeed(src.getRotateGammaSpeed());
            dst.setRotateGammaSpeedVar(src.getRotateGammaSpeedVar());
        }
    }
    enableControls();
    refreshBaseFlamePreview();
    refreshIFlame();
}
Also used : FlameParams(org.jwildfire.create.tina.variation.iflames.FlameParams)

Example 3 with FlameParams

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

the class IFlamesController method refreshMutationFields.

private void refreshMutationFields() {
    IFlamesFunc iflame = getIFlamesFunc();
    if (iflame == null) {
        paramMinValueField.setValue(0.0);
        paramMaxValueField.setValue(0.0);
        paramPropertyPathTree.clearSelection();
    } else {
        FlameParams flameParams = iflame.getFlameParams(getCurrFlameIndex());
        switch(getCurrMutationIndex()) {
            case 0:
                fillMutationFields(getBaseFlame(), flameParams.getFlameParam1Min(), flameParams.getFlameParam1Max(), flameParams.getFlameParam1());
                break;
            case 1:
                fillMutationFields(getBaseFlame(), flameParams.getFlameParam2Min(), flameParams.getFlameParam2Max(), flameParams.getFlameParam2());
                break;
            case 2:
                fillMutationFields(getBaseFlame(), flameParams.getFlameParam3Min(), flameParams.getFlameParam3Max(), flameParams.getFlameParam3());
                break;
            default:
                // nothing to do
                break;
        }
    }
}
Also used : FlameParams(org.jwildfire.create.tina.variation.iflames.FlameParams) IFlamesFunc(org.jwildfire.create.tina.variation.iflames.IFlamesFunc)

Aggregations

FlameParams (org.jwildfire.create.tina.variation.iflames.FlameParams)3 IFlamesFunc (org.jwildfire.create.tina.variation.iflames.IFlamesFunc)1