Open CASCADE Technology  7.4.0
Public Member Functions | Static Public Member Functions
ViewerTest_EventManager Class Reference

used to manage mouse event (move,select,shiftselect) By default the events are transmitted to interactive context. More...

#include <ViewerTest_EventManager.hxx>

Inheritance diagram for ViewerTest_EventManager:
Inheritance graph
[legend]

Public Member Functions

 ViewerTest_EventManager (const Handle< V3d_View > &aView, const Handle< AIS_InteractiveContext > &aCtx)
 Main constructor. More...
 
virtual ~ViewerTest_EventManager ()
 Destructor. More...
 
const Handle< AIS_InteractiveContext > & Context () const
 Return interactive context. More...
 
Standard_Boolean ToPickPoint () const
 Returns TRUE if picking point mode has been enabled (for VPick command). More...
 
void StartPickPoint (const char *theArgX, const char *theArgY, const char *theArgZ)
 Start picking point for VPick command. More...
 
virtual bool UpdateMouseButtons (const Graphic3d_Vec2i &thePoint, Aspect_VKeyMouse theButtons, Aspect_VKeyFlags theModifiers, bool theIsEmulated) override
 Handle mouse button press/release event. More...
 
virtual void KeyUp (Aspect_VKey theKey, double theTime) override
 Release key. More...
 
virtual void ProcessExpose ()
 Redraw the View on an Expose Event. More...
 
virtual void ProcessConfigure ()
 Resize View. More...
 
void ProcessKeyPress (Aspect_VKey theKey)
 Handle KeyPress event. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 
- Public Member Functions inherited from AIS_ViewController
 AIS_ViewController ()
 Empty constructor. More...
 
const AIS_ViewInputBufferInputBuffer (AIS_ViewInputBufferType theType) const
 Return input buffer. More...
 
AIS_ViewInputBufferChangeInputBuffer (AIS_ViewInputBufferType theType)
 Return input buffer. More...
 
const Handle< AIS_AnimationCamera > & ViewAnimation () const
 Return view animation; empty (but not NULL) animation by default. More...
 
void SetViewAnimation (const Handle< AIS_AnimationCamera > &theAnimation)
 Set view animation to be handled within handleViewRedraw(). More...
 
void AbortViewAnimation ()
 Interrupt active view animation. More...
 
AIS_RotationMode RotationMode () const
 Return camera rotation mode, AIS_RotationMode_BndBoxActive by default. More...
 
void SetRotationMode (AIS_RotationMode theMode)
 Set camera rotation mode. More...
 
AIS_NavigationMode NavigationMode () const
 Return camera navigation mode; AIS_NavigationMode_Orbit by default. More...
 
void SetNavigationMode (AIS_NavigationMode theMode)
 Set camera navigation mode. More...
 
float MouseAcceleration () const
 Return mouse input acceleration ratio in First Person mode; 1.0 by default. More...
 
void SetMouseAcceleration (float theRatio)
 Set mouse input acceleration ratio. More...
 
float OrbitAcceleration () const
 Return orbit rotation acceleration ratio; 1.0 by default. More...
 
void SetOrbitAcceleration (float theRatio)
 Set orbit rotation acceleration ratio. More...
 
bool ToShowPanAnchorPoint () const
 Return TRUE if panning anchor point within perspective projection should be displayed in 3D Viewer; TRUE by default. More...
 
void SetShowPanAnchorPoint (bool theToShow)
 Set if panning anchor point within perspective projection should be displayed in 3D Viewer. More...
 
bool ToShowRotateCenter () const
 Return TRUE if rotation point should be displayed in 3D Viewer; TRUE by default. More...
 
void SetShowRotateCenter (bool theToShow)
 Set if rotation point should be displayed in 3D Viewer. More...
 
bool ToLockOrbitZUp () const
 Return TRUE if camera up orientation within AIS_NavigationMode_Orbit rotation mode should be forced Z up; FALSE by default. More...
 
