(View) Added Map[Pixel|World]To[World|Pixel] method
Former-commit-id: 39295c71d040d472117cb30c266169476f563e9d
This commit is contained in:
@@ -35,15 +35,20 @@ class NAZARA_API NzView : public NzAbstractViewer, public NzNode, NzRenderTarget
|
||||
NzVector3f GetGlobalForward() const;
|
||||
NzVector3f GetGlobalRight() const;
|
||||
NzVector3f GetGlobalUp() const;
|
||||
const NzMatrix4f& GetInvViewProjMatrix() const;
|
||||
const NzMatrix4f& GetProjectionMatrix() const;
|
||||
const NzVector2f& GetSize() const;
|
||||
const NzRenderTarget* GetTarget() const;
|
||||
const NzRectf& GetTargetRegion() const;
|
||||
const NzMatrix4f& GetViewMatrix() const;
|
||||
const NzMatrix4f& GetViewProjMatrix() const;
|
||||
const NzRecti& GetViewport() const;
|
||||
float GetZFar() const;
|
||||
float GetZNear() const;
|
||||
|
||||
NzVector2i MapWorldToPixel(const NzVector2f& coords);
|
||||
NzVector2f MapPixelToWorld(const NzVector2i& pixel);
|
||||
|
||||
void SetSize(const NzVector2f& size);
|
||||
void SetSize(float width, float height);
|
||||
void SetTarget(const NzRenderTarget* renderTarget);
|
||||
@@ -61,20 +66,26 @@ class NAZARA_API NzView : public NzAbstractViewer, public NzNode, NzRenderTarget
|
||||
bool OnRenderTargetSizeChange(const NzRenderTarget* renderTarget, void* userdata) override;
|
||||
|
||||
void UpdateFrustum() const;
|
||||
void UpdateInvViewProjMatrix() const;
|
||||
void UpdateProjectionMatrix() const;
|
||||
void UpdateViewMatrix() const;
|
||||
void UpdateViewProjMatrix() const;
|
||||
void UpdateViewport() const;
|
||||
|
||||
mutable NzFrustumf m_frustum;
|
||||
mutable NzMatrix4f m_invViewProjMatrix;
|
||||
mutable NzMatrix4f m_projectionMatrix;
|
||||
mutable NzMatrix4f m_viewMatrix;
|
||||
mutable NzMatrix4f m_viewProjMatrix;
|
||||
NzRectf m_targetRegion;
|
||||
mutable NzRecti m_viewport;
|
||||
NzVector2f m_size;
|
||||
const NzRenderTarget* m_target;
|
||||
mutable bool m_frustumUpdated;
|
||||
mutable bool m_invViewProjMatrixUpdated;
|
||||
mutable bool m_projectionMatrixUpdated;
|
||||
mutable bool m_viewMatrixUpdated;
|
||||
mutable bool m_viewProjMatrixUpdated;
|
||||
mutable bool m_viewportUpdated;
|
||||
float m_zFar;
|
||||
float m_zNear;
|
||||
|
||||
Reference in New Issue
Block a user