Skip to content

Commit

Permalink
#5338: Remove unused Camera method
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Sep 26, 2020
1 parent 2d13193 commit 9f305aa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
26 changes: 0 additions & 26 deletions radiant/camera/Camera.cpp
Expand Up @@ -96,32 +96,6 @@ void Camera::freemoveUpdateAxes()
_forward = -_vpn;
}

void Camera::mouseControl(int x, int y)
{
int movementSpeed = getCameraSettings()->movementSpeed();

float xf, yf;

xf = (float)(x - _width/2) / (_width/2);
yf = (float)(y - _height/2) / (_height/2);

xf *= 1.0f - fabsf(yf);
if (xf < 0) {
xf += 0.1f;
if (xf > 0)
xf = 0;
} else {
xf -= 0.1f;
if (xf < 0)
xf = 0;
}

_origin += _forward * (yf * 0.1f* movementSpeed);
_angles[camera::CAMERA_YAW] += xf * -0.1f * movementSpeed;

updateModelview();
}

const Vector3& Camera::getCameraOrigin() const
{
return _origin;
Expand Down
2 changes: 0 additions & 2 deletions radiant/camera/Camera.h
Expand Up @@ -77,8 +77,6 @@ class Camera :
void queueDraw() override;
void forceRedraw() override;

void mouseControl(int x, int y);

void pitchUpDiscrete();
void pitchDownDiscrete();
void rotateRightDiscrete();
Expand Down

0 comments on commit 9f305aa

Please sign in to comment.