use of org.jwildfire.create.tina.variation.iflames.IFlamesFunc in project JWildfire by thargor6.
the class IFlamesController method refreshBaseFlameFields.
private void refreshBaseFlameFields() {
// TODO Auto-generated method stub
IFlamesFunc iflame = getIFlamesFunc();
if (iflame == null) {
baseFlameSizeField.setValue(0.0);
baseFlameSizeVariationField.setValue(0.0);
baseFlameRotateAlphaField.setValue(0.0);
baseFlameRotateAlphaVariationField.setValue(0.0);
baseFlameRotateBetaField.setValue(0.0);
baseFlameRotateBetaVariationField.setValue(0.0);
baseFlameRotateGammaField.setValue(0.0);
baseFlameRotateGammaVariationField.setValue(0.0);
baseFlameCentreXField.setValue(0.0);
baseFlameCentreYField.setValue(0.0);
baseFlameCentreZField.setValue(0.0);
baseFlameMinValueField.setValue(0.0);
baseFlameMaxValueField.setValue(0.0);
baseFlameWeightField.setValue(0.0);
baseFlameGridXOffsetField.setValue(0.0);
baseFlameGridYOffsetField.setValue(0.0);
baseFlameGridXSizeField.setValue(0.0);
baseFlameGridYSizeField.setValue(0.0);
selectedMutationCmb.setSelectedIndex(0);
speedXField.setValue(0.0);
speedYField.setValue(0.0);
speedZField.setValue(0.0);
speedXVarField.setValue(0.0);
speedYVarField.setValue(0.0);
speedZVarField.setValue(0.0);
speedAlphaField.setValue(0.0);
speedBetaField.setValue(0.0);
speedGammaField.setValue(0.0);
speedAlphaVarField.setValue(0.0);
speedBetaVarField.setValue(0.0);
speedGammaVarField.setValue(0.0);
radialAccelField.setValue(0.0);
radialAccelVarField.setValue(0.0);
tangentialAccelField.setValue(0.0);
tangentialAccelVarField.setValue(0.0);
baseFlameBrightnessMinField.setValue(0.0);
baseFlameBrightnessMaxField.setValue(0.0);
baseFlameBrightnessChangeField.setValue(0.0);
baseFlameInstancingCBx.setSelected(false);
} else {
baseFlameSizeField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getSize());
baseFlameSizeVariationField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getSizeVar());
baseFlameRotateAlphaField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateAlpha());
baseFlameRotateAlphaVariationField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateAlphaVar());
baseFlameRotateBetaField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateBeta());
baseFlameRotateBetaVariationField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateBetaVar());
baseFlameRotateGammaField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateGamma());
baseFlameRotateGammaVariationField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateGammaVar());
baseFlameCentreXField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getCentreX());
baseFlameCentreYField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getCentreY());
baseFlameCentreZField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getCentreZ());
baseFlameMinValueField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getMinVal());
baseFlameMaxValueField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getMaxVal());
baseFlameWeightField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getWeight());
baseFlameGridXOffsetField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getGridXOffset());
baseFlameGridYOffsetField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getGridYOffset());
baseFlameGridXSizeField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getGridXSize());
baseFlameGridYSizeField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getGridYSize());
speedXField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getSpeedX());
speedYField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getSpeedY());
speedZField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getSpeedZ());
speedXVarField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getSpeedXVar());
speedYVarField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getSpeedYVar());
speedZVarField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getSpeedZVar());
speedAlphaField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateAlphaSpeed());
speedBetaField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateBetaSpeed());
speedGammaField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateGammaSpeed());
speedAlphaVarField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateAlphaSpeedVar());
speedBetaVarField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateBetaSpeedVar());
speedGammaVarField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRotateGammaSpeedVar());
radialAccelField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRadialAcceleration());
radialAccelVarField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getRadialAccelerationVar());
tangentialAccelField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getTangentialAcceleration());
tangentialAccelVarField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getTangentialAccelerationVar());
baseFlameBrightnessMinField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getBrightnessMin());
baseFlameBrightnessMaxField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getBrightnessMax());
baseFlameBrightnessChangeField.setValue(iflame.getFlameParams(getCurrFlameIndex()).getBrightnessChange());
baseFlameInstancingCBx.setSelected(iflame.getFlameParams(getCurrFlameIndex()).isInstancing());
switch(iflame.getImageParams().getShape_distribution()) {
case BRIGHTNESS:
baseFlameMinValueLabel.setText("Min Brightness");
baseFlameMaxValueLabel.setText("Max Brightness");
break;
case LUMINOSITY:
baseFlameMinValueLabel.setText("Min Luminosity");
baseFlameMaxValueLabel.setText("Max Luminosity");
break;
case HUE:
baseFlameMinValueLabel.setText("Min Hue");
baseFlameMaxValueLabel.setText("Max Hue");
break;
default:
baseFlameMinValueLabel.setText("Min Value");
baseFlameMaxValueLabel.setText("Max Value");
break;
}
}
boolean oldNoRefresh = noRefresh;
noRefresh = true;
try {
flamePropertiesTreeService.refreshFlamePropertiesTree(paramPropertyPathTree, getBaseFlame());
} finally {
noRefresh = oldNoRefresh;
}
refreshMutationFields();
}
use of org.jwildfire.create.tina.variation.iflames.IFlamesFunc in project JWildfire by thargor6.
the class IFlamesController method refreshMotionFields.
private void refreshMotionFields() {
// TODO Auto-generated method stub
IFlamesFunc iflame = getIFlamesFunc();
if (iflame == null) {
motionTimeField.setValue(0.0);
motionLifeTimeField.setValue(0.0);
motionLifeTimeVariationField.setValue(0.0);
motionForceXField.setValue(0.0);
motionForceYField.setValue(0.0);
motionForceZField.setValue(0.0);
forceCentreXField.setValue(0.0);
forceCentreYField.setValue(0.0);
forceCentreZField.setValue(0.0);
} else {
motionTimeField.setValue(iflame.getMotionParams().getTime());
motionLifeTimeField.setValue(iflame.getMotionParams().getLife());
motionLifeTimeVariationField.setValue(iflame.getMotionParams().getLifeVar());
motionForceXField.setValue(iflame.getMotionParams().getForceX0());
motionForceYField.setValue(iflame.getMotionParams().getForceY0());
motionForceZField.setValue(iflame.getMotionParams().getForceZ0());
forceCentreXField.setValue(iflame.getMotionParams().getForceCentreX());
forceCentreYField.setValue(iflame.getMotionParams().getForceCentreY());
forceCentreZField.setValue(iflame.getMotionParams().getForceCentreZ());
}
}
Aggregations