void SetLockOrbitZUp (bool theToForceUp)
 Set if camera up orientation within AIS_NavigationMode_Orbit rotation mode should be forced Z up. More...
 
bool ToAllowTouchZRotation () const
 Return TRUE if z-rotation via two-touches gesture is enabled; FALSE by default. More...
 
void SetAllowTouchZRotation (bool theToEnable)
 Set if z-rotation via two-touches gesture is enabled. More...
 
bool ToAllowRotation () const
 Return TRUE if camera rotation is allowed; TRUE by default. More...
 
void SetAllowRotation (bool theToEnable)
 Set if camera rotation is allowed. More...
 
bool ToAllowPanning () const
 Return TRUE if panning is allowed; TRUE by default. More...
 
void SetAllowPanning (bool theToEnable)
 Set if panning is allowed. More...
 
bool ToAllowZooming () const
 Return TRUE if zooming is allowed; TRUE by default. More...
 
void SetAllowZooming (bool theToEnable)
 Set if zooming is allowed. More...
 
bool ToAllowZFocus () const
 Return TRUE if ZFocus change is allowed; TRUE by default. More...
 
void SetAllowZFocus (bool theToEnable)
 Set if ZFocus change is allowed. More...
 
bool ToAllowHighlight () const
 Return TRUE if dynamic highlight on mouse move is allowed; TRUE by default. More...
 
void SetAllowHighlight (bool theToEnable)
 Set if dragging object is allowed. More...
 
bool ToAllowDragging () const
 Return TRUE if dragging object is allowed; TRUE by default. More...
 
void SetAllowDragging (bool theToEnable)
 Set if dynamic highlight on mouse move is allowed. More...
 
bool ToStickToRayOnZoom () const
 Return TRUE if picked point should be projected to picking ray on zooming at point; TRUE by default. More...
 
void SetStickToRayOnZoom (bool theToEnable)
 Set if picked point should be projected to picking ray on zooming at point. More...
 
bool ToStickToRayOnRotation () const
 Return TRUE if picked point should be projected to picking ray on rotating around point; TRUE by default. More...
 
void SetStickToRayOnRotation (bool theToEnable)
 Set if picked point should be projected to picking ray on rotating around point. More...
 
bool ToInvertPitch () const
 Return TRUE if pitch direction should be inverted while processing Aspect_VKey_NavLookUp/Aspect_VKey_NavLookDown; FALSE by default. More...
 
void SetInvertPitch (bool theToInvert)
 Set flag inverting pitch direction. More...
 
float WalkSpeedAbsolute () const
 Return normal walking speed, in m/s; 1.5 by default. More...
 
void SetWalkSpeedAbsolute (float theSpeed)
 Set normal walking speed, in m/s; 1.5 by default. More...
 
float WalkSpeedRelative () const
 Return walking speed relative to scene bounding box; 0.1 by default. More...
 
void SetWalkSpeedRelative (float theFactor)
 Set walking speed relative to scene bounding box. More...
 
float ThrustSpeed () const
 Return active thrust value; 0.0f by default. More...
 
void SetThrustSpeed (float theSpeed)
 Set active thrust value. More...
 
bool HasPreviousMoveTo () const
 Return TRUE if previous position of MoveTo has been defined. More...
 
const Graphic3d_Vec2iPreviousMoveTo () const
 Return previous position of MoveTo event in 3D viewer. More...
 
void ResetPreviousMoveTo ()
 Reset previous position of MoveTo. More...
 
const Aspect_VKeySetKeys () const
 Return keyboard state. More...
 
Aspect_VKeySetChangeKeys ()
 Return keyboard state. More...
 
virtual void KeyDown (Aspect_VKey theKey, double theTime, double thePressure=1.0)
 Press key. More...
 
virtual void KeyFromAxis (Aspect_VKey theNegative, Aspect_VKey thePositive, double theTime, double thePressure)
 Simulate key up/down events from axis value. More...
 
AIS_WalkDelta FetchNavigationKeys (Standard_Real theCrouchRatio, Standard_Real theRunRatio)
 Fetch active navigation actions. More...
 
