Example #1
0
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));
 }
Example #2
0
void               P3DBranchingAlgWingsPanel::OnRotAngleChanged
                                      (wxSpinSliderEvent  &event)
 {
  P3DApp::GetApp()->ExecEditCmd
   (new P3DBAlgWingsFloatParamEditCmd
         (Alg,
          P3DMATH_DEG2RAD((float)(event.GetIntValue())),
          Alg->GetRotationAngle(),
          &P3DBranchingAlgWings::SetRotationAngle));
 }
Example #3
0
void               P3DBranchingAlgStdPanel::OnStartRevAngleChanged
                                      (wxSpinSliderEvent  &event)
 {
  P3DApp::GetApp()->ExecEditCmd
   (new P3DBAlgStdFloatParamEditCmd
         (Alg,
          P3DMATH_DEG2RAD((float)(event.GetIntValue())),
          Alg->GetStartRevAngle(),
          &P3DBranchingAlgStd::SetStartRevAngle));
 }
Example #4
0
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               P3DOptGeneralPanel::OnSeedChanged
                                      (wxSpinSliderEvent  &event)
 {
  P3DApp::GetApp()->ExecEditCmd(new P3DEditCmdChangeModelSeed(event.GetIntValue()));
 }