public void setPitch ( final double PITCH ) { this . pitch = PITCH % 180 ; if ( pitch > 90 ) { pitch = 90 - ( pitch - 90 ) ; if ( ! upsidedown ) { setRoll ( roll - 180 ) ; } upsidedown = true ; } else if ( pitch < - 90 ) { pitch = - 90 + ( - 90 - pitch ) ; if ( ! upsidedown ) { setRoll ( roll + 180 ) ; } upsidedown = true ; } else { upsidedown = false ; this . oldPitch = pitch ; } fireStateChanged ( ) ; repaint ( ) ; }
Sets the value of the current pitch