camera.cpp
// Processes input received from a mouse input system. Expects the offset value in both the x and y direction.
Processes input received from a mouse input system. Expects the offset value in both the x and y direction.
Processes input received from a mouse input system . Expects the offset value in both the x and y direction .
void Camera::ProcessRightMouseMovement(GLfloat xoffset, GLfloat yoffset, GLboolean constrainPitch)
{
    xoffset *= this->MouseSensitivity;
    yoffset *= this->MouseSensitivity;
    this->Yaw += 0.3 * xoffset;
    this->Pitch += 0.3 * yoffset;
    if (constrainPitch)
    {
        if (this->Pitch > 89.0f)
            this->Pitch = 89.0f;
        if (this->Pitch < -89.0f)
            this->Pitch = -89.0f;
    }
    this->updateCameraVectors();
}
void Camera :: ProcessRightMouseMovement ( GLfloat xoffset , GLfloat yoffset , GLboolean constrainPitch ) { xoffset *= this -> MouseSensitivity ; yoffset *= this -> MouseSensitivity ; this -> Yaw += 0.3 * xoffset ; this -> Pitch += 0.3 * yoffset ; if ( constrainPitch ) { if ( this -> Pitch > 89.0f ) this -> Pitch = 89.0f ; if ( this -> Pitch < -89.0f ) this -> Pitch = -89.0f ; } this -> updateCameraVectors ( ) ; }
Processes input received from a mouse input system.
Processes input received from a mouse input system .
// Make sure that when pitch is out of bounds, screen doesn't get flipped // Update Front, Right and Up Vectors using the updated Eular angles