void P3DBranchingAlgStdPanel::OnMaxNumberChanged (wxSpinSliderEvent &event) { unsigned int OldMinNumber = Alg->GetMinNumber(); unsigned int OldMaxNumber = Alg->GetMaxNumber(); unsigned int NewMaxNumber = event.GetIntValue(); bool LimitEnabled = Alg->IsMaxLimitEnabled(); unsigned int NewMinNumber; if (OldMinNumber > NewMaxNumber) { NewMinNumber = NewMaxNumber; wxSpinSliderCtrl *SpinSlider = (wxSpinSliderCtrl*)FindWindow(wxID_MIN_NUMBER_CTRL); if (SpinSlider != NULL) { SpinSlider->SetValue(NewMinNumber); } } else { NewMinNumber = OldMinNumber; } P3DApp::GetApp()->ExecEditCmd (new P3DBAlgStdMinMaxNumberEditCmd (Alg, NewMinNumber,NewMaxNumber,LimitEnabled, OldMinNumber,OldMaxNumber,LimitEnabled)); }
void P3DBranchingAlgStdPanel::OnMaxOffsetChanged (wxSpinSliderEvent &event) { float OldMinOffset = Alg->GetMinOffset(); float OldMaxOffset = Alg->GetMaxOffset(); float NewMaxOffset = event.GetFloatValue(); float NewMinOffset; if (OldMinOffset > NewMaxOffset) { NewMinOffset = NewMaxOffset; wxSpinSliderCtrl *SpinSlider = (wxSpinSliderCtrl*)FindWindow(wxID_MIN_OFFSET_CTRL); if (SpinSlider != NULL) { SpinSlider->SetValue(NewMinOffset); } } else { NewMinOffset = OldMinOffset; } P3DApp::GetApp()->ExecEditCmd (new P3DBAlgStdMinMaxOffsetEditCmd (Alg,NewMinOffset,NewMaxOffset,OldMinOffset,OldMaxOffset)); }
void P3DOptGeneralPanel::OnLODChanged (wxSpinSliderEvent &event) { P3DApp::GetApp()->SetLODLevel(event.GetFloatValue()); P3DApp::GetApp()->InvalidatePlant(); }
void P3DBranchingAlgWingsPanel::OnRotAngleChanged (wxSpinSliderEvent &event) { P3DApp::GetApp()->ExecEditCmd (new P3DBAlgWingsFloatParamEditCmd (Alg, P3DMATH_DEG2RAD((float)(event.GetIntValue())), Alg->GetRotationAngle(), &P3DBranchingAlgWings::SetRotationAngle)); }
void P3DBranchingAlgStdPanel::OnDeclinationVChanged (wxSpinSliderEvent &event) { P3DApp::GetApp()->ExecEditCmd (new P3DBAlgStdFloatParamEditCmd (Alg, event.GetFloatValue(), Alg->GetDeclinationV(), &P3DBranchingAlgStd::SetDeclinationV)); }
void P3DBranchingAlgStdPanel::OnStartRevAngleChanged (wxSpinSliderEvent &event) { P3DApp::GetApp()->ExecEditCmd (new P3DBAlgStdFloatParamEditCmd (Alg, P3DMATH_DEG2RAD((float)(event.GetIntValue())), Alg->GetStartRevAngle(), &P3DBranchingAlgStd::SetStartRevAngle)); }
void P3DBranchingAlgStdPanel::OnMultiplicityChanged (wxSpinSliderEvent &event) { P3DApp::GetApp()->ExecEditCmd (new P3DBAlgStdUIntParamEditCmd (Alg, event.GetIntValue(), Alg->GetMultiplicity(), &P3DBranchingAlgStd::SetMultiplicity)); }
void P3DStemTubePanel::OnProfileResolutionChanged (wxSpinSliderEvent &event) { P3DApp::GetApp()->ExecEditCmd (new P3DStemTubeUIntParamEditCmd (model, event.GetIntValue(), model->GetProfileResolution(), &P3DStemModelTube::SetProfileResolution)); }
void P3DStemTubePanel::OnTrunkProfileScaleBaseChanged (wxSpinSliderEvent &event) { P3DApp::GetApp()->ExecEditCmd (new P3DStemTubeFloatParamEditCmd (model, event.GetFloatValue(), model->GetProfileScaleBase(), &P3DStemModelTube::SetProfileScaleBase)); }
void P3DStemTubePanel::OnStemAxisVariationChanged (wxSpinSliderEvent &event) { P3DApp::GetApp()->ExecEditCmd (new P3DStemTubeFloatParamEditCmd (model, event.GetFloatValue(), model->GetAxisVariation(), &P3DStemModelTube::SetAxisVariation)); }
void P3DOptGeneralPanel::OnSeedChanged (wxSpinSliderEvent &event) { P3DApp::GetApp()->ExecEditCmd(new P3DEditCmdChangeModelSeed(event.GetIntValue())); }