PerspectiveCameraComponent.ixx File
Stores perspective projection parameters for a camera entity. More...
Included Headers
#include <cassert>
#include <helios.math>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | scene |
| namespace | components |
Classes Index
| class | PerspectiveCameraComponent<THandle> |
|
Component that stores perspective camera projection parameters. More... | |
Description
Stores perspective projection parameters for a camera entity.
File Listing
The file content with the documentation metadata removed is:
15export namespace helios::engine::scene::components {
23 class PerspectiveCameraComponent {
51 float fovY_ = radians(90);
60 explicit PerspectiveCameraComponent(const float fovY, const float aspectRatio, const float zNear = 0.1f, const float zFar = 1000.0f) {
61 setPerspective(fovY, aspectRatio, zNear, zFar);
72 void setPerspective(const float fovY, const float aspectRatio, const float zNear, const float zFar) noexcept {
75 fovY_ = fovY;
76 aspectRatio_ = aspectRatio;
77 zNear_ = zNear;
78 zFar_ = zFar;
89 zNear_ = zNear;
101 zFar_ = zFar;
111 fovY_ = fovY;
120 void setAspectRatio(const float aspectRatio) noexcept {
121 aspectRatio_ = aspectRatio;
139 [[nodiscard]] float aspectRatio() const noexcept {
173 void clearDirty() noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.