diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2018-04-11 09:23:12 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-11 09:23:12 -0300 |
commit | af070d92462ac5586aa6a0a80c51a8fa72710600 (patch) | |
tree | 1e78bf3ced07950a572b1d94c4b029c540c73148 /Project/ConnectionLine.cpp | |
parent | e5a5041915127e72820a0478724a20dc41f0327e (diff) | |
parent | f6cd17abe2e788c2b1a1983a4d7efbd3b49880ca (diff) | |
download | PSP.git-af070d92462ac5586aa6a0a80c51a8fa72710600.tar.gz PSP.git-af070d92462ac5586aa6a0a80c51a8fa72710600.tar.xz PSP.git-af070d92462ac5586aa6a0a80c51a8fa72710600.zip |
Merge pull request #45 from Thales1330/wip/import-ANAREDE-files
Wip import anarede files
Diffstat (limited to 'Project/ConnectionLine.cpp')
-rw-r--r-- | Project/ConnectionLine.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Project/ConnectionLine.cpp b/Project/ConnectionLine.cpp index 672c6e8..80752da 100644 --- a/Project/ConnectionLine.cpp +++ b/Project/ConnectionLine.cpp @@ -22,9 +22,7 @@ ConnectionLine::ConnectionLine(Node* firstNode, int id) : ControlElement(id) { wxPoint2DDouble pt = firstNode->GetPosition(); m_tmpSndPt = pt; - for(int i = 0; i < 6; i++) { - m_pointList.push_back(pt); - } + for(int i = 0; i < 6; i++) { m_pointList.push_back(pt); } m_nodeList.push_back(firstNode); firstNode->SetConnected(); } @@ -52,9 +50,7 @@ void ConnectionLine::Draw(wxPoint2DDouble translation, double scale) const bool ConnectionLine::Contains(wxPoint2DDouble position) const { - if(PointToLineDistance(position) < 5.0) { - return true; - } + if(PointToLineDistance(position) < 5.0) { return true; } return false; } @@ -202,3 +198,11 @@ Element* ConnectionLine::GetCopy() *copy = *this; return copy; } + +bool ConnectionLine::Initialize() +{ + m_solved = false; + m_output = 0.0; + m_value = 0.0; + return true; +} |