|
Monad Engine da02fba2
> Undercity Codex_
|
Perspective camera that drives the scene's view and projection matrices. More...
Include dependency graph for CameraComponent.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | mnd::CameraComponent |
| Perspective camera — provides view and projection matrices each frame. More... | |
Namespaces | |
| namespace | mnd |
Perspective camera that drives the scene's view and projection matrices.
Attach this component to a GameObject and call Scene::SetMainCamera() on that object. Engine::Run() queries it each frame to compute CameraData (view + projection) which is then forwarded to every shader via RenderQueue.
The view matrix is built from the owner's world transform (position and rotation). The projection matrix is perspective, driven by m_fov and the window's current aspect ratio (passed in by the engine each frame).
Definition in file CameraComponent.h.