diff options
-rw-r--r-- | Project/Branch.h | 1 | ||||
-rw-r--r-- | Project/ConnectionLine.cpp | 29 | ||||
-rw-r--r-- | Project/ConnectionLine.h | 17 | ||||
-rw-r--r-- | Project/Element.cpp | 35 | ||||
-rw-r--r-- | Project/Element.h | 70 | ||||
-rw-r--r-- | Project/Line.cpp | 35 | ||||
-rw-r--r-- | Project/Line.h | 1 | ||||
-rw-r--r-- | Project/Project.mk | 14 | ||||
-rw-r--r-- | Project/Project.project | 2 | ||||
-rw-r--r-- | Project/Project.txt | 2 | ||||
-rw-r--r-- | Project/TransferFunction.h | 1 |
11 files changed, 134 insertions, 73 deletions
diff --git a/Project/Branch.h b/Project/Branch.h index 461738f..a782a1e 100644 --- a/Project/Branch.h +++ b/Project/Branch.h @@ -20,7 +20,6 @@ public: virtual void RemoveParent(Element* parent); virtual void UpdateNodes(); virtual wxCursor GetBestPickboxCursor() const { return wxCURSOR_ARROW; } - virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return false; } virtual bool Intersects(wxRect2DDouble rect) const { return false; } virtual void MovePickbox(wxPoint2DDouble position) {} virtual bool PickboxContains(wxPoint2DDouble position) { return false; } diff --git a/Project/ConnectionLine.cpp b/Project/ConnectionLine.cpp new file mode 100644 index 0000000..68d893a --- /dev/null +++ b/Project/ConnectionLine.cpp @@ -0,0 +1,29 @@ +#include "ConnectionLine.h" + +ConnectionLine::ConnectionLine() + : ControlElement() +{ +} + +ConnectionLine::~ConnectionLine() {} + +void ConnectionLine::Draw(wxPoint2DDouble translation, double scale) const +{ + +} + +bool ConnectionLine::Contains(wxPoint2DDouble position) const +{ + if(PointToLineDistance(position) < 5.0) { + return true; + } + return false; +} + +bool ConnectionLine::Intersects(wxRect2DDouble rect) const +{ + for(auto it = m_pointList.begin(); it != m_pointList.end(); ++it) { + if(rect.Contains(*it)) return true; + } + return false; +} diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h new file mode 100644 index 0000000..8249df8 --- /dev/null +++ b/Project/ConnectionLine.h @@ -0,0 +1,17 @@ +#ifndef CONNECTIONLINE_H +#define CONNECTIONLINE_H + +#include "ControlElement.h" + +class ConnectionLine : public ControlElement +{ +public: + ConnectionLine(); + ~ConnectionLine(); + + virtual void Draw(wxPoint2DDouble translation, double scale) const; + virtual bool Contains(wxPoint2DDouble position) const; + virtual bool Intersects(wxRect2DDouble rect) const; +}; + +#endif // CONNECTIONLINE_H diff --git a/Project/Element.cpp b/Project/Element.cpp index 48d1342..ca24196 100644 --- a/Project/Element.cpp +++ b/Project/Element.cpp @@ -357,3 +357,38 @@ OpenGLColour::OpenGLColour(GLdouble red, GLdouble green, GLdouble blue, GLdouble { SetRGBA(red, green, blue, alpha); } + +double Element::PointToLineDistance(wxPoint2DDouble point, int* segmentNumber) const +{ + //[Ref] http://geomalgorithms.com/a02-_lines.html + double distance = 100.0; // Big initial distance. + wxPoint2DDouble p0 = point; + + for(int i = 1; i < (int)m_pointList.size() - 2; i++) { + double d = 0.0; + + wxPoint2DDouble p1 = m_pointList[i]; + wxPoint2DDouble p2 = m_pointList[i + 1]; + + wxPoint2DDouble v = p2 - p1; + wxPoint2DDouble w = p0 - p1; + + double c1 = w.m_x * v.m_x + w.m_y * v.m_y; + double c2 = v.m_x * v.m_x + v.m_y * v.m_y; + + if(c1 <= 0.0) { + d = std::sqrt(std::pow(p0.m_y - p1.m_y, 2) + std::pow(p0.m_x - p1.m_x, 2)); + } else if(c2 <= c1) { + d = std::sqrt(std::pow(p0.m_y - p2.m_y, 2) + std::pow(p0.m_x - p2.m_x, 2)); + } else { + d = std::abs((p2.m_y - p1.m_y) * p0.m_x - (p2.m_x - p1.m_x) * p0.m_y + p2.m_x * p1.m_y - p2.m_y * p1.m_x) / + std::sqrt(std::pow(p2.m_y - p1.m_y, 2) + std::pow(p2.m_x - p1.m_x, 2)); + } + if(d < distance) { + distance = d; + if(segmentNumber) *segmentNumber = i; + } + } + + return distance; +} diff --git a/Project/Element.h b/Project/Element.h index d3a733d..c2ce506 100644 --- a/Project/Element.h +++ b/Project/Element.h @@ -230,7 +230,7 @@ public: * @param parent Element parent. * @param position Node position in the parent. */ - virtual bool AddParent(Element* parent, wxPoint2DDouble position) = 0; + virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return false; } /** * @brief Checks if the element contains a position. @@ -380,29 +380,29 @@ public: * @return True if the element constains the pickbox, false otherwise. */ virtual bool PickboxContains(wxPoint2DDouble position) { return false; } - + /** * @brief Move the pickbox. * @param position position that the pickbox will be moved. */ virtual void MovePickbox(wxPoint2DDouble position) {} - + /** * @brief Get the best cursor to shown to the user when the mouse is above a pickbox. * @return Cursor. */ virtual wxCursor GetBestPickboxCursor() const { return wxCURSOR_ARROW; } - + /** * @brief Remove the pickboxes. */ virtual void ResetPickboxes() { m_activePickboxID = ID_PB_NONE; } - + /** * @brief Remove the active nodes. */ virtual void ResetNodes() { m_activeNodeID = 0; } - + /** * @brief Convert the element position to screen position. * @param translation System translation. @@ -412,7 +412,7 @@ public: */ virtual wxPoint2DDouble WorldToScreen(wxPoint2DDouble translation, double scale, double offsetX = 0.0, double offsetY = 0.0) const; - + /** * @brief Convert a generic position to screen position. * @param position Position to be converted. @@ -427,15 +427,15 @@ public: 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. + */ + RotatedRectanglesIntersects(wxRect2DDouble rect1, wxRect2DDouble rect2, double angle1, double angle2) const; /** * @brief Draw a circle. @@ -451,7 +451,7 @@ public: double finalAngle, int numSegments, GLenum mode = GL_LINE_LOOP) const; - + /** * @brief Draw rectangle. * @param position Rectangle position. @@ -460,41 +460,41 @@ public: * @param mode OpenGl primitive. */ virtual void DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode = GL_QUADS) const; - + /** * @brief Draw rectangle. * @param points Rectangle vertices. * @param mode OpenGl primitive. */ virtual void DrawRectangle(wxPoint2DDouble* points, GLenum mode = GL_QUADS) const; - + /** * @brief Draw a triangle. * @param points Triangle vertices. * @param mode OpenGl primitive. */ virtual void DrawTriangle(std::vector<wxPoint2DDouble> points, GLenum mode = GL_TRIANGLES) const; - + /** * @brief Draw a point. * @param position Point position. * @param size Point size. */ virtual void DrawPoint(wxPoint2DDouble position, double size) const; - + /** * @brief Draw line. * @param points Line vertices. * @param mode OpenGl primitive. */ virtual void DrawLine(std::vector<wxPoint2DDouble> points, GLenum mode = GL_LINE_STRIP) const; - + /** * @brief Draw pickbox. * @param position Pickbox position. */ virtual void DrawPickbox(wxPoint2DDouble position) const; - + /** * @brief Rotate a point as element position being the origin. * @param pointToRotate Point that will be rotated. @@ -508,16 +508,16 @@ public: * @return Parent list. */ virtual std::vector<Element*> GetParentList() const { return m_parentList; } - + /** * @brief Get the Child list. * @return Child List. */ virtual std::vector<Element*> GetChildList() const { return m_childList; } - - //virtual wxPoint2DDouble GetMoveStartPosition() const { return m_moveStartPt; } - //virtual wxPoint2DDouble GetMovePosition() const { return m_movePos; } - + + // virtual wxPoint2DDouble GetMoveStartPosition() const { return m_moveStartPt; } + // virtual wxPoint2DDouble GetMovePosition() const { return m_movePos; } + /** * @brief Calculate the element boundaries. * @param leftUp Top-left position of the element. @@ -538,7 +538,7 @@ public: * @return True if the form is shown, false otherwise. */ virtual bool ShowForm(wxWindow* parent, Element* element) { return false; } - + /** * @brief Get a double value from a string. Show a error message if the conversion fail. * @param parent Message box parent. @@ -547,7 +547,7 @@ public: * @param errorMsg Error message. */ bool DoubleFromString(wxWindow* parent, wxString strValue, double& value, wxString errorMsg); - + /** * @brief Convert a string to int. Show a error message if the conversion fail. * @param parent Message box parent. @@ -563,6 +563,14 @@ 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. + * @param segmentNumber Sotores the segment number clicked + * @return The distance between the point and the line. + */ + virtual double PointToLineDistance(wxPoint2DDouble point, int* segmentNumber = NULL) const; protected: int m_elementID = 0; @@ -594,7 +602,7 @@ protected: wxPoint2DDouble m_movePos; bool m_online = true; - + OpenGLColour m_selectionColour; }; diff --git a/Project/Line.cpp b/Project/Line.cpp index 66a43c5..86d947c 100644 --- a/Project/Line.cpp +++ b/Project/Line.cpp @@ -267,41 +267,6 @@ void Line::MoveNode(Element* parent, wxPoint2DDouble position) UpdatePowerFlowArrowsPosition(); } -double Line::PointToLineDistance(wxPoint2DDouble point, int* segmentNumber) const -{ - //[Ref] http://geomalgorithms.com/a02-_lines.html - double distance = 100.0; // Big initial distance. - wxPoint2DDouble p0 = point; - - for(int i = 1; i < (int)m_pointList.size() - 2; i++) { - double d = 0.0; - - wxPoint2DDouble p1 = m_pointList[i]; - wxPoint2DDouble p2 = m_pointList[i + 1]; - - wxPoint2DDouble v = p2 - p1; - wxPoint2DDouble w = p0 - p1; - - double c1 = w.m_x * v.m_x + w.m_y * v.m_y; - double c2 = v.m_x * v.m_x + v.m_y * v.m_y; - - if(c1 <= 0.0) { - d = std::sqrt(std::pow(p0.m_y - p1.m_y, 2) + std::pow(p0.m_x - p1.m_x, 2)); - } else if(c2 <= c1) { - d = std::sqrt(std::pow(p0.m_y - p2.m_y, 2) + std::pow(p0.m_x - p2.m_x, 2)); - } else { - d = std::abs((p2.m_y - p1.m_y) * p0.m_x - (p2.m_x - p1.m_x) * p0.m_y + p2.m_x * p1.m_y - p2.m_y * p1.m_x) / - std::sqrt(std::pow(p2.m_y - p1.m_y, 2) + std::pow(p2.m_x - p1.m_x, 2)); - } - if(d < distance) { - distance = d; - if(segmentNumber) *segmentNumber = i; - } - } - - return distance; -} - bool Line::GetContextMenu(wxMenu& menu) { menu.Append(ID_EDIT_ELEMENT, _("Edit line")); diff --git a/Project/Line.h b/Project/Line.h index 1ff1102..0abcd82 100644 --- a/Project/Line.h +++ b/Project/Line.h @@ -65,7 +65,6 @@ public: virtual void SetPointList(std::vector<wxPoint2DDouble> pointList); protected: - double PointToLineDistance(wxPoint2DDouble point, int* segmentNumber = NULL) const; void UpdatePowerFlowArrowsPosition(); LineElectricalData m_electricaData; }; diff --git a/Project/Project.mk b/Project/Project.mk index 0b7e705..149318b 100644 --- a/Project/Project.mk +++ b/Project/Project.mk @@ -13,7 +13,7 @@ CurrentFileName := CurrentFilePath := CurrentFileFullPath := User :=Thales -Date :=28/01/2017 +Date :=23/02/2017 CodeLitePath :="C:/Program Files/CodeLite" LinkerName :=C:/TDM-GCC-64/bin/g++.exe SharedObjectLinkerName :=C:/TDM-GCC-64/bin/g++.exe -shared -fPIC @@ -68,8 +68,8 @@ Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirector $(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditorBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditorBase.cpp$(ObjectSuffix) \ $(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IntermediateDirectory)/Load.cpp$(ObjectSuffix) \ $(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) $(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) $(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) + $(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) @@ -414,6 +414,14 @@ $(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix): TransferFunction.c $(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix): TransferFunction.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix) TransferFunction.cpp +$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix): ConnectionLine.cpp $(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/ConnectionLine.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix): ConnectionLine.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix) -MM ConnectionLine.cpp + +$(IntermediateDirectory)/ConnectionLine.cpp$(PreprocessSuffix): ConnectionLine.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ConnectionLine.cpp$(PreprocessSuffix) ConnectionLine.cpp + $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix): BusForm.cpp $(IntermediateDirectory)/BusForm.cpp$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/Thales/Documents/GitHub/PSP/Project/BusForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/BusForm.cpp$(DependSuffix): BusForm.cpp diff --git a/Project/Project.project b/Project/Project.project index 46d70e1..aef8589 100644 --- a/Project/Project.project +++ b/Project/Project.project @@ -39,6 +39,7 @@ <VirtualDirectory Name="control element"> <File Name="ControlElement.cpp"/> <File Name="TransferFunction.cpp"/> + <File Name="ConnectionLine.cpp"/> </VirtualDirectory> </VirtualDirectory> <VirtualDirectory Name="view"> @@ -108,6 +109,7 @@ <VirtualDirectory Name="control element"> <File Name="ControlElement.h"/> <File Name="TransferFunction.h"/> + <File Name="ConnectionLine.h"/> </VirtualDirectory> </VirtualDirectory> <VirtualDirectory Name="view"> diff --git a/Project/Project.txt b/Project/Project.txt index 67cb7a2..ab4e960 100644 --- a/Project/Project.txt +++ b/Project/Project.txt @@ -1 +1 @@ -./Release/main.cpp.o ./Release/win_resources.rc.o ./Release/ElementDataObject.cpp.o ./Release/Element.cpp.o ./Release/ArtMetro.cpp.o ./Release/wxGLString.cpp.o ./Release/MainFrame.cpp.o ./Release/Workspace.cpp.o ./Release/FileHanding.cpp.o ./Release/ControlEditor.cpp.o ./Release/Camera.cpp.o ./Release/MainFrameBitmaps.cpp.o ./Release/WorkspaceBitmaps.cpp.o ./Release/BusFormBitmaps.cpp.o ./Release/ElementFormBitmaps.cpp.o ./Release/ControlEditorBitmaps.cpp.o ./Release/MainFrameBase.cpp.o ./Release/WorkspaceBase.cpp.o ./Release/ElementForm.cpp.o ./Release/ControlEditorBase.cpp.o ./Release/Bus.cpp.o ./Release/Line.cpp.o ./Release/Transformer.cpp.o ./Release/Machines.cpp.o ./Release/SyncGenerator.cpp.o ./Release/IndMotor.cpp.o ./Release/Branch.cpp.o ./Release/SyncMotor.cpp.o ./Release/Shunt.cpp.o ./Release/Load.cpp.o ./Release/Inductor.cpp.o ./Release/Capacitor.cpp.o ./Release/PowerElement.cpp.o ./Release/ElectricCalculation.cpp.o ./Release/PowerFlow.cpp.o ./Release/Fault.cpp.o ./Release/Text.cpp.o ./Release/GraphicalElement.cpp.o ./Release/ControlElement.cpp.o ./Release/TransferFunction.cpp.o ./Release/BusForm.cpp.o ./Release/GeneratorStabForm.cpp.o ./Release/LineForm.cpp.o ./Release/SwitchingForm.cpp.o ./Release/TransformerForm.cpp.o ./Release/LoadForm.cpp.o ./Release/ReactiveShuntElementForm.cpp.o ./Release/IndMotorForm.cpp.o ./Release/SyncMachineForm.cpp.o ./Release/TextForm.cpp.o ./Release/TransferFunctionForm.cpp.o +./Release/main.cpp.o ./Release/win_resources.rc.o ./Release/ElementDataObject.cpp.o ./Release/Element.cpp.o ./Release/ArtMetro.cpp.o ./Release/wxGLString.cpp.o ./Release/MainFrame.cpp.o ./Release/Workspace.cpp.o ./Release/FileHanding.cpp.o ./Release/ControlEditor.cpp.o ./Release/Camera.cpp.o ./Release/MainFrameBitmaps.cpp.o ./Release/WorkspaceBitmaps.cpp.o ./Release/BusFormBitmaps.cpp.o ./Release/ElementFormBitmaps.cpp.o ./Release/ControlEditorBitmaps.cpp.o ./Release/MainFrameBase.cpp.o ./Release/WorkspaceBase.cpp.o ./Release/ElementForm.cpp.o ./Release/ControlEditorBase.cpp.o ./Release/Bus.cpp.o ./Release/Line.cpp.o ./Release/Transformer.cpp.o ./Release/Machines.cpp.o ./Release/SyncGenerator.cpp.o ./Release/IndMotor.cpp.o ./Release/Branch.cpp.o ./Release/SyncMotor.cpp.o ./Release/Shunt.cpp.o ./Release/Load.cpp.o ./Release/Inductor.cpp.o ./Release/Capacitor.cpp.o ./Release/PowerElement.cpp.o ./Release/ElectricCalculation.cpp.o ./Release/PowerFlow.cpp.o ./Release/Fault.cpp.o ./Release/Text.cpp.o ./Release/GraphicalElement.cpp.o ./Release/ControlElement.cpp.o ./Release/TransferFunction.cpp.o ./Release/ConnectionLine.cpp.o ./Release/BusForm.cpp.o ./Release/GeneratorStabForm.cpp.o ./Release/LineForm.cpp.o ./Release/SwitchingForm.cpp.o ./Release/TransformerForm.cpp.o ./Release/LoadForm.cpp.o ./Release/ReactiveShuntElementForm.cpp.o ./Release/IndMotorForm.cpp.o ./Release/SyncMachineForm.cpp.o ./Release/TextForm.cpp.o ./Release/TransferFunctionForm.cpp.o diff --git a/Project/TransferFunction.h b/Project/TransferFunction.h index c8ca59f..d1d9529 100644 --- a/Project/TransferFunction.h +++ b/Project/TransferFunction.h @@ -17,7 +17,6 @@ public: virtual void Draw(wxPoint2DDouble translation, double scale) const; virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); } virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); } - virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return false; } virtual bool ShowForm(wxWindow* parent, Element* element); virtual std::vector<double> GetNumerator() const { return m_numerator; } |