#include "stdafx.h" #include "BaseCamera.h" BaseCamera::BaseCamera(IEngine& argEngine) : Transformation(argEngine) , m_NearClip(1.0f) , m_FarClip(100.0f) , m_AspectRatio(1.0f) { this->set_IsPreconditionForFollowingShaders(true); this->RecreateAllShaderParameters(); } void BaseCamera::set_AspectRatio(float argValue) { m_AspectRatio = argValue; m_IsDirty = true; } void BaseCamera::set_FarClip(float argValue) { m_FarClip = argValue; m_IsDirty = true; } void BaseCamera::set_NearClip(float argValue) { m_NearClip = argValue; m_IsDirty = true; } void BaseCamera::RecreateAllShaderParameters() { this->SetParameter("ViewMatrix", &m_ViewMatrix, ParameterBindType::BindBySemantic); this->SetParameter("ProjectionMatrix", &m_ProjectionMatrix, ParameterBindType::BindBySemantic); Transformation::RecreateAllShaderParameters(); }