Reactor.RCamera.Rotate C# (CSharp) Method

Rotate() public method

Rotates the camera. Positive angles specify counter clockwise rotations when looking down the axis of rotation towards the origin.
public Rotate ( float headingDegrees, float pitchDegrees, float rollDegrees ) : void
headingDegrees float Y axis rotation in degrees.
pitchDegrees float X axis rotation in degrees.
rollDegrees float Z axis rotation in degrees.
return void
        public void Rotate(float headingDegrees, float pitchDegrees, float rollDegrees)
        {
            headingDegrees = -headingDegrees;
            pitchDegrees = -pitchDegrees;
            rollDegrees = -rollDegrees;

            switch (behavior)
            {
                case Behavior.FirstPerson:
                case Behavior.Spectator:
                    RotateFirstPerson(headingDegrees, pitchDegrees);
                    break;

                case Behavior.Flight:
                    RotateFlight(headingDegrees, pitchDegrees, rollDegrees);
                    break;

                case Behavior.Orbit:
                    RotateOrbit(headingDegrees, pitchDegrees, rollDegrees);
                    break;

                case Behavior.Free:
                    RotateFlight(headingDegrees, pitchDegrees, rollDegrees);
                    break;
                default:
                    break;
            }

            UpdateViewMatrix();
        }