diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2017-03-03 18:50:40 -0300 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2017-03-03 18:50:40 -0300 |
commit | 4ddc7be64451db873e49169e951532ce8893e359 (patch) | |
tree | de034defff5a76a71249d53d8b0abb2a4eab17f9 /Project/ControlElement.h | |
parent | a54f50d0bf86c7c4d400e8b4d30cbc6091cfd9df (diff) | |
download | PSP.git-4ddc7be64451db873e49169e951532ce8893e359.tar.gz PSP.git-4ddc7be64451db873e49169e951532ce8893e359.tar.xz PSP.git-4ddc7be64451db873e49169e951532ce8893e359.zip |
More connection line methods implemented
Diffstat (limited to 'Project/ControlElement.h')
-rw-r--r-- | Project/ControlElement.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Project/ControlElement.h b/Project/ControlElement.h index 063b2a5..dedcc80 100644 --- a/Project/ControlElement.h +++ b/Project/ControlElement.h @@ -22,6 +22,13 @@ public: double GetRadius() const { return m_radius; } std::vector<wxPoint2DDouble> GetInTrianglePts() const { return m_triPts; } + + double GetAngle() const { return m_angle; } + void SetAngle(double angle) { m_angle = angle; } + + void Rotate(bool clockwise = true); + + void RotateTriPt(double angle); void StartMove(wxPoint2DDouble position); void Move(wxPoint2DDouble position); @@ -36,6 +43,7 @@ protected: double m_radius = 3.0; std::vector<wxPoint2DDouble> m_triPts; + double m_angle = 0.0; }; class ControlElement : public Element @@ -47,13 +55,13 @@ public: virtual void StartMove(wxPoint2DDouble position); virtual void Move(wxPoint2DDouble position); - void SetNodeList(std::vector<Node> nodeList) { m_nodeList = nodeList; } - std::vector<Node> GetNodeList() const { return m_nodeList; } + void SetNodeList(std::vector<Node*> nodeList) { m_nodeList = nodeList; } + std::vector<Node*> GetNodeList() const { return m_nodeList; } virtual void DrawNodes() const; protected: - std::vector<Node> m_nodeList; + std::vector<Node*> m_nodeList; }; #endif // CONTROLELEMENT_H |