|
| RateLimiter (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 bool | ShowForm (wxWindow *parent, Element *element) |
| Show element data form.
|
|
virtual void | Rotate (bool clockwise=true) |
| Rotate the element.
|
|
virtual void | UpdatePoints () |
|
double | GetUpLimit () const |
|
double | GetLowLimit () const |
|
void | SetUpLimit (double upLimit) |
|
void | SetLowLimit (double lowLimit) |
|
virtual bool | Solve (double *input, double timeStep) |
| Calculate the rate and limits it if exceeds.
|
|
virtual rapidxml::xml_node * | SaveElement (rapidxml::xml_document<> &doc, rapidxml::xml_node<> *elementListNode) |
|
virtual bool | OpenElement (rapidxml::xml_node<> *elementNode) |
|
virtual Element * | GetCopy () |
| Get a the element copy.
|
|
| ControlElement (int id) |
|
virtual void | StartMove (wxPoint2DDouble position) |
| Update the element attributes related to the movement.
|
|
virtual void | Move (wxPoint2DDouble position) |
| Move the element other position.
|
|
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 | Initialize () |
|
virtual double | GetOutput () const |
|
virtual void | SetOutput (double output) |
|
| 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 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 | RemoveParent (Element *parent) |
| Remove a parent.
|
|
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 | DrawDCCircle (wxPoint2DDouble position, double radius, int numSegments, wxGraphicsContext *gc) const |
| Draw a circle.
|
|
virtual void | DrawDCArc (wxPoint2DDouble position, double radius, double initAngle, double finalAngle, int numSegments, wxGraphicsContext *gc) const |
|
virtual void | DrawDCTriangle (std::vector< wxPoint2DDouble > points, wxGraphicsContext *gc) const |
| Draw rectangle.
|
|
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 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 double | PointToLineDistance (wxPoint2DDouble point, int *segmentNumber=nullptr) const |
| Calculate the distance between a line (formed by point list) and a point.
|
|
void | SaveCADProperties (rapidxml::xml_document<> &doc, rapidxml::xml_node<> *elementNode) |
|
bool | OpenCADProperties (rapidxml::xml_node<> *elementNode) |
|