diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-08-02 17:34:42 -0300 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2016-08-02 17:34:42 -0300 |
commit | 78aac544e1e77f5405260797cee4b94d7a0dfe32 (patch) | |
tree | 32a71352d3fe13f361f90f51d5389317fd4d7015 /Project/Element.h | |
parent | 0ac91e091e52cae5745b14d62f77f905e559cf92 (diff) | |
download | PSP.git-78aac544e1e77f5405260797cee4b94d7a0dfe32.tar.gz PSP.git-78aac544e1e77f5405260797cee4b94d7a0dfe32.tar.xz PSP.git-78aac544e1e77f5405260797cee4b94d7a0dfe32.zip |
Bus controllers under implementation
Events handler removed
Diffstat (limited to 'Project/Element.h')
-rw-r--r-- | Project/Element.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Project/Element.h b/Project/Element.h index 56b2621..7023704 100644 --- a/Project/Element.h +++ b/Project/Element.h @@ -7,18 +7,6 @@ class Element { - protected: - wxRect2DDouble m_rect; - wxPoint2DDouble m_position; - double m_width = 0.0; - double m_height = 0.0; - double m_angle = 0.0; - double m_borderSize = 2.0; - - bool m_selected = false; - bool m_dragging = false; - bool m_showPickbox = false; - public: Element(); virtual ~Element(); @@ -41,20 +29,36 @@ class Element double GetWidth() const { return m_width; } double GetAngle() const { return m_angle; } bool IsPickboxShown() const { return m_showPickbox; } - // Métodos virtuais + // Pure-virtuals methods virtual void Draw(wxPoint2DDouble translation, double scale) const = 0; + virtual void Rotate() = 0; virtual bool Contains(wxPoint2DDouble position) const = 0; virtual int PickboxContains(wxPoint2DDouble position) const = 0; virtual void MovePickbox(wxPoint2DDouble position, int pickboxID) = 0; virtual wxCursor GetBestPickboxCursor() const = 0; - // Métodos gerais + // General methods wxPoint2DDouble WorldToScreen(wxPoint2DDouble translation, double scale, double offsetX = 0.0, double offsetY = 0.0) const; void DrawCircle(wxPoint2DDouble position, double radius, int numSegments, GLenum mode = GL_LINE_LOOP) const; void DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode = GL_QUADS) const; + void DrawRectangle(wxPoint2DDouble* points, GLenum mode = GL_QUADS) const; + void DrawPickbox(wxPoint2DDouble position) const; + wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees = true) const; + + protected: + wxRect2DDouble m_rect; + wxPoint2DDouble m_position; + double m_width = 0.0; + double m_height = 0.0; + double m_angle = 0.0; + double m_borderSize = 2.0; + + bool m_selected = false; + bool m_dragging = false; + bool m_showPickbox = false; }; #endif // ELEMENT_H |