Initial implementation of handles on sources to manipulate in geometry

view (only resize implemented so far)
This commit is contained in:
brunoherbelin
2020-05-16 12:06:52 +02:00
parent ab75c342f4
commit 20cafa388f
26 changed files with 1623 additions and 379 deletions

40
Mesh.h
View File

@@ -36,20 +36,48 @@ protected:
class Frame : public Node
{
Mesh *border_;
Mesh *shadow_;
public:
typedef enum { ROUND_THIN = 0, ROUND_LARGE, SHARP_THIN, SHARP_HANDLES } Style;
Frame(Style style);
typedef enum { ROUND_THIN = 0, ROUND_LARGE, SHARP_THIN, SHARP_LARGE } Type;
Frame(Type style);
~Frame();
void draw (glm::mat4 modelview, glm::mat4 projection) override;
void accept (Visitor& v) override;
Mesh *overlay_;
Type type() const { return type_; }
Mesh *border() const { return border_; }
glm::vec4 color;
protected:
Mesh *border_;
Mesh *shadow_;
Type type_;
};
class Handles : public Node
{
public:
typedef enum { RESIZE = 0, RESIZE_H, RESIZE_V, ROTATE } Type;
Handles(Type type);
~Handles();
void draw (glm::mat4 modelview, glm::mat4 projection) override;
void accept (Visitor& v) override;
Type type() const { return type_; }
Mesh *handle() const { return handle_; }
glm::vec4 color;
protected:
Mesh *handle_;
Type type_;
};
// TODO Shadow mesh with unique vao
// TODO dedicated source .cpp .h files for Frame and Handles
#endif // MESH_H