diff options
| author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-09-05 18:43:50 -0300 |
|---|---|---|
| committer | Thales1330 <thaleslima.ufu@gmail.com> | 2016-09-05 18:43:50 -0300 |
| commit | d93ef357da510f2515556ff2cb51688a4e068805 (patch) | |
| tree | da24ff514d5d507252681365d7cda6b08576af23 /Project/Inductor.cpp | |
| parent | 47cebfc84d4ae315f4bf8ffb3d074b2b75781a1b (diff) | |
| download | PSP.git-d93ef357da510f2515556ff2cb51688a4e068805.tar.gz PSP.git-d93ef357da510f2515556ff2cb51688a4e068805.tar.xz PSP.git-d93ef357da510f2515556ff2cb51688a4e068805.zip | |
All elements implemented, switches implemented
Diffstat (limited to 'Project/Inductor.cpp')
| -rw-r--r-- | Project/Inductor.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Project/Inductor.cpp b/Project/Inductor.cpp index 0ed8ba5..08511e4 100644 --- a/Project/Inductor.cpp +++ b/Project/Inductor.cpp @@ -22,6 +22,11 @@ bool Inductor::AddParent(Element* parent, wxPoint2DDouble position) m_pointList.push_back(m_position + wxPoint2DDouble(0.0, -m_height / 2.0)); m_inserted = true; + + wxRect2DDouble genRect(0,0,0,0); + m_switchRect.push_back(genRect); // Push a general rectangle. + UpdateSwitches(); + return true; } return false; @@ -57,12 +62,15 @@ void Inductor::Draw(wxPoint2DDouble translation, double scale) const glColor4d(0.2, 0.2, 0.2, 1.0); DrawCircle(m_pointList[0], 5.0, 10, GL_POLYGON); DrawLine(m_pointList); + + DrawSwitches(); glPushMatrix(); glTranslated(m_position.m_x, m_position.m_y, 0.0); glRotated(m_angle, 0.0, 0.0, 1.0); glTranslated(-m_position.m_x, -m_position.m_y, 0.0); - + + glColor4d(0.2, 0.2, 0.2, 1.0); DrawArc(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 10.0), 10, 45, 270, 10, GL_LINE_STRIP); DrawArc(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 25.0), 10, 45, 315, 10, GL_LINE_STRIP); DrawArc(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 40.0), 10, 90, 315, 10, GL_LINE_STRIP); |
