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 P3DBranchingAlgStdPanel::OnDeclinationVChanged (wxSpinSliderEvent &event) { P3DApp::GetApp()->ExecEditCmd (new P3DBAlgStdFloatParamEditCmd (Alg, event.GetFloatValue(), Alg->GetDeclinationV(), &P3DBranchingAlgStd::SetDeclinationV)); }
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)); }