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/Element.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/Element.h')
-rw-r--r-- | Project/Element.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/Project/Element.h b/Project/Element.h index c2ce506..bd34f5c 100644 --- a/Project/Element.h +++ b/Project/Element.h @@ -225,14 +225,21 @@ public: virtual std::vector<wxPoint2DDouble> GetPointList() const { return m_pointList; } /** - * @brief Add a parent to the element. The parent must be a bus. The element basic points are calculated in this - * method, so apply this when the element is being inserted. + * @brief Add a parent to the element. This method must be used on power elements that connect to a bus, so the + * parent must be a bus. + * The element basic points are calculated in this method, so apply this when the element is being inserted. * @param parent Element parent. * @param position Node position in the parent. */ virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return false; } /** + * @brief Add a parent to the element. + * @param parent Element parent. + */ + virtual void AddParent(Element* parent) { m_parentList.push_back(parent); } + + /** * @brief Checks if the element contains a position. * @param position Position to be checked. */ @@ -426,16 +433,16 @@ public: double scale, double offsetX = 0.0, double offsetY = 0.0) const; - virtual bool - /** - * @brief Check if two roteted rectangles intersect. - * @param rect1 First rect. - * @param rect2 Second rect. - * @param angle1 Rotation algle of first rectangle. - * @param angle2 Rotation angle of second rectangle. - */ - RotatedRectanglesIntersects(wxRect2DDouble rect1, wxRect2DDouble rect2, double angle1, double angle2) const; + /** + * @brief Check if two roteted rectangles intersect. + * @param rect1 First rect. + * @param rect2 Second rect. + * @param angle1 Rotation algle of first rectangle. + * @param angle2 Rotation angle of second rectangle. + */ + virtual bool + RotatedRectanglesIntersects(wxRect2DDouble rect1, wxRect2DDouble rect2, double angle1, double angle2) const; /** * @brief Draw a circle. @@ -563,7 +570,7 @@ public: * @param minDecimal Minimum number of decimal places. */ static wxString StringFromDouble(double value, int minDecimal = 1); - + /** * @brief Calculate the distance between a line (formed by point list) and a point. * @param point origin point. |