const AIS_MouseGestureMapMouseGestureMap () const
 Return map defining mouse gestures. More...
 
AIS_MouseGestureMapChangeMouseGestureMap ()
 Return map defining mouse gestures. More...
 
double MouseDoubleClickInterval () const
 Return double click interval in seconds; 0.4 by default. More...
 
void SetMouseDoubleClickInterval (double theSeconds)
 Set double click interval in seconds. More...
 
virtual void SelectInViewer (const Graphic3d_Vec2i &thePnt, const bool theIsXOR=false)
 Perform selection in 3D viewer. This method is expected to be called from UI thread. More...
 
virtual void SelectInViewer (const NCollection_Sequence< Graphic3d_Vec2i > &thePnts, const bool theIsXOR=false)
 Perform selection in 3D viewer. This method is expected to be called from UI thread. More...
 
virtual void UpdateRubberBand (const Graphic3d_Vec2i &thePntFrom, const Graphic3d_Vec2i &thePntTo, const bool theIsXOR=false)
 Update rectangle selection tool. This method is expected to be called from UI thread. More...
 
virtual void UpdatePolySelection (const Graphic3d_Vec2i &thePnt, bool theToAppend)
 Update polygonal selection tool. This method is expected to be called from UI thread. More...
 
virtual bool UpdateZoom (const Aspect_ScrollDelta &theDelta)
 Update zoom event (e.g. from mouse scroll). This method is expected to be called from UI thread. More...
 
virtual bool UpdateZRotation (double theAngle)
 Update Z rotation event. More...
 
virtual bool UpdateMouseScroll (const Aspect_ScrollDelta &theDelta)
 Update mouse scroll event; redirects to UpdateZoom by default. This method is expected to be called from UI thread. More...
 
virtual bool UpdateMousePosition (const Graphic3d_Vec2i &thePoint, Aspect_VKeyMouse theButtons, Aspect_VKeyFlags theModifiers, bool theIsEmulated)
 Handle mouse cursor movement event. This method is expected to be called from UI thread. More...
 
bool PressMouseButton (const Graphic3d_Vec2i &thePoint, Aspect_VKeyMouse theButton, Aspect_VKeyFlags theModifiers, bool theIsEmulated)
 Handle mouse button press event. This method is expected to be called from UI thread. More...
 
bool ReleaseMouseButton (const Graphic3d_Vec2i &thePoint, Aspect_VKeyMouse theButton, Aspect_VKeyFlags theModifiers, bool theIsEmulated)
 Handle mouse button release event. This method is expected to be called from UI thread. More...
 
virtual bool UpdateMouseClick (const Graphic3d_Vec2i &thePoint, Aspect_VKeyMouse theButton, Aspect_VKeyFlags theModifiers, bool theIsDoubleClick)
 Handle mouse button click event (emulated by UpdateMouseButtons() while releasing single button). Note that as this method is called by UpdateMouseButtons(), it should be executed from UI thread. Default implementation redirects to SelectInViewer(). This method is expected to be called from UI thread. More...
 
Aspect_VKeyMouse PressedMouseButtons () const
 Return currently pressed mouse buttons. More...
 
Aspect_VKeyFlags LastMouseFlags () const
 Return active key modifiers passed with last mouse event. More...
 
const Graphic3d_Vec2iLastMousePosition () const
 Return last mouse position. More...
 
float TouchToleranceScale () const
 Return scale factor for adjusting tolerances for starting multi-touch gestures; 1.0 by default This scale factor is expected to be computed from touch screen resolution. More...
 
void SetTouchToleranceScale (float theTolerance)
 Set scale factor for adjusting tolerances for starting multi-touch gestures. More...
 
bool HasTouchPoints () const
 Return TRUE if touches map is not empty. More...
 
virtual void AddTouchPoint (Standard_Size theId, const Graphic3d_Vec2d &thePnt, Standard_Boolean theClearBefore=false)
 Add touch point with the given ID. This method is expected to be called from UI thread. More...
 
