refactor stroke drawing
This commit is contained in:
11
src/canvas.h
11
src/canvas.h
@@ -126,6 +126,14 @@ struct PPIHeader
|
||||
|
||||
class Canvas
|
||||
{
|
||||
struct StrokeFrame
|
||||
{
|
||||
glm::vec4 col;
|
||||
float pressure;
|
||||
std::array<std::vector<vertex_t>, 6> shapes;
|
||||
glm::vec4 m_mixer_rect;
|
||||
};
|
||||
|
||||
public:
|
||||
Plane m_plane;
|
||||
Plane m_plane_brush;
|
||||
@@ -224,6 +232,9 @@ public:
|
||||
void stroke_start(glm::vec3 point, float pressure, const std::shared_ptr<Brush>& brush);
|
||||
void stroke_update(glm::vec3 point, float pressure);
|
||||
void stroke_draw_mix(const glm::vec2& bb_min, const glm::vec2& bb_sz);
|
||||
std::array<std::vector<vertex_t>, 6> stroke_draw_project(std::array<vertex_t, 4>& B);
|
||||
void stroke_draw_samples(int i, std::vector<vertex_t>& P);
|
||||
std::vector<StrokeFrame> stroke_draw_compute();
|
||||
void stroke_draw();
|
||||
void stroke_end();
|
||||
void stroke_cancel();
|
||||
|
||||
Reference in New Issue
Block a user