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 HBaseOperatorClone ()
 
HPoint const GetFirstPoint ()
 Returns the initial selection point.
 
virtual const char * GetName ()
 
HPoint const GetNewPoint ()
 Returns the current selection point.
 
HBaseViewGetView ()
 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.
 
HBaseViewm_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
viewA pointer to an HBaseView object,
DoRepeatAn integer denoting whether this is a repeatable operator. This parameter has been deprecated.
DoCaptureAn 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()

◆ GetName()

◆ IsSpecialKey()

bool HBaseOperator::IsSpecialKey ( HC_KEY  key)
protected

This method has been deprecated.

Returns
True if the given key is special and requires that we instead grab its owner

◆ OnKeyDown()

virtual int HBaseOperator::OnKeyDown ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnKeyUp ( HEventInfo hevent)
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
heventAn HEventInfo object containing information about the current event
Returns
An HOperatorReturn indicating the status of the event.

◆ OnLButtonDblClk()

virtual int HBaseOperator::OnLButtonDblClk ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnLButtonDown ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnLButtonDownAndMove ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnLButtonUp ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnLRButtonDownAndMove ( HEventInfo hevent)
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
heventAn HEventInfo object containing information about the current event
Returns
An HOperatorReturn indicating the status of the event.

◆ OnMButtonDblClk()

virtual int HBaseOperator::OnMButtonDblClk ( HEventInfo hevent)
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
heventAn HEventInfo object containing information about the current event
Returns
An HOperatorReturn indicating the status of the event.

◆ OnMButtonDown()

virtual int HBaseOperator::OnMButtonDown ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnMButtonDownAndMove ( HEventInfo hevent)
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
heventAn HEventInfo object containing information about the current event
Returns
An HOperatorReturn indicating the status of the event.

Reimplemented in HOpCameraWalk, and HOpCameraManipulate.

◆ OnMButtonUp()

virtual int HBaseOperator::OnMButtonUp ( HEventInfo hevent)
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
heventAn HEventInfo object containing information about the current event
Returns
An HOperatorReturn indicating the status of the event.

Reimplemented in HOpCameraWalk, and HOpCameraManipulate.

◆ OnMouseMove()

virtual int HBaseOperator::OnMouseMove ( HEventInfo hevent)
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
heventAn HEventInfo object containing information about the current event
Returns
An HOperatorReturn indicating the status of the event.

◆ OnMouseWheel()

virtual int HBaseOperator::OnMouseWheel ( HEventInfo hevent)
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
heventAn HEventInfo object containing information about the current event
Returns
An HOperatorReturn indicating the status of the event.

Reimplemented in HOpCameraWalk, and HOpCameraOrbitTurntable.

◆ OnNoButtonDownAndMove()

virtual int HBaseOperator::OnNoButtonDownAndMove ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnRButtonDblClk ( HEventInfo hevent)
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
heventAn HEventInfo object containing information about the current event
Returns
An HOperatorReturn indicating the status of the event.

◆ OnRButtonDown()

virtual int HBaseOperator::OnRButtonDown ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnRButtonDownAndMove ( HEventInfo hevent)
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
heventAn HEventInfo object containing information about the current event
Returns
An HOperatorReturn indicating the status of the event.

Reimplemented in HOpCameraManipulate, and HOpNetwork.

◆ OnRButtonUp()

virtual int HBaseOperator::OnRButtonUp ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnTimer ( HEventInfo hevent)
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
heventAn HEventInfo object containing information about the current event
Returns
An HOperatorReturn indicating the status of the event.

◆ OnTouchesDown()

virtual int HBaseOperator::OnTouchesDown ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnTouchesMove ( HEventInfo hevent)
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
heventAn 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 int HBaseOperator::OnTouchesUp ( HEventInfo hevent)
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
heventAn 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

bool HBaseOperator::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: