18 #ifndef __H__OCULAR_CORE_SCENE_CAMERA__H__
19 #define __H__OCULAR_CORE_SCENE_CAMERA__H__
21 #include "Priority.hpp"
22 #include "Scene/SceneObject.hpp"
24 #include "Graphics/Texture/RenderTexture.hpp"
25 #include "Graphics/Texture/DepthTexture.hpp"
26 #include "Graphics/Viewport.hpp"
28 #include "Events/AEventListener.hpp"
30 #include "Math/Geometry/Frustum.hpp"
31 #include "Math/Bounds/Ray.hpp"
47 enum class ProjectionType
202 void setViewport(
float x,
float y,
float width,
float height,
float minDepth = 0.0f,
float maxDepth = 1.0f,
bool updateMatrix =
true);
249 Color const& getClearColor()
const;
283 virtual bool onEvent(std::shared_ptr<AEvent> event)
override;
288 void exposeVariables();
290 void updateViewport(
float width,
float height);
294 ProjectionType m_ProjType;
312 bool m_IsFixedViewport;
313 bool m_IsFixedProjection;
314 bool m_IsFrustumDirty;
void setProjectionMatrix(Math::Matrix4x4 const &matrix)
Definition: Camera.cpp:187
Definition: Camera.hpp:54
Definition: Camera.hpp:64
A special texture that stores high precision depth information for each pixel.
Definition: DepthTexture.hpp:41
A special texture that can be rendered directly to.
Definition: RenderTexture.hpp:41
Definition: AEventListener.hpp:43
Definition: Frustum.hpp:57
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
bool getIsFixedProjection() const
Definition: Camera.cpp:298
bool getIsFixedViewport() const
Definition: Camera.cpp:288
PerspectiveProjection getPerspectiveProjection() const
Definition: Camera.cpp:138
void setFixedViewport(bool fixed)
Definition: Camera.cpp:283
Definition: Vector2.hpp:44
Definition: SceneObject.hpp:93
void setProjectionPerspective(float fov, float aspectRatio, float nearClip, float farClip)
Definition: Camera.cpp:169
void setViewport(float x, float y, float width, float height, float minDepth=0.0f, float maxDepth=1.0f, bool updateMatrix=true)
Definition: Camera.cpp:228
void setFixedProjection(bool fixed)
Definition: Camera.cpp:293
Graphics::Viewport * getViewport() const
Definition: Camera.cpp:257
Math::Vector2i worldToScreen(Math::Vector3f const &worldPos)
Definition: Camera.cpp:333
Definition: Camera.hpp:79
Math::Matrix4x4 const & getViewMatrix()
Definition: Camera.cpp:193
Graphics::RenderTexture * getRenderTexture()
Definition: Camera.cpp:118
void setRenderTexture(Graphics::RenderTexture *renderTexture)
Definition: Camera.cpp:113
Math::Vector3f screenToWorld(Math::Vector2i const &screenPos)
Definition: Camera.cpp:313
void setPriority(Priority priority)
Definition: Camera.cpp:218
virtual bool onEvent(std::shared_ptr< AEvent > event) override
Definition: Camera.cpp:262
A 4x4 column-major float matrix.
Definition: Matrix4x4.hpp:64
OrthographicProjection getOrthographicProjection() const
Definition: Camera.cpp:143
Definition: Viewport.hpp:40
Priority getPriority() const
Definition: Camera.cpp:223
void setProjectionOrthographic(float xMin, float xMax, float yMin, float yMax, float nearClip, float farClip)
Definition: Camera.cpp:148
Math::Ray getPickRay(Math::Vector2i const &screenPos)
Definition: Camera.cpp:346
Math::Matrix4x4 const & getProjectionMatrix() const
Definition: Camera.cpp:201
void setDepthTexture(Graphics::DepthTexture *depthTexture)
Definition: Camera.cpp:123
ProjectionType getProjectionType() const
Definition: Camera.cpp:133
Graphics::DepthTexture * getDepthTexture()
Definition: Camera.cpp:128
Math::Frustum const & getFrustum(bool updateFrustum=true)
Definition: Camera.cpp:206