예제 #1
0
void ptFilter_SpotTuning::setupInteraction(bool AEnable) {
  if (AEnable == FInteractionOngoing)
    return;

  FInteractionOngoing = AEnable;
  if (AEnable) {
    startInteraction();
  } else {
    ViewWindow->spotTuning()->stop();
  }
}
예제 #2
0
void coNavInteraction::update()
{

    vruiButtons *button = vruiRendererInterface::the()->getButtons();

    runningState = StateNotRunning;

    if (state == Idle)
    {
        if (button->wasPressed(1<<type))
        {
            if (activate())
            {
                runningState = StateStarted;
                startInteraction();
            }
        }
    }
    else if (state == Active || state == Paused || state == ActiveNotify)
    //else if (state == Active)
    {
        if (button->getStatus() & (1<<type))
        {
            if (state == Paused)
            {
                runningState = StateStopped;
            }
            else
            {
                runningState = StateRunning;
                doInteraction();
            }
        }
        else
        {
            runningState = StateStopped;
            stopInteraction();
            state = Idle;
        }
    }
}