virtual bool RemoveTouchPoint (Standard_Size theId, Standard_Boolean theClearSelectPnts=false)
 Remove touch point with the given ID. This method is expected to be called from UI thread. More...
 
virtual void UpdateTouchPoint (Standard_Size theId, const Graphic3d_Vec2d &thePnt)
 Update touch point with the given ID. If point with specified ID was not registered before, it will be added. This method is expected to be called from UI thread. More...
 
double EventTime () const
 Return event time (e.g. current time). More...
 
virtual void ResetViewInput ()
 Reset input state (pressed keys, mouse buttons, etc.) e.g. on window focus loss. This method is expected to be called from UI thread. More...
 
virtual void UpdateViewOrientation (V3d_TypeOfOrientation theOrientation, bool theToFitAll)
 Reset view orientation. This method is expected to be called from UI thread. More...
 
virtual void FlushViewEvents (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView, Standard_Boolean theToHandle=Standard_False)
 Update buffer for rendering thread. This method is expected to be called within synchronization barrier between GUI and Rendering threads (e.g. GUI thread should be locked beforehand to avoid data races). More...
 
virtual void HandleViewEvents (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView)
 Process events within rendering thread. More...
 
virtual void OnSelectionChanged (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView)
 Callback called by handleMoveTo() on Selection in 3D Viewer. This method is expected to be called from rendering thread. More...
 
virtual void OnObjectDragged (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView, AIS_DragAction theAction)
 Callback called by handleMoveTo() on dragging object in 3D Viewer. This method is expected to be called from rendering thread. More...
 
virtual bool PickPoint (gp_Pnt &thePnt, const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView, const Graphic3d_Vec2i &theCursor, bool theToStickToPickRay)
 Pick closest point under mouse cursor. This method is expected to be called from rendering thread. More...
 
virtual gp_Pnt GravityPoint (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView)
 Compute rotation gravity center point depending on rotation mode. This method is expected to be called from rendering thread. More...
 
virtual void handleCameraActions (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView, const AIS_WalkDelta &theWalk)
 Perform camera actions. This method is expected to be called from rendering thread. More...
 
virtual void handleMoveTo (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView)
 Perform moveto/selection/dragging. This method is expected to be called from rendering thread. More...
 
bool toAskNextFrame () const
 Return TRUE if another frame should be drawn right after this one. More...
 
void setAskNextFrame (bool theToDraw=true)
 Set if another frame should be drawn right after this one. More...
 
bool hasPanningAnchorPoint () const
 Return if panning anchor point has been defined. More...
 
const gp_PntpanningAnchorPoint () const
 Return active panning anchor point. More...
 
void setPanningAnchorPoint (const gp_Pnt &thePnt)
 Set active panning anchor point. More...
 
virtual void handlePanning (const Handle< V3d_View > &theView)
 Handle panning event myGL.Panning. More...
 
virtual void handleZRotate (const Handle< V3d_View > &theView)
 Handle Z rotation event myGL.ZRotate. More...
 
double MinZoomDistance () const
 Return minimal camera distance for zoom operation. More...
 
void SetMinZoomDistance (double theDist)
 Set minimal camera distance for zoom operation. More...
 
virtual void handleZoom (const Handle< V3d_View > &theView, const Aspect_ScrollDelta &theParams, const gp_Pnt *thePnt)
 Handle zoom event myGL.ZoomActions. This method is expected to be called from rendering thread. More...
 
virtual void handleZFocusScroll (const Handle< V3d_View > &theView, const Aspect_ScrollDelta &theParams)
 Handle ZScroll event myGL.ZoomActions. This method is expected to be called from rendering thread. More...
 
virtual void handleOrbitRotation (const Handle< V3d_View > &theView, const gp_Pnt &thePnt, bool theToLockZUp)
 Handle orbital rotation events myGL.OrbitRotation. More...
 
