Power System Platform  2026w10a-beta
Loading...
Searching...
No Matches
ConnectionLine Class Reference

Connection between two control elements or other connection line and an element. More...

#include <ConnectionLine.h>

Inheritance diagram for ConnectionLine:
Collaboration diagram for ConnectionLine:

Public Types

enum class  ConnectionLineType : int { ELEMENT_ELEMENT = 0 , ELEMENT_LINE }
 

Public Member Functions

 ConnectionLine (Node *firstNode, int id)
 
virtual void DrawDC (wxPoint2DDouble translation, double scale, wxGraphicsContext *gc) const
 Draw the element using GDI+.
 
virtual bool Contains (wxPoint2DDouble position) const
 Checks if the element contains a position.
 
virtual bool Intersects (wxRect2DDouble rect) const
 Check if the element's rect intersects other rect.
 
virtual void RemoveParent (Element *parent)
 Remove a parent.
 
virtual void StartMove (wxPoint2DDouble position)
 Update the element attributes related to the movement.
 
virtual void Move (wxPoint2DDouble position)
 Move the element other position.
 
virtual bool AppendNode (Node *node, ControlElement *parent)
 
virtual void UpdatePoints ()
 
virtual bool Initialize ()
 
virtual void SetTemporarySecondPoint (wxPoint2DDouble point)
 
virtual wxPoint2DDouble GetMidPoint () const
 
virtual double GetOffset () const
 
virtual void SetOffset (double offset)
 
virtual ConnectionLine::ConnectionLineType GetType () const
 
virtual void SetType (ConnectionLineType newType)
 
virtual ConnectionLineGetParentLine () const
 
virtual bool SetParentLine (ConnectionLine *parent)
 
virtual std::vector< ConnectionLine * > GetLineChildList () const
 
virtual double GetValue () const
 
virtual void SetValue (double value)
 
ElementGetCopy ()
 Get a the element copy.
 
- Public Member Functions inherited from ControlElement
 ControlElement (int id)
 
void SetNodeList (std::vector< Node * > nodeList)
 
std::vector< Node * > GetNodeList () const
 
virtual void DrawDCNodes (wxGraphicsContext *gc) const
 
virtual void ReplaceNode (Node *oldNode, Node *newNode)
 
virtual bool UpdateText ()
 Update the OpenGL text in the element (if present).
 
virtual bool IsSolved () const
 
virtual void SetSolved (bool solved=true)
 
virtual bool Solve (double *input, double timeStep)
 
virtual double GetOutput () const
 
virtual void SetOutput (double output)
 
- Public Member Functions inherited from Element
 Element ()
 Constructor.
 
virtual ~Element ()
 Destructor.
 
void SetDragging (bool dragging=true)
 Set if the element are being dragged.
 
void SetHeight (double height)
 Set element height.
 
void SetPosition (const wxPoint2DDouble position)
 Set the element position and update the rectangle.
 
void SetSelected (bool selected=true)
 Set element selection.
 
void SetWidth (double width)
 Set element width.
 
void SetAngle (double angle)
 Set element angle.
 
void ShowPickbox (bool showPickbox=true)
 Set if the pickbox is shown.
 
void SetBorderSize (double borderSize)
 Set the size of the border (shown in selected elements).
 
bool SetOnline (bool online=true)
 Set if the element is online or offline.
 
virtual void SetPointList (std::vector< wxPoint2DDouble > pointList)
 Set the list of points that connect the element to the bus.
 
ElementType GetElementType ()
 
wxRect2DDouble GetRect () const
 Get the element rectangle.
 
wxPoint2DDouble GetPosition () const
 Get the element position.
 
bool IsDragging () const
 Checks if the element is being dragged.
 
double GetHeight () const
 Get the element height.
 
bool IsSelected () const
 Checks if the element is selected.
 
double GetWidth () const
 Get the element width.
 
double GetAngle () const
 Get the element angle.
 
double GetRotationAngle () const
 Get the angle of rotation.
 
bool IsPickboxShown () const
 Checks if the pickbox is shown.
 
bool IsOnline () const
 Checks if the element is online or offline.
 
virtual std::vector< wxPoint2DDouble > GetPointList () const
 Get the list of points that connect the element to bus.
 
virtual bool AddParent (Element *parent, wxPoint2DDouble position)
 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.
 
virtual void AddParent (Element *parent)
 Add a parent to the element.
 
virtual void SetID (int id)
 Set the element ID.
 
