|
| | GLViewer_Context (GLViewer_Viewer2d *) |
| | A constructor. More...
|
| |
| | ~GLViewer_Context () |
| | A desructor. More...
|
| |
| void | setUpdateAll (bool on) |
| | A function installing update flag in highlighting technology. More...
|
| |
| bool | isUpdateAll () const |
| | Returns update flag in highlighting technology. More...
|
| |
| int | MoveTo (int x, int y, bool byCircle=false) |
| | Main interactive method. Trace mouse in viewer window. More...
|
| |
| int | Select (bool Append=false, bool byCircle=false) |
| |
| int | SelectByRect (const QRect &theRect, bool Append=false) |
| |
| void | SetHighlightColor (Quantity_NameOfColor aCol) |
| | A function installing highlight color for all presentation (does not work) More...
|
| |
| void | SetSelectionColor (Quantity_NameOfColor aCol) |
| | A function installing select color for all presentation (does not work) More...
|
| |
| Quantity_NameOfColor | HighlightColor () |
| | Returns highlight color. More...
|
| |
| Quantity_NameOfColor | SelectionColor () |
| | Returns select color. More...
|
| |
| int | NbSelected () |
| | Returns number of objects in current selection. More...
|
| |
| void | InitSelected () |
| | A function set iterator of selected objects on first object. More...
|
| |
| bool | MoreSelected () |
| | Retuns true if iterator of selected objects is not set on last object. More...
|
| |
| bool | NextSelected () |
| | Increment of iterator of selected objects. More...
|
| |
| GLViewer_Object * | SelectedObject () |
| | Returns object corresponding the current iterator of selected objects. More...
|
| |
| bool | isSelected (GLViewer_Object *theObject) |
| | Returns true if theObject is selected. More...
|
| |
| int | insertObject (GLViewer_Object *theObject, bool display=false, bool isActive=true) |
| | Insert new object in context. More...
|
| |
| bool | replaceObject (GLViewer_Object *oldObject, GLViewer_Object *newObject) |
| | Replacing objects in context. More...
|
| |
| void | updateScales (GLfloat theX, GLfloat theY) |
| | A function updating scales of all objects in context. More...
|
| |
| void | setTolerance (int tol) |
| | A function installing tolerance in window pixels for highlghting and selection methods. More...
|
| |
| const ObjList & | getObjects (bool isActive=true) |
| | Returns list of context objects. More...
|
| |
| GLViewer_Object * | getFirstObject () |
| | Returns first active object. More...
|
| |
| void | clearHighlighted (bool updateViewer) |
| | A function clear highlighted object information. More...
|
| |
| void | clearSelected (bool updateViewer) |
| | A function clear selection object information. More...
|
| |
| void | setSelected (GLViewer_Object *theObject, bool updateViewer) |
| | A function make theObject as selected object and update viewer if updateViewer = true. More...
|
| |
| void | remSelected (GLViewer_Object *theObject, bool updateViewer) |
| | A function make theObject as unselected object and update viewer if updateViewer = true. More...
|
| |
| GLViewer_Object * | getCurrentObject () |
| | Returns highlighted object. More...
|
| |
| bool | currentObjectIsChanged () |
| | Returns true if after last MoveTo method calling highlight object is changed. More...
|
| |
| void | eraseObject (GLViewer_Object *theObject, bool updateViewer=true) |
| | A function installing to theObject invisible status and update viewer if updateViewer = true. More...
|
| |
| void | deleteObject (GLViewer_Object *theObject, bool updateViewer=true) |
| | A function remove theObject from context and update viewer if updateViewer = true. More...
|
| |
| bool | setActive (GLViewer_Object *theObject) |
| | A function installing to theObject active status. More...
|
| |
| bool | setInactive (GLViewer_Object *theObject) |
| | A function installing to theObject inactive status. More...
|
| |
Class for manage of presentations in GLViewer
| int GLViewer_Context::MoveTo |
( |
int |
xi, |
|
|
int |
yi, |
|
|
bool |
byCircle = false |
|
) |
| |
- Parameters
-
| x | - X coord of mouse cursor |
| y | - Y coord of mouse cursor byCircle - true if needs round sensitive area around mouse cursor, else rectangle *function search object rectangle which intersect with sensitive area and call object highlight method |
Hiilights objects under cursor
- Parameters
-
| x | - X coord of mouse cursor |
| y | - Y coord of mouse cursor |
| byCircle | - true if needs round sensitive area around mouse cursor, else rectangle function search object rectangle which intersect with sensitive area and call object highlight method |
References GLViewer_Viewer2d::activateDrawers(), GLViewer_Rect::contains(), GLViewer_Object::highlight(), myActiveObjects, myGLViewer2d, myHFlag, myLastPicked, myLastPickedChanged, myTolerance, myUpdateAll, myXhigh, myYhigh, GLViewer_Viewer2d::transPoint(), GLViewer_Object::unhighlight(), and GLViewer_Viewer2d::updateAll().
| int GLViewer_Context::Select |
( |
bool |
Append = false, |
|
|
bool |
byCircle = false |
|
) |
| |
A function selecting already highlighting object by calling object method select
- Parameters
-
| Append | - true if new selection will be append to existing selection, false - another |
| byCircle | - true if needs round selection area in complex object |
Selects already highlighting object by calling object method select
- Parameters
-
| Append | - true if new selection will be append to existing selection, false - another |
| byCircle | - true if needs round selection area in complex object |
References GLViewer_Viewer2d::activateDrawer(), GLViewer_Viewer2d::activateDrawers(), GLViewer_Rect::contains(), GLViewer_Viewer::getActiveView(), GLViewer_ViewPort2d::getScale(), GLViewer_ViewFrame::getViewPort(), GLViewer_Object::isSelected(), myActiveObjects, myGLViewer2d, myHFlag, myLastPicked, mySelectedObjects, mySFlag, myTolerance, myUpdateAll, myXhigh, myYhigh, GLViewer_Object::select(), SS_GlobalChanged, SS_Invalid, SS_LocalChanged, SS_NoChanged, GLViewer_Object::unselect(), and GLViewer_Viewer2d::updateAll().
| int GLViewer_Context::SelectByRect |
( |
const QRect & |
theRect, |
|
|
bool |
Append = false |
|
) |
| |
A function selecting objects on scene by rectangle
- Parameters
-
| theRect | - rectangle of selection |
| Append | - true if new selection will be append to existing selection, false - another *function search object rectangle which intersect with theRect and call object select method |
Selects objects on scene by rectangle
- Parameters
-
| theRect | - rectangle of selection |
| Append | - true if new selection will be append to existing selection, false - another function search object rectangle which intersect with theRect and call object select method |
References GLViewer_Viewer2d::activateDrawers(), GLViewer_Viewer::getActiveView(), GLViewer_Viewer2d::getGLVRect(), GLViewer_Viewer2d::getQRect(), GLViewer_ViewPort2d::getScale(), GLViewer_ViewFrame::getViewPort(), myActiveObjects, myGLViewer2d, mySelectedObjects, mySFlag, myTolerance, myUpdateAll, myXhigh, myYhigh, SS_GlobalChanged, SS_Invalid, SS_NoChanged, and GLViewer_Viewer2d::updateAll().