virtual void handleViewRotation (const Handle< V3d_View > &theView, double theYawExtra, double thePitchExtra, double theRoll, bool theToRestartOnIncrement)
 Handle view direction rotation events myGL.ViewRotation. This method is expected to be called from rendering thread. More...
 
virtual void handleViewRedraw (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView)
 Handle view redraw. This method is expected to be called from rendering thread. More...
 

Static Public Member Functions

static Standard_BooleanToCloseViewOnEscape ()
 Return TRUE if View should be closed on escape. More...
 
static Standard_BooleanToExitOnCloseView ()
 Return TRUE if Draw Harness should exit on closing View. More...
 
static const Handle< AIS_AnimationCamera > & GlobalViewAnimation ()
 Use global camera animation object shared across all Views in ViewerTest. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Protected Member Functions inherited from AIS_ViewController
virtual void flushBuffers (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView)
 Flush buffers. More...
 
virtual void flushGestures (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView)
 Flush touch gestures. More...
 
void updateEventsTime (double &thePrevTime, double &theCurrTime)
 Return current and previously fetched event times. This callback is intended to compute delta between sequentially processed events. More...
 
virtual void handleSelectionPick (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView)
 Perform selection via mouse click. This method is expected to be called from rendering thread. More...
 
virtual void handleDynamicHighlight (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView)
 Perform dynamic highlight on mouse move. This method is expected to be called from rendering thread. More...
 
virtual void handleSelectionPoly (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView)
 Perform rubber-band selection. This method is expected to be called from rendering thread. More...
 
virtual void contextLazyMoveTo (const Handle< AIS_InteractiveContext > &theCtx, const Handle< V3d_View > &theView, const Graphic3d_Vec2i &thePnt)
 Lazy AIS_InteractiveContext::MoveTo() with myPrevMoveTo check. More...
 
- Protected Attributes inherited from AIS_ViewController
Aspect_VKeySet myKeys
 keyboard state More...
 
Standard_Real myMouseClickThreshold
 mouse click threshold in pixels; 3 by default More...
 
Standard_Real myMouseDoubleClickInt
 double click interval in seconds; 0.4 by default More...
 
Standard_ShortReal myScrollZoomRatio
 distance ratio for mapping mouse scroll event to zoom; 15.0 by default More...
 
AIS_MouseGestureMap myMouseGestureMap
 map defining mouse gestures More...
 
AIS_MouseGesture myMouseActiveGesture
 initiated mouse gesture (by pressing mouse button) More...
 
Standard_Boolean myMouseActiveIdleRotation
 flag indicating view idle rotation state More...
 
Graphic3d_Vec2i myMousePositionLast
 last mouse position More...
 
Graphic3d_Vec2i myMousePressPoint
 mouse position where active gesture was been initiated More...
 
Graphic3d_Vec2i myMouseProgressPoint
 gesture progress More...
 
OSD_Timer myMouseClickTimer
 timer for handling double-click event More...
 
Standard_Integer myMouseClickCounter
 counter for handling double-click event More...
 
Aspect_VKeyMouse myMousePressed
 active mouse buttons More...
 
Aspect_VKeyFlags myMouseModifiers
 active key modifiers passed with last mouse event More...
 
Standard_Integer myMouseSingleButton
 index of mouse button pressed alone (>0) More...
 
Standard_ShortReal myTouchToleranceScale
 tolerance scale factor; 1.0 by default More...
 
Standard_ShortReal myTouchRotationThresholdPx
 threshold for starting one-touch rotation gesture in pixels; 6 by default More...
 
Standard_ShortReal myTouchZRotationThreshold
 threshold for starting two-touch Z-rotation gesture in radians; 2 degrees by default More...
 
Standard_ShortReal myTouchPanThresholdPx
 threshold for starting two-touch panning gesture in pixels; 4 by default More...
 
Standard_ShortReal myTouchZoomThresholdPx
 threshold for starting two-touch zoom (pitch) gesture in pixels; 6 by default More...
 