virtual int GetID () const
 Get the element ID.
 
virtual void AddChild (Element *child)
 Add a child to the child list.
 
virtual void RemoveChild (Element *child)
 Remove a child from the list.
 
virtual void ReplaceChild (Element *oldChild, Element *newChild)
 Replace a child from the list.
 
virtual wxString GetTipText () const
 Get the tip text.
 
virtual void DrawDC (wxPoint2DDouble translation, double scale, wxDC &dc) const
 Draw the element using wxDC.
 
virtual void Rotate (bool clockwise=true)
 Rotate the element.
 
virtual bool GetContextMenu (wxMenu &menu)
 Get the element contex menu.
 
virtual void AddPoint (wxPoint2DDouble point)
 Add point to the list of points that connect the element to the bus.
 
virtual void MoveNode (Element *parent, wxPoint2DDouble position)
 Move a node. StartMove(wxPoint2DDouble position) before start moving.
 
virtual bool NodeContains (wxPoint2DDouble position)
 Check if a node contains a point. If contains, set the attributes related to node movement.
 
virtual void UpdateNodes ()
 Update the nodes according to the parents. If a parent is removed, use this method.
 
void SetParent (Element *parent, int num)
 
void SetChild (Element *child, int num)
 
virtual bool SetNodeParent (Element *parent)
 Set a perent to the node. If all conditions are met, a new parent are added to the element and the points related to the nodes will be calculated.
 
virtual void ReplaceParent (Element *oldParent, Element *newParent)
 Replace a parent.
 
virtual void RotateNode (Element *parent, bool clockwise=true)
 Rotate a node.
 
virtual bool PickboxContains (wxPoint2DDouble position)
 Check if a pickbox contains a point. If contains the attributes related to pickbox movement will be calculated.
 
virtual void MovePickbox (wxPoint2DDouble position)
 Move the pickbox.
 
virtual wxCursor GetBestPickboxCursor () const
 Get the best cursor to shown to the user when the mouse is above a pickbox.
 
virtual void ResetPickboxes ()
 Remove the pickboxes.
 
virtual void ResetNodes ()
 Remove the active nodes.
 
virtual wxPoint2DDouble WorldToScreen (wxPoint2DDouble translation, double scale, double offsetX=0.0, double offsetY=0.0) const
 Convert the element position to screen position.
 
virtual wxPoint2DDouble WorldToScreen (wxPoint2DDouble position, wxPoint2DDouble translation, double scale, double offsetX=0.0, double offsetY=0.0) const
 Convert a generic position to screen position.
 
virtual bool RotatedRectanglesIntersects (wxRect2DDouble rect1, wxRect2DDouble rect2, double angle1, double angle2) const
 Check if two roteted rectangles intersect.
 
virtual void DrawDCRectangle (wxPoint2DDouble position, double width, double height, double angle, wxDC &dc) const
 Draw a circle.
 
virtual void DrawDCRoundedRectRotated (wxDC &dc, const wxPoint2DDouble &center, double width, double height, double radius, double angleDeg, int arcSegments=8) const
 
virtual void DrawDCCircle (wxPoint2DDouble position, double radius, int numSegments, wxGraphicsContext *gc) const
 Draw a circle using device context.
 
virtual void DrawDCCircle (wxPoint2DDouble position, double radius, wxDC &dc) const
 
virtual void DrawDCArc (wxPoint2DDouble position, double radius, double initAngle, double finalAngle, int numSegments, wxGraphicsContext *gc) const
 
virtual void DrawDCArc (wxPoint2DDouble position, double radius, double initAngle, double finalAngle, wxDC &dc) const
 
virtual void DrawDCTriangle (std::vector< wxPoint2DDouble > points, wxGraphicsContext *gc) const
 Draw rectangle.
 
virtual void DrawDCTriangle (std::vector< wxPoint > points, wxDC &dc) const
 
virtual void DrawDCPickbox (wxPoint2DDouble position, wxGraphicsContext *gc) const
 Draw a point.
 
