Big Graphics update
Separated LightManager Added Sprite class Added View class Camera is no longer a SceneNode Fixed Material not invalidating programs Renamed CameraPosition uniform to EyePosition Renamed VisibilityTest to FrustumCull Former-commit-id: ff7fbe4d9b31a3c269baab0b48c6faa347a12161
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#define NAZARA_CAMERA_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Graphics/AbstractViewer.hpp>
|
||||
#include <Nazara/Graphics/SceneNode.hpp>
|
||||
#include <Nazara/Math/Frustum.hpp>
|
||||
#include <Nazara/Math/Matrix4.hpp>
|
||||
@@ -15,24 +16,22 @@
|
||||
#include <Nazara/Math/Vector3.hpp>
|
||||
#include <Nazara/Renderer/RenderTarget.hpp>
|
||||
|
||||
class NAZARA_API NzCamera : public NzSceneNode, NzRenderTarget::Listener
|
||||
class NAZARA_API NzCamera : public NzAbstractViewer, public NzNode, NzRenderTarget::Listener
|
||||
{
|
||||
public:
|
||||
NzCamera();
|
||||
~NzCamera();
|
||||
|
||||
void Activate();
|
||||
|
||||
void EnsureFrustumUpdate() const;
|
||||
void EnsureProjectionMatrixUpdate() const;
|
||||
void EnsureViewMatrixUpdate() const;
|
||||
void EnsureViewportUpdate() const;
|
||||
|
||||
float GetAspectRatio() const;
|
||||
const NzBoundingVolumef& GetBoundingVolume() const override;
|
||||
NzVector3f GetEyePosition() const;
|
||||
float GetFOV() const;
|
||||
const NzFrustumf& GetFrustum() const;
|
||||
const NzMatrix4f& GetProjectionMatrix() const;
|
||||
nzSceneNodeType GetSceneNodeType() const override;
|
||||
const NzRenderTarget* GetTarget() const;
|
||||
const NzRectf& GetTargetRegion() const;
|
||||
const NzMatrix4f& GetViewMatrix() const;
|
||||
@@ -49,22 +48,17 @@ class NAZARA_API NzCamera : public NzSceneNode, NzRenderTarget::Listener
|
||||
void SetZNear(float zNear);
|
||||
|
||||
private:
|
||||
void AddToRenderQueue(NzAbstractRenderQueue* renderQueue) const override;
|
||||
void Invalidate();
|
||||
void ApplyView() const override;
|
||||
void Invalidate() override;
|
||||
|
||||
void OnRenderTargetReleased(const NzRenderTarget* renderTarget, void* userdata) override;
|
||||
bool OnRenderTargetSizeChange(const NzRenderTarget* renderTarget, void* userdata) override;
|
||||
|
||||
void Register() override;
|
||||
void Unregister() override;
|
||||
|
||||
void UpdateFrustum() const;
|
||||
void UpdateProjectionMatrix() const;
|
||||
void UpdateViewMatrix() const;
|
||||
void UpdateViewport() const;
|
||||
|
||||
bool VisibilityTest(const NzCamera* camera) override;
|
||||
|
||||
mutable NzFrustumf m_frustum;
|
||||
mutable NzMatrix4f m_projectionMatrix;
|
||||
mutable NzMatrix4f m_viewMatrix;
|
||||
|
||||
Reference in New Issue
Block a user