Standard_ShortReal myTouchZoomRatio
 distance ratio for mapping two-touch zoom (pitch) gesture from pixels to zoom; 0.13 by default More...
 
Aspect_TouchMap myTouchPoints
 map of active touches More...
 
Graphic3d_Vec2d myStartPanCoord
 touch coordinates at the moment of starting panning gesture More...
 
Graphic3d_Vec2d myStartRotCoord
 touch coordinates at the moment of starting rotating gesture More...
 
Standard_Integer myNbTouchesLast
 number of touches within previous gesture flush to track gesture changes More...
 
Standard_Boolean myUpdateStartPointPan
 flag indicating that new anchor point should be picked for starting panning gesture More...
 
Standard_Boolean myUpdateStartPointRot
 flag indicating that new gravity point should be picked for starting rotation gesture More...
 
Standard_Boolean myUpdateStartPointZRot
 flag indicating that new gravity point should be picked for starting Z-rotation gesture More...
 
Handle< AIS_PointmyAnchorPointPrs1
 anchor point presentation (Graphic3d_ZLayerId_Top) More...
 
Handle< AIS_PointmyAnchorPointPrs2
 anchor point presentation (Graphic3d_ZLayerId_Topmost) More...
 
gp_Pnt myPanPnt3d
 active panning anchor point More...
 
gp_Pnt myRotatePnt3d
 active rotation center of gravity More...
 
gp_Dir myCamStartOpUp
 camera Up direction at the beginning of rotation More...
 
gp_Dir myCamStartOpDir
 camera View direction at the beginning of rotation More...
 
gp_Pnt myCamStartOpEye
 camera Eye position at the beginning of rotation More...
 
gp_Pnt myCamStartOpCenter
 camera Center position at the beginning of rotation More...
 
gp_Vec myCamStartOpToCenter
 vector from rotation gravity point to camera Center at the beginning of rotation More...
 
gp_Vec myCamStartOpToEye
 vector from rotation gravity point to camera Eye at the beginning of rotation More...
 
Graphic3d_Vec3d myRotateStartYawPitchRoll
 camera yaw pitch roll at the beginning of rotation More...
 
AIS_ViewInputBuffer myUI
 buffer for UI thread More...
 
AIS_ViewInputBuffer myGL
 buffer for rendering thread More...
 
OSD_Timer myEventTimer
 timer for timestamping events More...
 
Standard_Real myLastEventsTime
 last fetched events timer value for computing delta/progress More...
 
Standard_Boolean myToAskNextFrame
 flag indicating that another frame should be drawn right after this one More...
 
Standard_Real myMinCamDistance
 minimal camera distance for zoom operation More...
 
AIS_RotationMode myRotationMode
 rotation mode More...
 
AIS_NavigationMode myNavigationMode
 navigation mode (orbit rotation / first person) More...
 
Standard_ShortReal myMouseAccel
 mouse input acceleration ratio in First Person mode More...
 
Standard_ShortReal myOrbitAccel
 Orbit rotation acceleration ratio. More...
 
Standard_Boolean myToShowPanAnchorPoint
 option displaying panning anchor point More...
 
Standard_Boolean myToShowRotateCenter
 option displaying rotation center point More...
 
Standard_Boolean myToLockOrbitZUp
 force camera up orientation within AIS_NavigationMode_Orbit rotation mode More...
 
Standard_Boolean myToInvertPitch
 flag inverting pitch direction while processing Aspect_VKey_NavLookUp/Aspect_VKey_NavLookDown More...
 
Standard_Boolean myToAllowTouchZRotation
 enable z-rotation two-touches gesture; FALSE by default More...
 
Standard_Boolean myToAllowRotation
 enable rotation; TRUE by default More...
 
Standard_Boolean myToAllowPanning
 enable panning; TRUE by default More...
 
Standard_Boolean myToAllowZooming
 enable zooming; TRUE by default More...
 
Standard_Boolean myToAllowZFocus
 enable ZFocus change; TRUE by default More...
 
Standard_Boolean myToAllowHighlight
 enable dynamic highlight on mouse move; TRUE by default More...
 
