66 alignas(16) Matrix4f view;
67 alignas(16) Matrix4f invView;
68 alignas(16) Matrix4f projection;
69 alignas(16) Matrix4f invProjection;
70 alignas(16) Matrix4f viewProjection;
71 alignas(16) Matrix4f invViewProjection;
72 alignas(16) Matrix4f pivot;
73 alignas(16) Matrix4f invPivot;
75 alignas(16) Vector3f position;
76 alignas(4)
float fieldOfView;
77 alignas(4)
float nearPlane;
78 alignas(4)
float farPlane;
79 alignas(4)
float aspectRatio;
80 alignas(4)
float gamma;
81 alignas(4)
float exposure;
#define CE_FLAGS_OPERATORS(Enum)
Defines global operators for a Flags<Enum, Storage> implementation.
Definition Flags.hpp:216
#define CE_DECL_RENDERER_OBJECT(T)
Definition RendererObject.hpp:25
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
A GPU bindless buffer.
Definition GPUBufferObject.hpp:516
Definition GPUBufferObject.hpp:562
A class that represents a camera inside the renderer.
Definition RendererCamera.hpp:90
const RendererCameraSettings & getSettings() const final
Definition RendererCamera.hpp:153
CameraComponent mComponent
A copy of the latest camera component.
Definition RendererCamera.hpp:96
RendererCameraFlags mFlags
A set of flags that customize and represent the state of the object.
Definition RendererCamera.hpp:99
bool mDirty
If set to true, the camera is dirty and needs to be synchronized from the entity.
Definition RendererCamera.hpp:106
const GPUImagePtr & getRenderImage() const final
The render target that the view should render to.
Definition RendererCamera.hpp:180
const CameraComponent & getComponent() const noexcept
A copy of the latest camera component.
Definition RendererCamera.hpp:150
GPUDynamicBindlessBuffer< RendererCameraParams > mUniformBuffer
The uniform buffer storing the camera GPU parameters used by the renderer.
Definition RendererCamera.hpp:115
const RendererCameraInfo & getViewInfo() const final
A structure that holds renderer-specific information for the view.
Definition RendererCamera.hpp:171
const RendererCameraFlags & getFlags() const noexcept
A set of flags that customize and represent the state of the object.
Definition RendererCamera.hpp:156
RendererCamera(RendererCameraManager &manager, RendererScene &scene)
Creates a new RendererCamera.
bool isDirty() const noexcept
If set to true, the camera is dirty and needs to be synchronized from the entity.
Definition RendererCamera.hpp:165
RendererCameraDirtyFlags mDirtyFlags
A set of flags that represent the dirty portions of the object.
Definition RendererCamera.hpp:102
void markAsDirty(const RendererCameraDirtyFlags &flags=RendererCameraDirtyFlag::All) noexcept
If set to true, the camera is dirty and needs to be synchronized from the entity.
RendererCameraInfo mInfo
A structure that holds renderer-specific information for the camera.
Definition RendererCamera.hpp:109
RendererScene & getScene() const final
Definition RendererCamera.hpp:147
~RendererCamera() noexcept override
Destroys the renderer camera and releases any renderer (and RenderAPI)-related resources.
const ConvexVolume & getFrustumVolume() const final
Returns the latest view frustum volume, used to perform frustum culling.
Definition RendererCamera.hpp:183
void prepare(RendererContext &context) final
Prepares the camera for the rendering of the current frame.
RendererCameraParams mParameters
The GPU parameters. Will be copied to the GPU uniform buffer.
Definition RendererCamera.hpp:112
RendererCameraInfo & getViewInfo() final
A structure that holds renderer-specific information for the view.
Definition RendererCamera.hpp:174
const RendererCameraDirtyFlags & getDirtyFlags() const noexcept
A set of flags that represent the dirty portions of the object.
Definition RendererCamera.hpp:162
const GPUBindlessBuffer & getUniformBuffer() const final
The uniform buffer storing the view GPU parameters used by the renderer.
Definition RendererCamera.hpp:177
void setFlags(const RendererCameraFlags &flags)
A set of flags that customize and represent the state of the object.
void synchronize(const Transform &transform, const CameraComponent &component)
Update the renderer camera with data from a transform and the component.
A manager that controls all cameras currently registered with the renderer.
Definition RendererCamera.hpp:188
Vector< UPtr< RendererCamera > > mCameras
A vector of all registered cameras.
Definition RendererCamera.hpp:197
UniformBufferType mUniformBuffer
The uniform buffer storing all camera GPU parameters used by the renderer.
Definition RendererCamera.hpp:201
void markAsDirty(RendererCamera *const camera)
Marks the given camera as dirty.
RendererCameraManager(Renderer &renderer)
Creates a new instance of the RendererCameraManager.
~RendererCameraManager() noexcept final
Destroys the RendererCameraManager and releases all cameras objects managed by it.
Async prepare(RendererContext &context)
Prepares the cameras for the rendering of the current frame.
The CeresEngine renderer.
Definition Renderer.hpp:35
A class that represents a scene inside the renderer.
Definition RendererScene.hpp:34
A class that represents a view inside the renderer.
Definition RendererView.hpp:46
Template class to help implement sub-classes of RendererSceneObject.
Definition RendererSceneObject.hpp:47
Template class to help implement sub-classes of RendererSceneObjectManager.
Definition RendererSceneObject.hpp:81
Definition Application.hpp:19
RendererCameraFlag
Flags that can be either set by the renderer or by the user to customize the behavior of the camera.
Definition RendererCamera.hpp:31
cti::continuable< Args... > Async
Defines a non-copyable continuation type which uses the function2 backend for type erasure.
Definition Async.hpp:22
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
@ UniformBuffer
Uniform buffer (or constant buffer) resource.
RendererCameraDirtyFlag
Flags that can be either set by the renderer or by the user to customize the behavior of the mesh.
Definition RendererCamera.hpp:40
@ Transform
Indicates that the object transform is dirty.
@ None
Special value that represents a clean (i.e. non-dirty) object.
@ All
Special value that represents a dirty object with all parts dirty.
@ All
Specifies all shader stages.
auto transform(Container &container, Transform &&transform)
Returns an iterable object that iterates over the values of the container and applies transform to ev...
Definition Iterator.hpp:436
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
GPUImagePtr renderImage
The render target that the camera should render to.
Definition Camera.hpp:102
RendererCameraSettings rendererSettings
A set of settings that should be used by renderer when rendering this camera.
Definition Camera.hpp:106
Components serve as the base for data storage for an entity.
Definition Component.hpp:68
A structure that holds renderer-specific information for the camera.
Definition RendererCamera.hpp:85
Any globalIlluminationContext
Definition RendererCamera.hpp:86
A structure that mirrors the GPU uniform data for the camera.
Definition RendererCamera.hpp:65
A structure that holds renderer-specific settings for a Camera.
Definition RendererCameraSettings.hpp:274
A structure that contains context given by the renderer to render it's objects.
Definition Renderer.hpp:252
A structure that holds renderer-specific information for the view.
Definition RendererView.hpp:23
ConvexVolume frustumVolume
The convex volume for the camera frustum.
Definition RendererView.hpp:38