remove ui namespace which is not really used, move CameraData in camera_modes.h to avoid the inclusion of canva.h

This commit is contained in:
2018-11-27 14:24:01 +01:00
parent f34ffa825d
commit 0c6b409606
57 changed files with 538 additions and 597 deletions

View File

@@ -8,8 +8,6 @@
#include "canvas_modes.h"
#include <stack>
NS_START
#define CANVAS_RES 512
class Layer
@@ -101,17 +99,6 @@ struct PPIHeader
}
};
struct CameraData
{
glm::mat4 m_mv{ 1 };
glm::mat4 m_proj{ 1 };
glm::vec4 m_box{ 0 };
glm::vec4 m_vp{ 0 };
glm::vec2 m_pan{ 0 };
glm::mat4 m_plane_unproject[6] = SIXPLETTE(glm::mat4(1));
glm::vec3 m_plane_dir[6] = SIXPLETTE(glm::vec3(0));
};
class Canvas
{
public:
@@ -153,7 +140,7 @@ public:
RTT m_tmp[6];
RTT m_mixer;
float m_mixer_scale = 1;
ui::StrokeSample m_mixer_sample;
StrokeSample m_mixer_sample;
bool m_mixer_idle = true;
Texture2D m_brush_mix;
Texture2D m_tex[6];
@@ -206,7 +193,7 @@ public:
void layer_add(std::string name);
void layer_order(int idx, int pos);
void layer_merge(int source_idx, int dest_idx);
void stroke_start(glm::vec3 point, float pressure, const ui::Brush& brush);
void stroke_start(glm::vec3 point, float pressure, const Brush& brush);
void stroke_update(glm::vec3 point, float pressure);
void stroke_draw_mix(const glm::vec2& bb_min, const glm::vec2& bb_sz);
void stroke_draw();
@@ -236,8 +223,8 @@ public:
void project_open(std::string file_path, std::function<void(bool)> on_complete = nullptr);
bool project_open_thread(std::string file_path);
void inject_xmp(std::string jpg_path);
ui::Image thumbnail_generate(int w, int h);
ui::Image thumbnail_read(std::string file_path);
Image thumbnail_generate(int w, int h);
Image thumbnail_read(std::string file_path);
void draw_objects(std::function<void(const glm::mat4& camera, const glm::mat4& proj, int i)>);
void draw_objects(std::function<void(const glm::mat4& camera, const glm::mat4& proj, int i)>, Layer& layer);
void point_unproject(glm::vec2 loc, glm::vec4 vp, glm::mat4 camera, glm::mat4 proj,
@@ -315,5 +302,3 @@ public:
{
}
};
NS_END