mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Initial implementation of handles on sources to manipulate in geometry
view (only resize implemented so far)
This commit is contained in:
40
Mesh.h
40
Mesh.h
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user