mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 20:39:18 +02:00
ImGuizmo System OpenGL
This commit is contained in:
@@ -105,6 +105,12 @@ class opengl33_renderer : public gfx_renderer {
|
||||
Pick_Node() const override { return m_picksceneryitem; }
|
||||
glm::dvec3
|
||||
Mouse_Position() const override { return m_worldmousecoordinates; }
|
||||
glm::mat4
|
||||
Camera_View_Matrix() const override { return glm::mat4( glm::mat3( m_colorpass.pass_camera.modelview() ) ); }
|
||||
glm::mat4
|
||||
Camera_Projection_Matrix() const override { return m_colorpass.pass_camera.projection(); }
|
||||
glm::dvec3
|
||||
Camera_Position() const override { return m_colorpass.pass_camera.position(); }
|
||||
// maintenance methods
|
||||
void
|
||||
Update( double const Deltatime ) override;
|
||||
|
||||
@@ -105,6 +105,12 @@ public:
|
||||
Pick_Node() const override { return m_picksceneryitem; }
|
||||
glm::dvec3
|
||||
Mouse_Position() const override { return m_worldmousecoordinates; }
|
||||
glm::mat4
|
||||
Camera_View_Matrix() const override { return glm::mat4( glm::mat3( m_colorpass.camera.modelview() ) ); }
|
||||
glm::mat4
|
||||
Camera_Projection_Matrix() const override { return m_colorpass.camera.projection(); }
|
||||
glm::dvec3
|
||||
Camera_Position() const override { return m_colorpass.camera.position(); }
|
||||
// maintenance methods
|
||||
void
|
||||
Update( double const Deltatime ) override;
|
||||
|
||||
@@ -73,6 +73,13 @@ public:
|
||||
virtual auto Pick_Node() const -> scene::basic_node const * = 0;
|
||||
|
||||
virtual auto Mouse_Position() const -> glm::dvec3 = 0;
|
||||
// editor helpers: matrices/position of the most recent color pass camera.
|
||||
// the view matrix is camera-relative (rotation only, camera at origin), matching the
|
||||
// camera-relative rendering used by the engine; build object matrices relative to Camera_Position().
|
||||
// default implementations return identity so backends without a usable camera still compile.
|
||||
virtual auto Camera_View_Matrix() const -> glm::mat4 { return glm::mat4( 1.f ); }
|
||||
virtual auto Camera_Projection_Matrix() const -> glm::mat4 { return glm::mat4( 1.f ); }
|
||||
virtual auto Camera_Position() const -> glm::dvec3 { return glm::dvec3( 0.0 ); }
|
||||
// maintenance methods
|
||||
virtual void Update( double const Deltatime ) = 0;
|
||||
virtual void Update_Pick_Control() = 0;
|
||||
|
||||
Reference in New Issue
Block a user