Removed unused parameter from CEngine::SetViewParams

master
krzys-h 2016-05-28 16:48:36 +02:00
parent d80fa387b9
commit bef27c3b36
4 changed files with 6 additions and 12 deletions

View File

@ -88,7 +88,6 @@ CCamera::CCamera()
m_smooth = CAM_SMOOTH_NORM; m_smooth = CAM_SMOOTH_NORM;
m_cameraObj = nullptr; m_cameraObj = nullptr;
m_eyeDistance = 10.0f;
m_initDelay = 0.0f; m_initDelay = 0.0f;
m_actualEye = Math::Vector(0.0f, 0.0f, 0.0f); m_actualEye = Math::Vector(0.0f, 0.0f, 0.0f);
@ -223,7 +222,6 @@ void CCamera::Init(Math::Vector eye, Math::Vector lookat, float delay)
m_directionH = Math::RotateAngle(eye.x - lookat.x, eye.z - lookat.z) + Math::PI / 2.0f; m_directionH = Math::RotateAngle(eye.x - lookat.x, eye.z - lookat.z) + Math::PI / 2.0f;
m_directionV = -Math::RotateAngle(Math::DistanceProjected(eye, lookat), eye.y - lookat.y); m_directionV = -Math::RotateAngle(Math::DistanceProjected(eye, lookat), eye.y - lookat.y);
m_eyeDistance = 10.0f;
m_heightLookat = 10.0f; m_heightLookat = 10.0f;
m_backDist = 30.0f; m_backDist = 30.0f;
m_backMin = 10.0f; m_backMin = 10.0f;
@ -1528,7 +1526,7 @@ void CCamera::SetScriptLookat(Math::Vector lookat)
void CCamera::SetViewParams(const Math::Vector &eye, const Math::Vector &lookat, void CCamera::SetViewParams(const Math::Vector &eye, const Math::Vector &lookat,
const Math::Vector &up) const Math::Vector &up)
{ {
m_engine->SetViewParams(eye, lookat, up, m_eyeDistance); m_engine->SetViewParams(eye, lookat, up);
bool under = (eye.y < m_water->GetLevel()); // Is it underwater? bool under = (eye.y < m_water->GetLevel()); // Is it underwater?
if (m_type == CAM_TYPE_INFO) if (m_type == CAM_TYPE_INFO)

View File

@ -282,8 +282,6 @@ protected:
//! Object linked to the camera //! Object linked to the camera
CObject* m_cameraObj; CObject* m_cameraObj;
//! Distance between the eyes
float m_eyeDistance;
//! Time of initial centering //! Time of initial centering
float m_initDelay; float m_initDelay;
@ -293,11 +291,11 @@ protected:
Math::Vector m_actualLookat; Math::Vector m_actualLookat;
//! Final eye //! Final eye
Math::Vector m_finalEye; Math::Vector m_finalEye;
//! Final aim //! Final lookat
Math::Vector m_finalLookat; Math::Vector m_finalLookat;
//! Normal eye //! Eye position at the moment of entering CAM_TYPE_INFO/CAM_TYPE_VISIT
Math::Vector m_normEye; Math::Vector m_normEye;
//! Normal aim //! Lookat position at the moment of entering CAM_TYPE_INFO/CAM_TYPE_VISIT
Math::Vector m_normLookat; Math::Vector m_normLookat;
float m_focus; float m_focus;

View File

@ -2184,8 +2184,7 @@ void CEngine::SetMaterial(const Material& mat)
m_device->SetMaterial(mat); m_device->SetMaterial(mat);
} }
void CEngine::SetViewParams(const Math::Vector& eyePt, const Math::Vector& lookatPt, void CEngine::SetViewParams(const Math::Vector &eyePt, const Math::Vector &lookatPt, const Math::Vector &upVec)
const Math::Vector& upVec, float eyeDistance)
{ {
m_eyePt = eyePt; m_eyePt = eyePt;
m_lookatPt = lookatPt; m_lookatPt = lookatPt;

View File

@ -901,8 +901,7 @@ public:
void SetMaterial(const Material& mat); void SetMaterial(const Material& mat);
//! Specifies the location and direction of view //! Specifies the location and direction of view
void SetViewParams(const Math::Vector& eyePt, const Math::Vector& lookatPt, void SetViewParams(const Math::Vector &eyePt, const Math::Vector &lookatPt, const Math::Vector &upVec);
const Math::Vector& upVec, float eyeDistance);
//! Loads texture, creating it if not already present //! Loads texture, creating it if not already present
Texture LoadTexture(const std::string& name); Texture LoadTexture(const std::string& name);