virtual wxPoint2DDouble RotateAtPosition (wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
 Rotate a point as element position being the origin.
 
virtual wxPoint2DDouble RotateLocal (wxPoint2DDouble local, double angleDeg) const
 
virtual wxPoint RotateAround (const wxPoint2DDouble &p, const wxPoint2DDouble &center, double angleDeg) const
 
virtual std::vector< Element * > GetParentList () const
 Get the parent list.
 
virtual std::vector< Element * > GetChildList () const
 Get the Child list.
 
virtual void CalculateBoundaries (wxPoint2DDouble &leftUp, wxPoint2DDouble &rightBottom) const
 Calculate the element boundaries.
 
virtual void GeneralMenuItens (wxMenu &menu)
 Insert general itens to context menu.
 
virtual bool ShowForm (wxWindow *parent, Element *element)
 Show element data form.
 
virtual double PointToLineDistance (wxPoint2DDouble point, int *segmentNumber=nullptr) const
 Calculate the distance between a line (formed by point list) and a point.
 
bool IsInserted () const
 Check if the element is properly inserted in the workspace.
 
void SetInserted (bool inserted=true)
 Set if the element is properly inserted in the workspace.
 
virtual rapidxml::xml_node * SaveElement (rapidxml::xml_document<> &doc, rapidxml::xml_node<> *elementListNode)
 
virtual bool OpenElement (rapidxml::xml_node<> *elementNode)
 
void SaveCADProperties (rapidxml::xml_document<> &doc, rapidxml::xml_node<> *elementNode)
 
bool OpenCADProperties (rapidxml::xml_node<> *elementNode)
 

Protected Attributes

double m_lineOffset = 0.0
 
double m_moveStartPtY = 0.0
 
double m_moveStartOffset = 0.0
 
wxPoint2DDouble m_tmpSndPt
 
ConnectionLineType m_type = ConnectionLineType::ELEMENT_ELEMENT
 
ConnectionLinem_parentLine = nullptr
 
double m_value = 0.0
 
- Protected Attributes inherited from ControlElement
std::vector< Node * > m_nodeList
 
bool m_solved = false
 
double m_output = 0.0
 
- Protected Attributes inherited from Element
ElementType m_elementType = ElementType::TYPE_NONE
 
int m_elementID = 0
 
std::vector< Element * > m_parentList
 
std::vector< Element * > m_childList
 
wxRect2DDouble m_rect
 
wxPoint2DDouble m_position
 
double m_width = 0.0
 
double m_height = 0.0
 
double m_angle = 0.0
 
double m_borderSize = 2.0
 
double m_rotationAngle = 45.0
 
double m_switchSize = 10.0
 
std::vector< wxRect2DDouble > m_switchRect
 
bool m_selected = false
 
bool m_dragging = false
 
bool m_showPickbox = false
 
bool m_inserted = false
 
int m_activePickboxID = ID_PB_NONE
 
int m_activeNodeID = 0
 
std::vector< wxPoint2DDouble > m_pointList
 
std::vector< wxPoint2DDouble > m_movePts
 
wxPoint2DDouble m_moveStartPt
 
wxPoint2DDouble m_movePos
 
bool m_online = true
 
wxColour m_selectionColour
 

Additional Inherited Members

- Static Public Member Functions inherited from ControlElement
static ControlElementGetControlElementFromID (std::vector< std::shared_ptr< ControlElement > > elementList, int id)
 
- Static Public Member Functions inherited from Element
static bool DoubleFromString (wxWindow *parent, wxString strValue, double &value, wxString errorMsg)
 Get a double value from a string. Show a error message if the conversion fail.
 
static bool IntFromString (wxWindow *parent, wxString strValue, int &value, wxString errorMsg)
 Convert a string to int. Show a error message if the conversion fail.
 
static wxString StringFromDouble (double value, int minDecimal=1, int maxDecimals=13)
 Convert a double value to string.
 
- Protected Member Functions inherited from ControlElement
void SaveControlNodes (rapidxml::xml_document<> &doc, rapidxml::xml_node<> *elementNode)
 
bool OpenControlNodes (rapidxml::xml_node<> *elementNode)
 

Detailed Description

Connection between two control elements or other connection line and an element.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
05/10/2017

Definition at line 30 of file ConnectionLine.h.

Member Enumeration Documentation

◆ ConnectionLineType

enum class ConnectionLine::ConnectionLineType : int
strong

Definition at line 33 of file ConnectionLine.h.

33: int { ELEMENT_ELEMENT = 0, ELEMENT_LINE };

Constructor & Destructor Documentation

◆ ConnectionLine() [1/2]

ConnectionLine::ConnectionLine ( )

Definition at line 22 of file ConnectionLine.cpp.

◆ ConnectionLine() [2/2]

ConnectionLine::ConnectionLine ( Node firstNode,
int  id 
)

Definition at line 23 of file ConnectionLine.cpp.

23 : ControlElement(id)
24{
25 wxPoint2DDouble pt = firstNode->GetPosition();
26 m_tmpSndPt = pt;
27 for (int i = 0; i < 6; i++) { m_pointList.push_back(pt); }
28 m_nodeList.push_back(firstNode);
29 firstNode->SetConnected();
30}

◆ ~ConnectionLine()

ConnectionLine::~ConnectionLine ( )

Definition at line 32 of file ConnectionLine.cpp.

33{
34}

Member Function Documentation

◆ AppendNode()

bool ConnectionLine::AppendNode ( Node node,
ControlElement parent 
)
virtual

Definition at line 164 of file ConnectionLine.cpp.

165{
166 if (m_nodeList.size() != 1) return false;
167 if (m_nodeList[0] == node) return false;
168 if (m_nodeList[0]->GetNodeType() == node->GetNodeType()) return false;
169 auto nodeList = parent->GetNodeList();
170 for (auto it = nodeList.begin(), itEnd = nodeList.end(); it != itEnd; ++it) {
171 Node* parentNode = *it;
172 if (parentNode == m_nodeList[0]) return false;
173 }
174
175 m_nodeList.push_back(node);
176 node->SetConnected();
177 return true;
178}
Node of a control element. This class manages the user interaction with the connection and control el...

◆ Contains()

bool ConnectionLine::Contains ( wxPoint2DDouble  position) const
virtual

Checks if the element contains a position.

Parameters
positionPosition to be checked.

Implements Element.

Definition at line 75 of file ConnectionLine.cpp.

76{
77 if (PointToLineDistance(position) < 5.0) { return true; }
78 return false;
79}
virtual double PointToLineDistance(wxPoint2DDouble point, int *segmentNumber=nullptr) const
Calculate the distance between a line (formed by point list) and a point.
Definition Element.cpp:601
Here is the call graph for this function:

◆ DrawDC()

void ConnectionLine::DrawDC ( wxPoint2DDouble  translation,
double  scale,
wxGraphicsContext *  gc 
) const
virtual

Draw the element using GDI+.

Parameters
translationTranslation of the system.
scaleScale of the system.
gcGraphics context

Reimplemented from Element.

Definition at line 56 of file ConnectionLine.cpp.

57{
58 gc->SetBrush(*wxTRANSPARENT_BRUSH);
59 if (m_selected) {
60 gc->SetPen(wxPen(m_selectionColour, 1.5 + m_borderSize * 2.0));
61 gc->StrokeLines(m_pointList.size(), &m_pointList[0]);
62 }
63
64 // Draw line (Layer 2)
65 gc->SetPen(wxPen(wxColour(0, 0, 0, 255), 2.0));
66 gc->StrokeLines(m_pointList.size(), &m_pointList[0]);
67
68 if (m_type == ConnectionLineType::ELEMENT_LINE) {
69 gc->SetPen(*wxTRANSPARENT_PEN);
70 gc->SetBrush(wxBrush(wxColour(0, 0, 0, 255)));
71 DrawDCCircle(m_pointList[5], 3, 10, gc);
72 }
73}
virtual void DrawDCCircle(wxPoint2DDouble position, double radius, int numSegments, wxGraphicsContext *gc) const
Draw a circle using device context.
Definition Element.cpp:177
Here is the call graph for this function:

◆ GetCopy()

Element * ConnectionLine::GetCopy ( )
virtual

Get a the element copy.

Returns
Copy of the element.

Reimplemented from Element.

Definition at line 221 of file ConnectionLine.cpp.

222{
223 ConnectionLine* copy = new ConnectionLine();
224 *copy = *this;
225 return copy;
226}
Connection between two control elements or other connection line and an element.

◆ GetLineChildList()

std::vector< ConnectionLine * > ConnectionLine::GetLineChildList ( ) const
virtual

Definition at line 203 of file ConnectionLine.cpp.

204{
205 std::vector<ConnectionLine*> childList;
206 for (auto it = m_childList.begin(), itEnd = m_childList.end(); it != itEnd; ++it) {
207 ConnectionLine* child = static_cast<ConnectionLine*>(*it);
208 childList.push_back(child);
209 }
210 return childList;
211}

◆ GetMidPoint()

wxPoint2DDouble ConnectionLine::GetMidPoint ( ) const
virtual

Definition at line 192 of file ConnectionLine.cpp.

192{ return ((m_pointList[2] + m_pointList[3]) / 2.0); }

◆ GetOffset()

virtual double ConnectionLine::GetOffset ( ) const
inlinevirtual

Definition at line 50 of file ConnectionLine.h.

50{ return m_lineOffset; }

◆ GetParentLine()

virtual ConnectionLine * ConnectionLine::GetParentLine ( ) const
inlinevirtual

Definition at line 54 of file ConnectionLine.h.

54{ return m_parentLine; }

◆ GetType()

virtual ConnectionLine::ConnectionLineType ConnectionLine::GetType ( ) const
inlinevirtual

Definition at line 52 of file ConnectionLine.h.

52{ return m_type; }

◆ GetValue()

virtual double ConnectionLine::GetValue ( ) const
inlinevirtual

Definition at line 59 of file ConnectionLine.h.

59{ return m_value; }

◆ Initialize()

bool ConnectionLine::Initialize ( )
virtual

Reimplemented from ControlElement.

Definition at line 228 of file ConnectionLine.cpp.

229{
230 m_solved = false;
231 m_output = 0.0;
232 m_value = 0.0;
233 return true;
234}

◆ Intersects()

bool ConnectionLine::Intersects ( wxRect2DDouble  rect) const
virtual

Check if the element's rect intersects other rect.

Parameters
rectRect to check intersection.

Implements Element.

Definition at line 81 of file ConnectionLine.cpp.

82{
83 for (auto it = m_pointList.begin(); it != m_pointList.end(); ++it) {
84 if (rect.Contains(*it)) return true;
85 }
86 return false;
87}

◆ Move()

void ConnectionLine::Move ( wxPoint2DDouble  position)
virtual

Move the element other position.

Parameters
positionPosition that the element will be moved. Use StartMove(wxPoint2DDouble position) before start moving.

Reimplemented from ControlElement.

Definition at line 180 of file ConnectionLine.cpp.

181{
182 m_lineOffset = m_moveStartOffset + position.m_y - m_moveStartPtY;
183 UpdatePoints();
184}

◆ RemoveParent()

void ConnectionLine::RemoveParent ( Element parent)
virtual

Remove a parent.

Parameters
parentParent to be removed.

Reimplemented from Element.

Definition at line 213 of file ConnectionLine.cpp.

214{
215 for (auto it = m_parentList.begin(); it != m_parentList.end(); ++it) {
216 Element* element = *it;
217 if (element == parent) m_parentList.erase(it--);
218 }
219}
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition Element.h:112

◆ SetOffset()

virtual void ConnectionLine::SetOffset ( double  offset)
inlinevirtual

Definition at line 51 of file ConnectionLine.h.

51{ m_lineOffset = offset; }

◆ SetParentLine()

bool ConnectionLine::SetParentLine ( ConnectionLine parent)
virtual

Definition at line 193 of file ConnectionLine.cpp.

194{
195 if (m_nodeList[0]->GetNodeType() != Node::NodeType::NODE_IN) return false;
196 if (!parent) return false;
197
198 m_type = ConnectionLineType::ELEMENT_LINE;
199 m_parentLine = parent;
200 return true;
201}

◆ SetTemporarySecondPoint()

virtual void ConnectionLine::SetTemporarySecondPoint ( wxPoint2DDouble  point)
inlinevirtual

Definition at line 48 of file ConnectionLine.h.

48{ m_tmpSndPt = point; }

◆ SetType()

virtual void ConnectionLine::SetType ( ConnectionLineType  newType)
inlinevirtual

Definition at line 53 of file ConnectionLine.h.

53{ m_type = newType; }

◆ SetValue()

virtual void ConnectionLine::SetValue ( double  value)
inlinevirtual

Definition at line 60 of file ConnectionLine.h.

60{ m_value = value; }

◆ StartMove()

void ConnectionLine::StartMove ( wxPoint2DDouble  position)
virtual

Update the element attributes related to the movement.

Parameters
positionStart move position.

Reimplemented from ControlElement.

Definition at line 186 of file ConnectionLine.cpp.

187{
188 m_moveStartPtY = position.m_y;
189 m_moveStartOffset = m_lineOffset;
190}

◆ UpdatePoints()

void ConnectionLine::UpdatePoints ( )
virtual

Definition at line 89 of file ConnectionLine.cpp.

90{
91 if (m_type == ConnectionLineType::ELEMENT_ELEMENT) {
92 bool hasOneNode = true;
93 wxPoint2DDouble pt1 = m_nodeList[0]->GetPosition();
94 wxPoint2DDouble pt2;
95 if (m_nodeList.size() == 1)
96 pt2 = m_tmpSndPt;
97 else {
98 pt2 = m_nodeList[1]->GetPosition();
99 hasOneNode = false;
100 }
101 wxPoint2DDouble midPt = (pt1 + pt2) / 2.0 + wxPoint2DDouble(0.0, m_lineOffset);
102
103 m_pointList[0] = pt1;
104 if (m_nodeList[0]->GetAngle() == 0.0)
105 m_pointList[1] = m_pointList[0] + wxPoint2DDouble(-10, 0);
106 else if (m_nodeList[0]->GetAngle() == 90.0)
107 m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, -10);
108 else if (m_nodeList[0]->GetAngle() == 180.0)
109 m_pointList[1] = m_pointList[0] + wxPoint2DDouble(10, 0);
110 else if (m_nodeList[0]->GetAngle() == 270.0)
111 m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, 10);
112
113 m_pointList[2] = m_pointList[1] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[1].m_y);
114
115 m_pointList[5] = pt2;
116 if (hasOneNode)
117 m_pointList[4] = pt2;
118 else {
119 if (m_nodeList[1]->GetAngle() == 0.0)
120 m_pointList[4] = m_pointList[5] + wxPoint2DDouble(-10, 0);
121 else if (m_nodeList[1]->GetAngle() == 90.0)
122 m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, -10);
123 else if (m_nodeList[1]->GetAngle() == 180.0)
124 m_pointList[4] = m_pointList[5] + wxPoint2DDouble(10, 0);
125 else if (m_nodeList[1]->GetAngle() == 270.0)
126 m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, 10);
127 }
128
129 m_pointList[3] = m_pointList[4] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[4].m_y);
130 }
131 else if (m_type == ConnectionLineType::ELEMENT_LINE) {
132 wxPoint2DDouble pt1 = m_nodeList[0]->GetPosition();
133 wxPoint2DDouble pt2 = m_parentLine->GetMidPoint();
134 wxPoint2DDouble midPt = (pt1 + pt2) / 2.0 + wxPoint2DDouble(0.0, m_lineOffset);
135
136 m_pointList[0] = pt1;
137 if (m_nodeList[0]->GetAngle() == 0.0)
138 m_pointList[1] = m_pointList[0] + wxPoint2DDouble(-10, 0);
139 else if (m_nodeList[0]->GetAngle() == 90.0)
140 m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, -10);
141 else if (m_nodeList[0]->GetAngle() == 180.0)
142 m_pointList[1] = m_pointList[0] + wxPoint2DDouble(10, 0);
143 else if (m_nodeList[0]->GetAngle() == 270.0)
144 m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, 10);
145
146 m_pointList[2] = m_pointList[1] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[1].m_y);
147
148 m_pointList[5] = pt2;
149 if (m_pointList[2].m_y > pt2.m_y) {
150 m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, 10);
151 }
152 else {
153 m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, -10);
154 }
155
156 m_pointList[3] = m_pointList[4] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[4].m_y);
157 }
158 for (auto it = m_childList.begin(), itEnd = m_childList.end(); it != itEnd; ++it) {
159 ConnectionLine* child = static_cast<ConnectionLine*>(*it);
160 child->UpdatePoints();
161 }
162}
double GetAngle() const
Get the element angle.
Definition Element.h:211

Member Data Documentation

◆ m_lineOffset

double ConnectionLine::m_lineOffset = 0.0
protected

Definition at line 64 of file ConnectionLine.h.

◆ m_moveStartOffset

double ConnectionLine::m_moveStartOffset = 0.0
protected

Definition at line 66 of file ConnectionLine.h.

◆ m_moveStartPtY

double ConnectionLine::m_moveStartPtY = 0.0
protected

Definition at line 65 of file ConnectionLine.h.

◆ m_parentLine

ConnectionLine* ConnectionLine::m_parentLine = nullptr
protected

Definition at line 70 of file ConnectionLine.h.

◆ m_tmpSndPt

wxPoint2DDouble ConnectionLine::m_tmpSndPt
protected

Definition at line 67 of file ConnectionLine.h.

◆ m_type

ConnectionLineType ConnectionLine::m_type = ConnectionLineType::ELEMENT_ELEMENT
protected

Definition at line 69 of file ConnectionLine.h.

◆ m_value

double ConnectionLine::m_value = 0.0
protected

Definition at line 72 of file ConnectionLine.h.


The documentation for this class was generated from the following files: