78 double farPlane = std::numeric_limits<double>::infinity();
87 double fieldOfView = 45.0;
91 double nearPlane = 0.1;
95 double farPlane =
std::numeric_limits<
double>::infinity();
99 double aspectRatio = 4.0 / 3.0;
118 template<typename Processor> static constexpr
void reflect(Processor&& RTTI) {
134 double getFieldOfView() const noexcept;
139 void setFieldOfView(
double fieldOfView) noexcept;
144 double getNearPlane() const noexcept;
150 void setNearPlane(
double nearPlane) noexcept;
156 double getFarPlane() const noexcept;
162 void setFarPlane(
double farPlane) noexcept;
166 double getAspectRatio() const noexcept;
170 void setAspectRatio(
double aspectRatio) noexcept;
187 const ScopeExit commitSettings([&]() { setRendererSettings(settings); });
188 return func(settings);
195 void changeViewportAspectRatio(
double width,
double height) noexcept;
199 [[nodiscard]] Matrix4 getProjection() const noexcept;
202 [[nodiscard]] Transform getView() const noexcept;
209 [[nodiscard]] Vector3 unproject(Vector3 screenSpaceVector) const noexcept;
217 Vector3 project(Vector3 worldSpaceVector) const noexcept;
219 [[nodiscard]] Ray toRay(const Point2& point) const noexcept;
227 bool visible(Vector3 worldSpaceVector) const noexcept;
232 [[nodiscard]]
bool visible(const AABox& boundingBox) const noexcept;
237 template<typename Processor> static constexpr
void reflect(Processor&& RTTI) {
249 using TSceneObject::TSceneObject;
#define CE_EXTERN_COMPONENT(T)
Definition Component.hpp:600
#define CE_ENTITY_OBJECT_HASH(T)
Definition Entity.hpp:784
#define CE_REFLECT_HASH(T)
Definition Hash.hpp:89
#define CE_REFLECTABLE_STRUCT
Definition IReflectable.hpp:47
#define CE_REFL_DATA_GETSET(N, G, S)
Definition Macros.hpp:549
#define CE_REFL_DATA(N)
Definition Macros.hpp:541
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
Definition Camera.hpp:247
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition EntityManager.hpp:49
The SceneObject template class is a helper class that EntityObjects might choose to use to provide so...
Definition SceneObject.hpp:323
Definition Concepts.hpp:43
Definition Application.hpp:19
CameraProjection
The camera lens options control the way 3D objects are represented in a 2D image.
Definition Camera.hpp:37
@ Orthographic
With Orthographic perspective objects always appear at their actual size, regardless of distance.
@ Perspective
Projects the shadow map to all objects visible in the camera's view frustum.
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A class that describes access to a CameraComponent.
Definition Camera.hpp:129
A structure that contains settins for a camera.
Definition Camera.hpp:51
Offset2 lensShift
Allows for the adjustment of vanishing points.
Definition Camera.hpp:72
Extent2 sensorSize
This setting is an alternative way to control the field of view, as opposed to modifying the focal le...
Definition Camera.hpp:68
double orthographicScale
This controls the apparent size of objects projected on the image.
Definition Camera.hpp:64
double focalLength
The Focal Length controls the amount of zoom, i.e.
Definition Camera.hpp:56
double farPlane
The furthest point relative to the camera that drawing will occur.
Definition Camera.hpp:78
double nearPlane
The closest point relative to the camera that drawing will occur.
Definition Camera.hpp:75
Components serve as the base for data storage for an entity.
Definition Component.hpp:68
A structure that holds renderer-specific settings for a Camera.
Definition RendererCameraSettings.hpp:274
Definition ScopeExit.hpp:15