Standard_Boolean myToAllowDragging
 enable dragging object; TRUE by default More...
 
Standard_Boolean myToStickToRayOnZoom
 project picked point to ray while zooming at point, TRUE by default More...
 
Standard_Boolean myToStickToRayOnRotation
 project picked point to ray while rotating around point; TRUE by default More...
 
Standard_ShortReal myWalkSpeedAbsolute
 normal walking speed, in m/s; 1.5 by default More...
 
Standard_ShortReal myWalkSpeedRelative
 walking speed relative to scene bounding box; 0.1 by default More...
 
Standard_ShortReal myThrustSpeed
 active thrust value More...
 
Standard_Boolean myHasThrust
 flag indicating active thrust More...
 
Handle< AIS_AnimationCameramyViewAnimation
 view animation More...
 
Handle< AIS_RubberBandmyRubberBand
 Rubber-band presentation. More...
 
Handle< AIS_InteractiveObjectmyDragObject
 currently dragged object More...
 
Graphic3d_Vec2i myPrevMoveTo
 previous position of MoveTo event in 3D viewer More...
 
Standard_Boolean myHasHlrOnBeforeRotation
 flag for restoring Computed mode after rotation More...
 

Detailed Description

used to manage mouse event (move,select,shiftselect) By default the events are transmitted to interactive context.

Constructor & Destructor Documentation

◆ ViewerTest_EventManager()

ViewerTest_EventManager::ViewerTest_EventManager ( const Handle< V3d_View > &  aView,
const Handle< AIS_InteractiveContext > &  aCtx 
)

Main constructor.

◆ ~ViewerTest_EventManager()

virtual ViewerTest_EventManager::~ViewerTest_EventManager ( )
virtual

Destructor.

Member Function Documentation

◆ Context()

const Handle< AIS_InteractiveContext >& ViewerTest_EventManager::Context ( ) const
inline

Return interactive context.

◆ GlobalViewAnimation()

static const Handle< AIS_AnimationCamera >& ViewerTest_EventManager::GlobalViewAnimation ( )
static

Use global camera animation object shared across all Views in ViewerTest.

◆ KeyUp()

virtual void ViewerTest_EventManager::KeyUp ( Aspect_VKey  theKey,
double  theTime 
)
overridevirtual

Release key.

Reimplemented from AIS_ViewController.

◆ ProcessConfigure()

virtual void ViewerTest_EventManager::ProcessConfigure ( )
virtual

Resize View.

◆ ProcessExpose()

virtual void ViewerTest_EventManager::ProcessExpose ( )
virtual

Redraw the View on an Expose Event.

◆ ProcessKeyPress()

void ViewerTest_EventManager::ProcessKeyPress ( Aspect_VKey  theKey)

Handle KeyPress event.

◆ StartPickPoint()

void ViewerTest_EventManager::StartPickPoint ( const char *  theArgX,
const char *  theArgY,
const char *  theArgZ 
)
inline

Start picking point for VPick command.

◆ ToCloseViewOnEscape()

static Standard_Boolean& ViewerTest_EventManager::ToCloseViewOnEscape ( )
inlinestatic

Return TRUE if View should be closed on escape.

◆ ToExitOnCloseView()

static Standard_Boolean& ViewerTest_EventManager::ToExitOnCloseView ( )
inlinestatic

Return TRUE if Draw Harness should exit on closing View.

◆ ToPickPoint()

Standard_Boolean ViewerTest_EventManager::ToPickPoint ( ) const
inline

Returns TRUE if picking point mode has been enabled (for VPick command).

◆ UpdateMouseButtons()

virtual bool ViewerTest_EventManager::UpdateMouseButtons ( const Graphic3d_Vec2i thePoint,
Aspect_VKeyMouse  theButtons,
Aspect_VKeyFlags  theModifiers,
bool  theIsEmulated 
)
overridevirtual

Handle mouse button press/release event.

Reimplemented from AIS_ViewController.


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