void Update(float DeltaTime) override
Recalculates the view/projection matrices and frustum while active.
static Math::Matrix4 Projection
void RecalculateProjectionMatrix()
Rebuilds the static projection matrix from FOV/aspect/near/far or the orthographic extents.
void OnResize(uint32_t width, uint32_t height)
Updates the viewport dimensions and recomputes the projection matrix.
void RecalculateViewMatrix()
Rebuilds the static view matrix and view frustum from position/target/up, and begins culling for the ...
static ViewFrustum s_frustum
static Math::Matrix4 View
static Math::Vector3D MainPosition
Math::Vector3D LookTarget
Camera(std::string name="Camera", Math::Vector3D Position=Math::Vector3D(0, 0, -3.5), float fov=60, float near=1.0f, float far=1000.0f)
void Initialize() override
Initializes the object and its components; called once before the first Update.
static void BeginFrame(const ViewFrustum &frustum, const Math::Matrix4 &viewProj, const Math::Vector3D &cameraPos)
virtual void Initialize()
Initializes the object and its components; called once before the first Update.
virtual void Update(float deltaTime)
GameObject(const std::string &name="GameObject")
static Matrix< float, Rows, Rows > Identity()
static Matrix< float, 4, 4 > Perspective(float fovY, float aspectRatio, float nearPlane, float farPlane)
static Matrix< float, 4, 4 > Orthographic(float left, float right, float bottom, float top, float nearPlane, float farPlane)
static Matrix< float, 4, 4 > LookAt(const Vector< float, 3 > &eye, const Vector< float, 3 > ¢er, const Vector< float, 3 > &up)
Matrix< float, 4, 4 > Matrix4
Root namespace for everything the engine exposes.