camera.cpp
// Processes input received from any keyboard-like input system. Accepts input parameter in the form of camera defined ENUM (to abstract it from windowing systems)
Processes input received from any keyboard-like input system. Accepts input parameter in the form of camera defined ENUM (to abstract it from windowing systems)
Processes input received from any keyboard - like input system . Accepts input parameter in the form of camera defined ENUM ( to abstract it from windowing systems )
void Camera::ProcessKeyboard(Camera_Movement direction, GLfloat deltaTime)
{
    GLfloat velocity = this->MovementSpeed * deltaTime;
    if (direction == FORWARD)
        this->Position += this->Front * velocity;
    if (direction == BACKWARD)
        this->Position -= this->Front * velocity;
    if (direction == LEFT)
        this->Position -= this->Right * velocity;
    if (direction == RIGHT)
        this->Position += this->Right * velocity;
}
void Camera :: ProcessKeyboard ( Camera_Movement direction , GLfloat deltaTime ) { GLfloat velocity = this -> MovementSpeed * deltaTime ; if ( direction == FORWARD ) this -> Position += this -> Front * velocity ; if ( direction == BACKWARD ) this -> Position -= this -> Front * velocity ; if ( direction == LEFT ) this -> Position -= this -> Right * velocity ; if ( direction == RIGHT ) this -> Position += this -> Right * velocity ; }
Processes input received from any keyboard-like input system.
Processes input received from any keyboard - like input system .