moved inline functions from Camera.h to Camera.cpp as per Stephen's request

This commit is contained in:
Jeffrey Ventrella 2013-04-26 13:33:36 -07:00
parent 59ef9e5d7e
commit 2486b6e15c
2 changed files with 39 additions and 14 deletions

View file

@ -77,13 +77,37 @@ void Camera::updateFollowMode( float deltaTime ) {
double y = _upShift;
_idealPosition = _targetPosition + glm::vec3(x, y, z);
//_idealPosition += _orientation.getRight() * _rightShift;
//_idealPosition += _orientation.getUp () * _upShift;
// pull position towards ideal position
_position += (_idealPosition - _position) * t;
}
void Camera::setMode(CameraMode m) {
_mode = m;
_modeShift = 0.0f;
}
void Camera::setFieldOfView(float f) {
_fieldOfView = f;
_frustumNeedsReshape = true;
}
void Camera::setAspectRatio(float a) {
_aspectRatio = a;
_frustumNeedsReshape = true;
}
void Camera::setNearClip (float n) {
_nearClip = n;
_frustumNeedsReshape = true;
}
void Camera::setFarClip (float f) {
_farClip = f;
_frustumNeedsReshape = true;
}
// call to find out if the view frustum needs to be reshaped
bool Camera::getFrustumNeedsReshape() {

View file

@ -29,7 +29,6 @@ public:
void update( float deltaTime );
void setMode ( CameraMode m ) { _mode = m; _modeShift = 0.0f; }
void setYaw ( float y ) { _yaw = y; }
void setPitch ( float p ) { _pitch = p; }
void setRoll ( float r ) { _roll = r; }
@ -41,10 +40,12 @@ public:
void setPosition ( glm::vec3 p ) { _position = p; }
void setOrientation ( Orientation o ) { _orientation.set(o); }
void setTightness ( float t ) { _tightness = t; }
void setFieldOfView ( float f ) { _fieldOfView = f; _frustumNeedsReshape = true; }
void setAspectRatio ( float a ) { _aspectRatio = a; _frustumNeedsReshape = true; }
void setNearClip ( float n ) { _nearClip = n; _frustumNeedsReshape = true; }
void setFarClip ( float f ) { _farClip = f; _frustumNeedsReshape = true; }
void setMode ( CameraMode m );
void setFieldOfView ( float f );
void setAspectRatio ( float a );
void setNearClip ( float n );
void setFarClip ( float f );
float getYaw () { return _yaw; }
float getPitch () { return _pitch; }