File indexing completed on 2026-09-28 09:19:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _AIS_ViewController_HeaderFile
0015 #define _AIS_ViewController_HeaderFile
0016
0017 #include <Aspect_WindowInputListener.hxx>
0018 #include <Aspect_XRHapticActionData.hxx>
0019 #include <Aspect_XRTrackedDeviceRole.hxx>
0020 #include <AIS_DragAction.hxx>
0021 #include <AIS_MouseGesture.hxx>
0022 #include <AIS_NavigationMode.hxx>
0023 #include <AIS_ViewInputBuffer.hxx>
0024 #include <AIS_RotationMode.hxx>
0025 #include <AIS_WalkDelta.hxx>
0026
0027 #include <gp_Pnt.hxx>
0028 #include <gp_Quaternion.hxx>
0029 #include <NCollection_Vec3.hxx>
0030 #include <Standard_TypeDef.hxx>
0031 #include <NCollection_Array1.hxx>
0032 #include <OSD_Timer.hxx>
0033 #include <Precision.hxx>
0034 #include <Quantity_ColorRGBA.hxx>
0035
0036 class AIS_Animation;
0037 class AIS_AnimationCamera;
0038 class AIS_InteractiveObject;
0039 class AIS_InteractiveContext;
0040 class AIS_Point;
0041 class AIS_RubberBand;
0042 class AIS_XRTrackedDevice;
0043 class SelectMgr_EntityOwner;
0044 class V3d_View;
0045 class WNT_HIDSpaceMouse;
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 class AIS_ViewController : public Aspect_WindowInputListener
0056 {
0057 public:
0058
0059 Standard_EXPORT AIS_ViewController();
0060
0061
0062 Standard_EXPORT ~AIS_ViewController() override;
0063
0064
0065 const AIS_ViewInputBuffer& InputBuffer(AIS_ViewInputBufferType theType) const
0066 {
0067 return theType == AIS_ViewInputBufferType_UI ? myUI : myGL;
0068 }
0069
0070
0071 AIS_ViewInputBuffer& ChangeInputBuffer(AIS_ViewInputBufferType theType)
0072 {
0073 return theType == AIS_ViewInputBufferType_UI ? myUI : myGL;
0074 }
0075
0076
0077 const occ::handle<AIS_AnimationCamera>& ViewAnimation() const { return myViewAnimation; }
0078
0079
0080 void SetViewAnimation(const occ::handle<AIS_AnimationCamera>& theAnimation)
0081 {
0082 myViewAnimation = theAnimation;
0083 }
0084
0085
0086 Standard_EXPORT void AbortViewAnimation();
0087
0088
0089 const occ::handle<AIS_Animation>& ObjectsAnimation() const { return myObjAnimation; }
0090
0091
0092 void SetObjectsAnimation(const occ::handle<AIS_Animation>& theAnimation)
0093 {
0094 myObjAnimation = theAnimation;
0095 }
0096
0097
0098 bool ToPauseObjectsAnimation() const { return myToPauseObjAnimation; }
0099
0100
0101 void SetPauseObjectsAnimation(bool theToPause) { myToPauseObjAnimation = theToPause; }
0102
0103
0104
0105
0106 bool IsContinuousRedraw() const { return myIsContinuousRedraw; }
0107
0108
0109 void SetContinuousRedraw(bool theToEnable) { myIsContinuousRedraw = theToEnable; }
0110
0111 public:
0112
0113 AIS_RotationMode RotationMode() const { return myRotationMode; }
0114
0115
0116 void SetRotationMode(AIS_RotationMode theMode) { myRotationMode = theMode; }
0117
0118
0119 AIS_NavigationMode NavigationMode() const { return myNavigationMode; }
0120
0121
0122 Standard_EXPORT void SetNavigationMode(AIS_NavigationMode theMode);
0123
0124
0125 float MouseAcceleration() const { return myMouseAccel; }
0126
0127
0128 void SetMouseAcceleration(float theRatio) { myMouseAccel = theRatio; }
0129
0130
0131 float OrbitAcceleration() const { return myOrbitAccel; }
0132
0133
0134 void SetOrbitAcceleration(float theRatio) { myOrbitAccel = theRatio; }
0135
0136
0137
0138 bool ToShowPanAnchorPoint() const { return myToShowPanAnchorPoint; }
0139
0140
0141 void SetShowPanAnchorPoint(bool theToShow) { myToShowPanAnchorPoint = theToShow; }
0142
0143
0144 bool ToShowRotateCenter() const { return myToShowRotateCenter; }
0145
0146
0147 void SetShowRotateCenter(bool theToShow) { myToShowRotateCenter = theToShow; }
0148
0149
0150
0151 bool ToLockOrbitZUp() const { return myToLockOrbitZUp; }
0152
0153
0154
0155 void SetLockOrbitZUp(bool theToForceUp) { myToLockOrbitZUp = theToForceUp; }
0156
0157
0158 bool ToAllowTouchZRotation() const { return myToAllowTouchZRotation; }
0159
0160
0161 void SetAllowTouchZRotation(bool theToEnable) { myToAllowTouchZRotation = theToEnable; }
0162
0163
0164 bool ToAllowRotation() const { return myToAllowRotation; }
0165
0166
0167 void SetAllowRotation(bool theToEnable) { myToAllowRotation = theToEnable; }
0168
0169
0170 bool ToAllowPanning() const { return myToAllowPanning; }
0171
0172
0173 void SetAllowPanning(bool theToEnable) { myToAllowPanning = theToEnable; }
0174
0175
0176 bool ToAllowZooming() const { return myToAllowZooming; }
0177
0178
0179 void SetAllowZooming(bool theToEnable) { myToAllowZooming = theToEnable; }
0180
0181
0182 bool ToAllowZFocus() const { return myToAllowZFocus; }
0183
0184
0185 void SetAllowZFocus(bool theToEnable) { myToAllowZFocus = theToEnable; }
0186
0187
0188 bool ToAllowHighlight() const { return myToAllowHighlight; }
0189
0190
0191 void SetAllowHighlight(bool theToEnable) { myToAllowHighlight = theToEnable; }
0192
0193
0194 bool ToAllowDragging() const { return myToAllowDragging; }
0195
0196
0197 void SetAllowDragging(bool theToEnable) { myToAllowDragging = theToEnable; }
0198
0199
0200
0201 bool ToStickToRayOnZoom() const { return myToStickToRayOnZoom; }
0202
0203
0204 void SetStickToRayOnZoom(bool theToEnable) { myToStickToRayOnZoom = theToEnable; }
0205
0206
0207
0208 bool ToStickToRayOnRotation() const { return myToStickToRayOnRotation; }
0209
0210
0211 void SetStickToRayOnRotation(bool theToEnable) { myToStickToRayOnRotation = theToEnable; }
0212
0213
0214
0215 bool ToInvertPitch() const { return myToInvertPitch; }
0216
0217
0218 void SetInvertPitch(bool theToInvert) { myToInvertPitch = theToInvert; }
0219
0220
0221 float WalkSpeedAbsolute() const { return myWalkSpeedAbsolute; }
0222
0223
0224 void SetWalkSpeedAbsolute(float theSpeed) { myWalkSpeedAbsolute = theSpeed; }
0225
0226
0227 float WalkSpeedRelative() const { return myWalkSpeedRelative; }
0228
0229
0230 void SetWalkSpeedRelative(float theFactor) { myWalkSpeedRelative = theFactor; }
0231
0232
0233 float ThrustSpeed() const { return myThrustSpeed; }
0234
0235
0236 void SetThrustSpeed(float theSpeed) { myThrustSpeed = theSpeed; }
0237
0238
0239 bool HasPreviousMoveTo() const { return myPrevMoveTo != NCollection_Vec2<int>(-1); }
0240
0241
0242 const NCollection_Vec2<int>& PreviousMoveTo() const { return myPrevMoveTo; }
0243
0244
0245 void ResetPreviousMoveTo() { myPrevMoveTo = NCollection_Vec2<int>(-1); }
0246
0247
0248 bool ToDisplayXRAuxDevices() const { return myToDisplayXRAuxDevices; }
0249
0250
0251 void SetDisplayXRAuxDevices(bool theToDisplay) { myToDisplayXRAuxDevices = theToDisplay; }
0252
0253
0254 bool ToDisplayXRHands() const { return myToDisplayXRHands; }
0255
0256
0257 void SetDisplayXRHands(bool theToDisplay) { myToDisplayXRHands = theToDisplay; }
0258
0259 public:
0260 using Aspect_WindowInputListener::ChangeKeys;
0261 using Aspect_WindowInputListener::Keys;
0262
0263
0264
0265
0266
0267 Standard_EXPORT void KeyDown(Aspect_VKey theKey,
0268 double theTime,
0269 double thePressure = 1.0) override;
0270
0271
0272
0273
0274
0275 Standard_EXPORT void KeyUp(Aspect_VKey theKey, double theTime) override;
0276
0277
0278
0279 Standard_EXPORT void KeyFromAxis(Aspect_VKey theNegative,
0280 Aspect_VKey thePositive,
0281 double theTime,
0282 double thePressure) override;
0283
0284
0285 Standard_EXPORT AIS_WalkDelta FetchNavigationKeys(double theCrouchRatio, double theRunRatio);
0286
0287 public:
0288
0289 const NCollection_DataMap<unsigned int, AIS_MouseGesture>& MouseGestureMap() const
0290 {
0291 return myMouseGestureMap;
0292 }
0293
0294
0295 NCollection_DataMap<unsigned int, AIS_MouseGesture>& ChangeMouseGestureMap()
0296 {
0297 return myMouseGestureMap;
0298 }
0299
0300
0301 const NCollection_DataMap<unsigned int, AIS_SelectionScheme>& MouseSelectionSchemes() const
0302 {
0303 return myMouseSelectionSchemes;
0304 }
0305
0306
0307 NCollection_DataMap<unsigned int, AIS_SelectionScheme>& ChangeMouseSelectionSchemes()
0308 {
0309 return myMouseSelectionSchemes;
0310 }
0311
0312
0313 double MouseDoubleClickInterval() const { return myMouseDoubleClickInt; }
0314
0315
0316 void SetMouseDoubleClickInterval(double theSeconds) { myMouseDoubleClickInt = theSeconds; }
0317
0318
0319
0320
0321
0322 Standard_EXPORT virtual void SelectInViewer(
0323 const NCollection_Vec2<int>& thePnt,
0324 const AIS_SelectionScheme theScheme = AIS_SelectionScheme_Replace);
0325
0326
0327
0328
0329
0330 Standard_EXPORT virtual void SelectInViewer(
0331 const NCollection_Sequence<NCollection_Vec2<int>>& thePnts,
0332 const AIS_SelectionScheme theScheme = AIS_SelectionScheme_Replace);
0333
0334
0335
0336
0337
0338 Standard_EXPORT virtual void UpdateRubberBand(const NCollection_Vec2<int>& thePntFrom,
0339 const NCollection_Vec2<int>& thePntTo);
0340
0341
0342
0343
0344
0345 Standard_EXPORT virtual void UpdatePolySelection(const NCollection_Vec2<int>& thePnt,
0346 bool theToAppend);
0347
0348
0349
0350
0351
0352 Standard_EXPORT virtual bool UpdateZoom(const Aspect_ScrollDelta& theDelta);
0353
0354
0355
0356
0357 Standard_EXPORT virtual bool UpdateZRotation(double theAngle);
0358
0359
0360
0361
0362
0363 Standard_EXPORT bool UpdateMouseScroll(const Aspect_ScrollDelta& theDelta) override;
0364
0365
0366
0367
0368
0369
0370
0371
0372
0373 Standard_EXPORT bool UpdateMouseButtons(const NCollection_Vec2<int>& thePoint,
0374 Aspect_VKeyMouse theButtons,
0375 Aspect_VKeyFlags theModifiers,
0376 bool theIsEmulated) override;
0377
0378
0379
0380
0381
0382
0383
0384
0385
0386 Standard_EXPORT bool UpdateMousePosition(const NCollection_Vec2<int>& thePoint,
0387 Aspect_VKeyMouse theButtons,
0388 Aspect_VKeyFlags theModifiers,
0389 bool theIsEmulated) override;
0390
0391
0392
0393
0394
0395
0396
0397
0398
0399
0400 Standard_EXPORT virtual bool UpdateMouseClick(const NCollection_Vec2<int>& thePoint,
0401 Aspect_VKeyMouse theButton,
0402 Aspect_VKeyFlags theModifiers,
0403 bool theIsDoubleClick);
0404
0405 using Aspect_WindowInputListener::PressMouseButton;
0406 using Aspect_WindowInputListener::ReleaseMouseButton;
0407
0408 using Aspect_WindowInputListener::LastMouseFlags;
0409 using Aspect_WindowInputListener::LastMousePosition;
0410 using Aspect_WindowInputListener::PressedMouseButtons;
0411
0412 public:
0413
0414
0415 float TouchToleranceScale() const { return myTouchToleranceScale; }
0416
0417
0418 void SetTouchToleranceScale(float theTolerance) { myTouchToleranceScale = theTolerance; }
0419
0420
0421
0422
0423
0424
0425 Standard_EXPORT void AddTouchPoint(size_t theId,
0426 const NCollection_Vec2<double>& thePnt,
0427 bool theClearBefore = false) override;
0428
0429
0430
0431
0432
0433
0434 Standard_EXPORT bool RemoveTouchPoint(size_t theId, bool theClearSelectPnts = false) override;
0435
0436
0437
0438
0439
0440
0441 Standard_EXPORT void UpdateTouchPoint(size_t theId,
0442 const NCollection_Vec2<double>& thePnt) override;
0443
0444 using Aspect_WindowInputListener::HasTouchPoints;
0445
0446 public:
0447
0448 Standard_EXPORT bool Update3dMouse(const WNT_HIDSpaceMouse& theEvent) override;
0449
0450 public:
0451
0452
0453 void ProcessExpose() override {}
0454
0455
0456
0457 void ProcessConfigure(bool theIsResized) override { (void)theIsResized; }
0458
0459
0460
0461
0462 void ProcessInput() override {}
0463
0464
0465
0466 void ProcessFocus(bool theIsActivated) override
0467 {
0468 if (!theIsActivated)
0469 {
0470 ResetViewInput();
0471 }
0472 }
0473
0474
0475
0476 void ProcessClose() override {}
0477
0478 public:
0479 using Aspect_WindowInputListener::EventTime;
0480
0481
0482
0483 Standard_EXPORT virtual void ResetViewInput();
0484
0485
0486
0487 Standard_EXPORT virtual void UpdateViewOrientation(V3d_TypeOfOrientation theOrientation,
0488 bool theToFitAll);
0489
0490
0491
0492
0493
0494
0495
0496 Standard_EXPORT virtual void FlushViewEvents(const occ::handle<AIS_InteractiveContext>& theCtx,
0497 const occ::handle<V3d_View>& theView,
0498 bool theToHandle = false);
0499
0500
0501 Standard_EXPORT virtual void HandleViewEvents(const occ::handle<AIS_InteractiveContext>& theCtx,
0502 const occ::handle<V3d_View>& theView);
0503
0504 public:
0505
0506
0507 Standard_EXPORT virtual void OnSelectionChanged(const occ::handle<AIS_InteractiveContext>& theCtx,
0508 const occ::handle<V3d_View>& theView);
0509
0510
0511
0512 Standard_EXPORT virtual void OnObjectDragged(const occ::handle<AIS_InteractiveContext>& theCtx,
0513 const occ::handle<V3d_View>& theView,
0514 AIS_DragAction theAction);
0515
0516
0517
0518 Standard_EXPORT virtual void OnSubviewChanged(const occ::handle<AIS_InteractiveContext>& theCtx,
0519 const occ::handle<V3d_View>& theOldView,
0520 const occ::handle<V3d_View>& theNewView);
0521
0522
0523
0524
0525
0526
0527
0528
0529
0530 Standard_EXPORT virtual bool PickPoint(gp_Pnt& thePnt,
0531 const occ::handle<AIS_InteractiveContext>& theCtx,
0532 const occ::handle<V3d_View>& theView,
0533 const NCollection_Vec2<int>& theCursor,
0534 bool theToStickToPickRay);
0535
0536
0537
0538
0539
0540
0541
0542
0543 Standard_EXPORT virtual bool PickAxis(gp_Pnt& theTopPnt,
0544 const occ::handle<AIS_InteractiveContext>& theCtx,
0545 const occ::handle<V3d_View>& theView,
0546 const gp_Ax1& theAxis);
0547
0548
0549
0550 Standard_EXPORT virtual gp_Pnt GravityPoint(const occ::handle<AIS_InteractiveContext>& theCtx,
0551 const occ::handle<V3d_View>& theView);
0552
0553
0554
0555
0556 Standard_EXPORT virtual void FitAllAuto(const occ::handle<AIS_InteractiveContext>& theCtx,
0557 const occ::handle<V3d_View>& theView);
0558
0559 public:
0560
0561
0562
0563
0564 Standard_EXPORT virtual void handleViewOrientationKeys(
0565 const occ::handle<AIS_InteractiveContext>& theCtx,
0566 const occ::handle<V3d_View>& theView);
0567
0568
0569
0570 Standard_EXPORT virtual AIS_WalkDelta handleNavigationKeys(
0571 const occ::handle<AIS_InteractiveContext>& theCtx,
0572 const occ::handle<V3d_View>& theView);
0573
0574
0575
0576 Standard_EXPORT virtual void handleCameraActions(
0577 const occ::handle<AIS_InteractiveContext>& theCtx,
0578 const occ::handle<V3d_View>& theView,
0579 const AIS_WalkDelta& theWalk);
0580
0581
0582
0583 Standard_EXPORT virtual void handleMoveTo(const occ::handle<AIS_InteractiveContext>& theCtx,
0584 const occ::handle<V3d_View>& theView);
0585
0586
0587 bool toAskNextFrame() const { return myToAskNextFrame; }
0588
0589
0590 void setAskNextFrame(bool theToDraw = true) { myToAskNextFrame = theToDraw; }
0591
0592
0593 bool hasPanningAnchorPoint() const { return !Precision::IsInfinite(myPanPnt3d.X()); }
0594
0595
0596 const gp_Pnt& panningAnchorPoint() const { return myPanPnt3d; }
0597
0598
0599 void setPanningAnchorPoint(const gp_Pnt& thePnt) { myPanPnt3d = thePnt; }
0600
0601
0602 Standard_EXPORT virtual void handlePanning(const occ::handle<V3d_View>& theView);
0603
0604
0605 Standard_EXPORT virtual void handleZRotate(const occ::handle<V3d_View>& theView);
0606
0607
0608 double MinZoomDistance() const { return myMinCamDistance; }
0609
0610
0611 void SetMinZoomDistance(double theDist) { myMinCamDistance = theDist; }
0612
0613
0614
0615 Standard_EXPORT virtual void handleZoom(const occ::handle<V3d_View>& theView,
0616 const Aspect_ScrollDelta& theParams,
0617 const gp_Pnt* thePnt);
0618
0619
0620
0621 Standard_EXPORT virtual void handleZFocusScroll(const occ::handle<V3d_View>& theView,
0622 const Aspect_ScrollDelta& theParams);
0623
0624
0625
0626
0627
0628
0629 Standard_EXPORT virtual void handleOrbitRotation(const occ::handle<V3d_View>& theView,
0630 const gp_Pnt& thePnt,
0631 bool theToLockZUp);
0632
0633
0634
0635
0636
0637
0638
0639
0640 Standard_EXPORT virtual void handleViewRotation(const occ::handle<V3d_View>& theView,
0641 double theYawExtra,
0642 double thePitchExtra,
0643 double theRoll,
0644 bool theToRestartOnIncrement);
0645
0646
0647
0648 Standard_EXPORT virtual void handleViewRedraw(const occ::handle<AIS_InteractiveContext>& theCtx,
0649 const occ::handle<V3d_View>& theView);
0650
0651 public:
0652
0653
0654 Standard_EXPORT virtual void handleXRInput(const occ::handle<AIS_InteractiveContext>& theCtx,
0655 const occ::handle<V3d_View>& theView,
0656 const AIS_WalkDelta& theWalk);
0657
0658
0659 Standard_EXPORT virtual void handleXRTurnPad(const occ::handle<AIS_InteractiveContext>& theCtx,
0660 const occ::handle<V3d_View>& theView);
0661
0662
0663 Standard_EXPORT virtual void handleXRTeleport(const occ::handle<AIS_InteractiveContext>& theCtx,
0664 const occ::handle<V3d_View>& theView);
0665
0666
0667 Standard_EXPORT virtual void handleXRPicking(const occ::handle<AIS_InteractiveContext>& theCtx,
0668 const occ::handle<V3d_View>& theView);
0669
0670
0671 Standard_EXPORT virtual void handleXRHighlight(const occ::handle<AIS_InteractiveContext>& theCtx,
0672 const occ::handle<V3d_View>& theView);
0673
0674
0675 Standard_EXPORT virtual void handleXRPresentations(
0676 const occ::handle<AIS_InteractiveContext>& theCtx,
0677 const occ::handle<V3d_View>& theView);
0678
0679
0680 Standard_EXPORT virtual int handleXRMoveTo(const occ::handle<AIS_InteractiveContext>& theCtx,
0681 const occ::handle<V3d_View>& theView,
0682 const gp_Trsf& thePose,
0683 const bool theToHighlight);
0684
0685 protected:
0686
0687 Standard_EXPORT virtual void flushBuffers(const occ::handle<AIS_InteractiveContext>& theCtx,
0688 const occ::handle<V3d_View>& theView);
0689
0690
0691 Standard_EXPORT virtual void flushGestures(const occ::handle<AIS_InteractiveContext>& theCtx,
0692 const occ::handle<V3d_View>& theView);
0693
0694
0695
0696
0697
0698 void updateEventsTime(double& thePrevTime, double& theCurrTime)
0699 {
0700 thePrevTime = myLastEventsTime;
0701 myLastEventsTime = EventTime();
0702 theCurrTime = myLastEventsTime;
0703 }
0704
0705
0706
0707 Standard_EXPORT virtual void handleSelectionPick(
0708 const occ::handle<AIS_InteractiveContext>& theCtx,
0709 const occ::handle<V3d_View>& theView);
0710
0711
0712
0713 Standard_EXPORT virtual void handleDynamicHighlight(
0714 const occ::handle<AIS_InteractiveContext>& theCtx,
0715 const occ::handle<V3d_View>& theView);
0716
0717
0718
0719 Standard_EXPORT virtual void handleSelectionPoly(
0720 const occ::handle<AIS_InteractiveContext>& theCtx,
0721 const occ::handle<V3d_View>& theView);
0722
0723
0724 Standard_EXPORT virtual void contextLazyMoveTo(const occ::handle<AIS_InteractiveContext>& theCtx,
0725 const occ::handle<V3d_View>& theView,
0726 const NCollection_Vec2<int>& thePnt);
0727
0728 protected:
0729 AIS_ViewInputBuffer myUI;
0730 AIS_ViewInputBuffer myGL;
0731
0732
0733 double myLastEventsTime;
0734 bool myToAskNextFrame;
0735 bool myIsContinuousRedraw;
0736
0737 double myMinCamDistance;
0738 AIS_RotationMode myRotationMode;
0739 AIS_NavigationMode myNavigationMode;
0740 float myMouseAccel;
0741 float myOrbitAccel;
0742 bool myToShowPanAnchorPoint;
0743 bool myToShowRotateCenter;
0744 bool myToLockOrbitZUp;
0745 bool myToInvertPitch;
0746 bool myToAllowTouchZRotation;
0747 bool myToAllowRotation;
0748 bool myToAllowPanning;
0749 bool myToAllowZooming;
0750 bool myToAllowZFocus;
0751 bool myToAllowHighlight;
0752 bool myToAllowDragging;
0753 bool myToStickToRayOnZoom;
0754 bool myToStickToRayOnRotation;
0755
0756 float myWalkSpeedAbsolute;
0757 float myWalkSpeedRelative;
0758 float myThrustSpeed;
0759 bool myHasThrust;
0760
0761 occ::handle<AIS_AnimationCamera> myViewAnimation;
0762 occ::handle<AIS_Animation> myObjAnimation;
0763 bool myToPauseObjAnimation;
0764 occ::handle<AIS_RubberBand> myRubberBand;
0765 occ::handle<SelectMgr_EntityOwner> myDragOwner;
0766 occ::handle<AIS_InteractiveObject> myDragObject;
0767 NCollection_Vec2<int> myPrevMoveTo;
0768 bool myHasHlrOnBeforeRotation;
0769
0770 protected:
0771
0772 NCollection_Array1<occ::handle<AIS_XRTrackedDevice>> myXRPrsDevices;
0773
0774 Quantity_Color myXRLaserTeleColor;
0775 Quantity_Color myXRLaserPickColor;
0776 Aspect_XRTrackedDeviceRole myXRLastTeleportHand;
0777 Aspect_XRTrackedDeviceRole myXRLastPickingHand;
0778 Aspect_XRHapticActionData myXRTeleportHaptic;
0779 Aspect_XRHapticActionData myXRPickingHaptic;
0780 Aspect_XRHapticActionData myXRSelectHaptic;
0781 double myXRLastPickDepthLeft;
0782 double myXRLastPickDepthRight;
0783 double myXRTurnAngle;
0784
0785 bool myToDisplayXRAuxDevices;
0786 bool myToDisplayXRHands;
0787
0788 protected:
0789
0790 double myMouseClickThreshold;
0791 double myMouseDoubleClickInt;
0792 float myScrollZoomRatio;
0793
0794 NCollection_DataMap<unsigned int, AIS_MouseGesture> myMouseGestureMap;
0795 NCollection_DataMap<unsigned int, AIS_MouseGesture> myMouseGestureMapDrag;
0796 AIS_MouseGesture myMouseActiveGesture;
0797 NCollection_DataMap<unsigned int, AIS_SelectionScheme>
0798 myMouseSelectionSchemes;
0799 bool myMouseActiveIdleRotation;
0800 NCollection_Vec2<int> myMousePressPoint;
0801 NCollection_Vec2<int> myMouseProgressPoint;
0802 OSD_Timer myMouseClickTimer;
0803 int myMouseClickCounter;
0804 int myMouseSingleButton;
0805 bool myMouseStopDragOnUnclick;
0806
0807 protected:
0808
0809 float myTouchToleranceScale;
0810 float myTouchClickThresholdPx;
0811 float myTouchRotationThresholdPx;
0812 float myTouchZRotationThreshold;
0813 float myTouchPanThresholdPx;
0814 float myTouchZoomThresholdPx;
0815 float myTouchZoomRatio;
0816 float myTouchDraggingThresholdPx;
0817
0818 Aspect_Touch myTouchClick;
0819 OSD_Timer myTouchDoubleTapTimer;
0820
0821 NCollection_Vec2<double> myStartPanCoord;
0822 NCollection_Vec2<double> myStartRotCoord;
0823 int myNbTouchesLast;
0824 bool myUpdateStartPointPan;
0825 bool myUpdateStartPointRot;
0826 bool myUpdateStartPointZRot;
0827
0828 protected:
0829
0830 occ::handle<AIS_Point> myAnchorPointPrs1;
0831 occ::handle<AIS_Point> myAnchorPointPrs2;
0832 gp_Pnt myPanPnt3d;
0833 gp_Pnt myRotatePnt3d;
0834 gp_Dir myCamStartOpUp;
0835 gp_Dir myCamStartOpDir;
0836 gp_Pnt myCamStartOpEye;
0837 gp_Pnt myCamStartOpCenter;
0838 gp_Vec myCamStartOpToCenter;
0839 gp_Vec myCamStartOpToEye;
0840 double myCurrentRollAngle;
0841
0842 };
0843
0844 #endif