The HBaseOperator class serves as a base for classes which handle user input and operate on the scene. More...
#include <HBaseOperator.h>
Public Member Functions | |
int | Capture () |
Returns whether we are currently in mouse capture mode. See this class' constructor for a more detailed description of what this means. This method has been deprecated. | |
virtual HBaseOperator * | Clone () |
HPoint const | GetFirstPoint () |
Returns the initial selection point. | |
virtual const char * | GetName () |
HPoint const | GetNewPoint () |
Returns the current selection point. | |
HBaseView * | GetView () |
Returns a pointer to the view that this operator is associated with. | |
HBaseOperator (HBaseView *view, int DoRepeat=0, int DoCapture=1) | |
virtual int | OnKeyDown (HEventInfo &hevent) |
virtual int | OnKeyUp (HEventInfo &hevent) |
virtual int | OnLButtonDblClk (HEventInfo &hevent) |
virtual int | OnLButtonDown (HEventInfo &hevent) |
virtual int | OnLButtonDownAndMove (HEventInfo &hevent) |
virtual int | OnLButtonUp (HEventInfo &hevent) |
virtual int | OnLRButtonDownAndMove (HEventInfo &hevent) |
virtual int | OnMButtonDblClk (HEventInfo &hevent) |
virtual int | OnMButtonDown (HEventInfo &hevent) |
virtual int | OnMButtonDownAndMove (HEventInfo &hevent) |
virtual int | OnMButtonUp (HEventInfo &hevent) |
virtual int | OnMouseMove (HEventInfo &hevent) |
virtual int | OnMouseWheel (HEventInfo &hevent) |
virtual int | OnNoButtonDownAndMove (HEventInfo &hevent) |
virtual int | OnRButtonDblClk (HEventInfo &hevent) |
virtual int | OnRButtonDown (HEventInfo &hevent) |
virtual int | OnRButtonDownAndMove (HEventInfo &hevent) |
virtual int | OnRButtonUp (HEventInfo &hevent) |
virtual int | OnTimer (HEventInfo &hevent) |
virtual int | OnTouchesDown (HEventInfo &hevent) |
virtual int | OnTouchesMove (HEventInfo &hevent) |
virtual int | OnTouchesUp (HEventInfo &hevent) |
virtual bool | OperatorStarted () |
Operator has been started if true, and has not been started if false. | |
int | Repeat () |
Returns whether the operation is repeatable. This method has been deprecated. | |
void | SetFirstPoint (HPoint const &new_point) |
Sets the initial selection point. | |
void | SetMapTouchesToMouseEvents (bool val) |
Touch Events are mapped to mouse events if true, and are not if false. | |
void | SetNewPoint (HPoint const &new_point) |
Sets the current selection point. | |
void | SetOperatorStarted (bool val) |
Operator has been started if true, and has not been started if false. | |
void | SetView (HBaseView *new_view) |
Sets the view that this operator is associated with. | |
Protected Member Functions | |
bool | IsSpecialKey (HC_KEY key) |
Protected Attributes | |
bool | m_bMapTouchesToMouseEvents |
Indicates if touch events are mapped to mouse events. | |
bool | m_bOpStarted |
Indicates whether the operator has already 'started'. More... | |
int | m_doCapture |
Integer indicating whether to capture mouse on button down and release on button up. This parameter has been deprecated. | |
int | m_doRepeat |
Integer indicating if the operator is repeatable . This parameter has been deprecated. | |
HPoint | m_ptFirst |
Initial selection point. | |
HPoint | m_ptNew |
Current selection point. | |
HBaseView * | m_pView |
The HOOPS view corresponding to this operator. | |
HCutGeometryVisibility | m_TempCutGeometryVisibility |
stores original cut geometry visibility | |
HShadowMode | m_TempShadowMode |
stores original shadow mode | |
Detailed Description
The HBaseOperator class serves as a base for classes which handle user input and operate on the scene.
HBaseOperator provides support for mapping user input to interaction logic. A custom operator object implements the virtual functions that are provided in order to handle mouse button and keypress events as required. For example, if the application needed to orbit the camera by clicking the mouse button down, dragging the mouse, and then releasing the mouse button, the derived operator would implement the OnLButtonDown, OnLButtonDownAndMove, and OnLButtonUp methods to provide logic to orbit the camera.
The HOOPS/GUI module provides support for mapping platform-specific UI events to the corresponding method of the current operator associated with the view. Alternately, the application could manually map a platform-specific UI event to the matching method in the current operator without relying on the HOOPS/GUI toolkit.
Constructor & Destructor Documentation
◆ HBaseOperator()
HBaseOperator::HBaseOperator | ( | HBaseView * | view, |
int | DoRepeat = 0 , |
||
int | DoCapture = 1 |
||
) |
Constructs an HBaseOperator object
- Parameters
-
view A pointer to an HBaseView object, DoRepeat An integer denoting whether this is a repeatable operator. This parameter has been deprecated. DoCapture An integer denoting whether the mouse state should be captured, which means that all mouse events should be received after a mousedown, even if it leaves the window. This parameter has been deprecated.
Member Function Documentation
◆ Clone()
|
virtual |
Creates a new operator which is associated with the same view as the current operator. The user is responsible for deleting the newly created operator.
- Returns
- A pointer to an HBaseOperator object
Reimplemented in HOpObjectClash, HOpCameraManipulate, HOpCameraWalk, HOpConstructCylinder, HOpConstructCone, HOpConstructCuboid, HOpMoveHandle, HOpCameraOrbit, HOpCameraOrbitTurntable, HOpConstructSphere, HOpMarkupAnnotate, HOpObjectTranslate, HOpCameraZoom, HOpCameraPan, HOpCameraManipulateTouch, HOpObjectRotate, HOpCameraRelativeOrbit, HOpCameraZoomTouch, HOpMarkupMeasure, HOpConstructCircle, HOpCameraPanTouch, HOpCameraRollTouch, HOpCameraZoomBox, HOpCreateBoolean, HOpSelectArea, HOpCreateCuttingPlane, HOpCreateNurbs3D, HOpCreateCuboid, HOpCreateCylinder, HOpCreateCone, HOpMarkupCircle, HOpSelectAperture, HOpCreateSphere, HOpConstructNurbsCurve, HOpCreateCircle, HOpCreatePolyline, HOpObjectAnnotate, HOpMarkupFreehand, HOpConstructRectangle, HOpNavCube, HOpSelectPolygon, HOpSelectPolyline, HOpConstructPolyline, HOpCreateRectangle, HOpMarkupFreehand3D, HOpSelectPolygonOOC< SelectionSet >, HOpSelectAreaOOC< SelectionSet >, HOpCreateNurbsCurve, HOpMarkupRectangle, HOpFramedAnnotate, MyFreehandMarkupOp, and MyPolygonMarkupOp.
◆ GetName()
|
virtual |
- Returns
- A character pointer denoting the name of operator.
Reimplemented in HSubwindow, HSubwindow2, HOpObjectClash, HOpCreateNurbs3D, HOpConstructCylinder, HOpConstructCone, HOpCreatePolyline, HOpConstructNurbsCurve, HOpMarkupFreehand, HOpConstructPolyline, HOpConstructSphere, HOpCreateBoolean, HOpMarkupFreehand3D, HOpCreateNurbsCurve, HOpCameraRelativeOrbit, HOpCameraWalk, HOpSelectPolygon, HOpSelectPolyline, HOpCameraManipulate, HOpConstructCuboid, HOpObjectAnnotate, HOpSelectAperture, HOpConstructRectangle, HOpObjectTranslate, HOpCameraManipulateTouch, HOpConstructCircle, HOpCreateCylinder, HOpCameraOrbit, HOpCameraOrbitTurntable, HOpCreateCone, HOpCreateRectangle, HOpMarkupAnnotate, HOpCreateCuboid, HOpMoveHandle, HOpSelectArea, HOpCreateSphere, HOpObjectRotate, HOpCameraZoom, HOpMarkupCircle, HOpMarkupPostIt, HOpSelectPolygonOOC< SelectionSet >, HOpCameraPan, HOpCameraZoomBox, HOpCreateCircle, HOpCreateCuttingPlane, HOpSelectAreaOOC< SelectionSet >, HOpMarkupMeasure, HOpNavCube, HOpCameraZoomTouch, HOpCameraPanTouch, HOpCameraRollTouch, HOpMarkupRectangle, HOpFramedAnnotate, MyFreehandMarkupOp, and MyPolygonMarkupOp.
◆ IsSpecialKey()
|
protected |
This method has been deprecated.
- Returns
- True if the given key is special and requires that we instead grab its owner
◆ OnKeyDown()
|
virtual |
The derived operator should overload this function to intercept and handle the case where a keyboard key has been pressed down. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpObjectClash, HOpCameraWalk, HOpObjectAnnotate, HOpMarkupAnnotate, HOpMarkupMeasure, and HOpFramedAnnotate.
◆ OnKeyUp()
|
virtual |
The derived operator should overload this function to intercept and handle the case where a keyboard key has been released. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
◆ OnLButtonDblClk()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the left mouse button has been double-clicked. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpConstructNurbsCurve, HOpConstructPolyline, HOpObjectTranslate, HOpObjectRotate, HOpSelectPolygonOOC< SelectionSet >, HOpCreatePolyline, HOpSelectPolygon, HOpSelectPolyline, HOpCreateNurbsCurve, and HOpCameraZoomBox.
◆ OnLButtonDown()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the left mouse button has been pressed down. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HTexturePickerWindow, HSubwindow, HImagePanel, HSubwindow2, HOpObjectClash, HOpObjectAnnotate, HOpConstructNurbsCurve, HOpConstructPolyline, HOpMarkupFreehand3D, HOpConstructCylinder, HOpMarkupFreehand, HOpConstructCone, HOpCreateNurbs3D, HOpSelectPolygon, HOpConstructSphere, HOpCreateBoolean, HOpConstructRectangle, HOpSelectPolygonOOC< SelectionSet >, HOpCameraRelativeOrbit, HOpConstructCuboid, HOpCameraManipulate, HOpCameraWalk, HOpSelectAreaOOC< SelectionSet >, HOpSelectAperture, HOpCreateCylinder, HOpCameraOrbit, HOpCreateCone, HOpCreateCuboid, HOpObjectTranslate, HOpConstructCircle, HOpSelectArea, HOpCameraOrbitTurntable, HOpMarkupAnnotate, HOpMoveHandle, HOpObjectRotate, HOpCameraZoom, HOpCreateCuttingPlane, HOpMarkupPostIt, HOpCameraPan, HOpNavCube, HOpMarkupMeasure, HOpNetwork, HTCObjectRotate, MyFreehandMarkupOp, MyPolygonMarkupOp, and HOpFramedAnnotate.
◆ OnLButtonDownAndMove()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the left mouse button is
pressed down and the mouse has moved. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HTexturePickerWindow, HSubwindow, HSubwindow2, HImagePanel, HOpObjectClash, HOpConstructCylinder, HOpConstructCone, HOpCreateNurbs3D, HOpConstructCuboid, HOpConstructSphere, HOpConstructRectangle, HOpCameraManipulate, HOpCameraRelativeOrbit, HOpMarkupFreehand3D, HOpMarkupFreehand, HOpCameraWalk, HOpCameraOrbit, HOpConstructCircle, HOpObjectTranslate, HOpCameraOrbitTurntable, HOpCameraZoom, HOpMarkupAnnotate, HOpMoveHandle, HOpObjectRotate, HOpCameraPan, HOpMarkupMeasure, HOpNetwork, MyFreehandMarkupOp, MyPolygonMarkupOp, and HOpFramedAnnotate.
◆ OnLButtonUp()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the left mouse button has been released. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HTexturePickerWindow, HSubwindow, HImagePanel, HSubwindow2, HOpObjectClash, HOpConstructCylinder, HOpConstructCone, HOpMarkupFreehand3D, HOpMarkupFreehand, HOpConstructCuboid, HOpConstructSphere, HOpCreateNurbs3D, HOpConstructRectangle, HOpCameraManipulate, HOpCameraWalk, HOpMarkupAnnotate, HOpMoveHandle, HOpCameraOrbit, HOpSelectAreaOOC< SelectionSet >, HOpConstructCircle, HOpObjectTranslate, HOpCameraOrbitTurntable, HOpCameraZoom, HOpObjectRotate, HOpCameraPan, HOpSelectArea, HOpMarkupMeasure, HOpCreateRectangle, HOpCreateCuttingPlane, HOpMarkupCircle, HOpCreateSphere, HOpCreateCircle, HOpNetwork, HOpCameraZoomBox, HOpMarkupRectangle, MyFreehandMarkupOp, MyPolygonMarkupOp, and HOpFramedAnnotate.
◆ OnLRButtonDownAndMove()
|
virtual |
The derived operator should overload this function to intercept and handle the case where both the left and right mouse button are pressed down and the mouse has moved. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
◆ OnMButtonDblClk()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the middle mouse button has been double-clicked. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
◆ OnMButtonDown()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the middle mouse button has been pressed down. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpCameraWalk, HOpConstructNurbsCurve, and HOpCameraManipulate.
◆ OnMButtonDownAndMove()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the middle mouse button is pressed down and the mouse has moved. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpCameraWalk, and HOpCameraManipulate.
◆ OnMButtonUp()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the middle mouse button has been released. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpCameraWalk, and HOpCameraManipulate.
◆ OnMouseMove()
|
virtual |
This method automatically checks the state of the left, middle and right mouse buttons (by looking at the HEventInfo object) and calls out to the appropriate 'combination' event, such as OnLButtonDownAndMove, OnNoButtonDownAndMove, etc...
This function will be automatically called from the HOOPS/GUI toolkit when a mouse move occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
The derived operator may overload this function to intercept and handle a mouse move event; however, it should be noted that the automatic dispatching of combination events would then no longer occur.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
◆ OnMouseWheel()
|
virtual |
The derived operator should overload this function to intercept and handle mouse wheel movement. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpCameraWalk, and HOpCameraOrbitTurntable.
◆ OnNoButtonDownAndMove()
|
virtual |
The derived operator should overload this function to intercept and handle the case where no mouse buttons are
pressed down and the mouse has moved. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpObjectAnnotate, HOpConstructCylinder, HOpConstructCone, HOpConstructNurbsCurve, HOpConstructPolyline, HOpConstructCuboid, and HOpMoveHandle.
◆ OnRButtonDblClk()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the right mouse button has been double-clicked. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
◆ OnRButtonDown()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the right mouse button has been pressed down. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpCameraManipulate, HOpMarkupMeasure, HOpMarkupAnnotate, and HOpNetwork.
◆ OnRButtonDownAndMove()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the right mouse button is
pressed down and the mouse has moved. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpCameraManipulate, and HOpNetwork.
◆ OnRButtonUp()
|
virtual |
The derived operator should overload this function to intercept and handle the case where the right mouse button has been released. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpCameraManipulate, HOpConstructRectangle, and HOpNetwork.
◆ OnTimer()
|
virtual |
The derived operator should overload this function to intercept and handle the case where a timer event has occurred. It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
◆ OnTouchesDown()
|
virtual |
The derived operator should overload this function to intercept and handle the case where a touch down event has occured It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpCameraManipulateTouch, HOpCameraZoomTouch, HOpCameraPanTouch, and HOpCameraRollTouch.
◆ OnTouchesMove()
|
virtual |
The derived operator should overload this function to intercept and handle the case where a touch move event has occured It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpCameraManipulateTouch, HOpCameraZoomTouch, HOpCameraPanTouch, and HOpCameraRollTouch.
◆ OnTouchesUp()
|
virtual |
The derived operator should overload this function to intercept and handle the case where a touch up event has occured It will be automatically called from the HOOPS/GUI toolkit when such an event occurs, and should be manually called by platform-specific UI code if HOOPS/GUI is not being used.
- Parameters
-
hevent An HEventInfo object containing information about the current event
- Returns
- An HOperatorReturn indicating the status of the event.
Reimplemented in HOpCameraManipulateTouch, HOpCameraZoomTouch, HOpCameraPanTouch, and HOpCameraRollTouch.
Member Data Documentation
◆ m_bOpStarted
|
protected |
Indicates whether the operator has already 'started'.
Indicates whether the operator has been started; this should be set to true as soon as any of the event handling methods have been called
The documentation for this class was generated from the following file: