VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgObserverObject.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2025 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
14 
16 
18 #include <vrvUtil/DtQuat.h>
19 
20 #include <osg/Matrixd>
21 #include <osg/Vec3d>
22 #include <osg/Vec3>
23 #include <osg/Node>
24 
25 #include <list>
26 #include <unordered_map>
27 
28 class DtTaitBryan;
29 
30 namespace osg
31 {
32  class Node;
33 }
34 
35 namespace makVrv
36 {
37  class DtChannel;
38  class DtOsgChannel;
39  class DtCoordinateConverter;
40  class DtSceneObject;
41  class DtTerrainPatchObject;
42  class DtAgentUpdateResolverInterface;
43  class DtIntersectorsContainer;
44  class DtCoordinateSystem;
45 
50  {
51 
52  public:
53 
55  {
56  TerrainResultNoData = 0,
58  TerrainResultComplete
59  };
60 
61  public:
62 
64  DtOsgObserverObject( DtDe& de, DtUniqueID id, const std::string& name="" );
65 
67  virtual ~DtOsgObserverObject();
68 
70  DtOsgObserverObject() = delete;
71 
74 
76  DtOsgObserverObject& operator=(const DtOsgObserverObject&) = delete;
77 
78  public:
79 
81  virtual void tick( double simTime );
82 
84  virtual void tickAttachment();
85 
88  virtual void setModelSet( DtModelSetId modelSet );
89 
91  virtual double altitude() const;
92 
93  virtual void setNameAndRegister( const std::string& name );
94 
100  virtual void setCameraPositionAndOrientation( const osg::Vec3d& position,
101  const osg::Quat& rotation );
102 
103  virtual void getCameraPositionAndOrientation( osg::Vec3d& position,
104  osg::Quat& rotation ) const;
105 
106  virtual void getCameraPositionAndOrientation( DtVector& position,
107  DtQuat& rotation ) const;
108 
110  static void matrixdToTaitBryan( const osg::Matrixd& mat, DtTaitBryan& tb, bool isWorld2D = false );
111  static double clampUnity( double x );
112 
113 
114  //
115  //
117  //
118  //
119 
121  virtual void startMoveObserverRight();
124  virtual void stopMoveObserverRight();
125  virtual void moveObserverRight( double meters );
126 
128  virtual void startMoveObserverForward();
131  virtual void stopMoveObserverForward();
132  virtual void moveObserverForward( double meters );
134 
136  virtual void startMoveObserverUp();
139  virtual void stopMoveObserverUp();
140  virtual void moveObserverUp( double meters );
142 
144  virtual void startMoveObserverLeft();
147  virtual void stopMoveObserverLeft();
148  virtual void moveObserverLeft( double meters );
150 
152  virtual void startMoveObserverBack();
155  virtual void stopMoveObserverBack();
156  virtual void moveObserverBack( double meters );
158 
160  virtual void startMoveObserverDown();
163  virtual void stopMoveObserverDown();
164  virtual void moveObserverDown( double meters );
166 
168  virtual void startMoveLevelObserverRight();
172  virtual void stopMoveLevelObserverRight();
173  virtual void moveLevelObserverRight( double meters );
175 
177  virtual void startMoveLevelObserverForward();
181  virtual void stopMoveLevelObserverForward();
182  virtual void moveLevelObserverForward( double meters );
184 
186  virtual void startMoveLevelObserverUp();
190  virtual void stopMoveLevelObserverUp();
191  virtual void moveLevelObserverUp( double meters );
193 
195  virtual void startMoveLevelObserverLeft();
199  virtual void stopMoveLevelObserverLeft();
200  virtual void moveLevelObserverLeft( double meters );
202 
204  virtual void startMoveLevelObserverBack();
208  virtual void stopMoveLevelObserverBack();
209  virtual void moveLevelObserverBack( double meters );
211 
213  virtual void startMoveLevelObserverDown();
216  virtual void stopMoveLevelObserverDown();
217  virtual void moveLevelObserverDown( double meters );
219 
221  virtual void startMoveAttachedRight();
224  virtual void stopMoveAttachedRight();
225  virtual void moveAttachedRight( double meters );
226 
228  virtual void startMoveAttachedForward();
231  virtual void stopMoveAttachedForward();
232  virtual void moveAttachedForward( double meters );
234 
236  virtual void startMoveAttachedUp();
239  virtual void stopMoveAttachedUp();
240  virtual void moveAttachedUp( double meters );
242 
244  virtual void startMoveAttachedLeft();
247  virtual void stopMoveAttachedLeft();
248  virtual void moveAttachedLeft( double meters );
250 
252  virtual void startMoveAttachedBack();
255  virtual void stopMoveAttachedBack();
256  virtual void moveAttachedBack( double meters );
258 
260  virtual void startMoveAttachedDown();
263  virtual void stopMoveAttachedDown();
264  virtual void moveAttachedDown( double meters );
266 
268  virtual void startMoveLevelAttachedRight();
272  virtual void stopMoveLevelAttachedRight();
273  virtual void moveLevelAttachedRight( double meters );
275 
277  virtual void startMoveLevelAttachedForward();
281  virtual void stopMoveLevelAttachedForward();
282  virtual void moveLevelAttachedForward( double meters );
284 
286  virtual void startMoveLevelAttachedUp();
290  virtual void stopMoveLevelAttachedUp();
291  virtual void moveLevelAttachedUp( double meters );
293 
295  virtual void startMoveLevelAttachedLeft();
299  virtual void stopMoveLevelAttachedLeft();
300  virtual void moveLevelAttachedLeft( double meters );
302 
304  virtual void startMoveLevelAttachedBack();
308  virtual void stopMoveLevelAttachedBack();
309  virtual void moveLevelAttachedBack( double meters );
311 
313  virtual void startMoveLevelAttachedDown();
316  virtual void stopMoveLevelAttachedDown();
317  virtual void moveLevelAttachedDown( double meters );
319 
321  virtual void startMoveAttachedContextRight();
324  virtual void stopMoveAttachedContextRight();
325  virtual void moveAttachedContextRight( double meters );
327 
329  virtual void startMoveAttachedContextForward();
332  virtual void stopMoveAttachedContextForward();
333  virtual void moveAttachedContextForward( double meters );
335 
337  virtual void startMoveAttachedContextUp();
340  virtual void stopMoveAttachedContextUp();
341  virtual void moveAttachedContextUp( double meters );
343 
345  virtual void startMoveAttachedContextLeft();
348  virtual void stopMoveAttachedContextLeft();
349  virtual void moveAttachedContextLeft( double meters );
351 
353  virtual void startMoveAttachedContextBack();
356  virtual void stopMoveAttachedContextBack();
357  virtual void moveAttachedContextBack( double meters );
359 
361  virtual void startMoveAttachedContextDown();
363  virtual void stopMoveAttachedContextDown();
364  virtual void moveAttachedContextDown( double meters );
366 
368  virtual void startYawLeft();
371  virtual void stopYawLeft();
372  virtual void rotateYawLeft(double rads);
374 
376  virtual void startYawRight();
380  virtual void stopYawRight();
381  virtual void rotateYawRight(double rads);
383 
385  virtual void startPitchUp();
388  virtual void stopPitchUp();
389  virtual void rotatePitchUp( double rads );
390  virtual void rotateFlashlightPitchUp( double rads );
392 
394  virtual void startPitchDown();
397  virtual void stopPitchDown();
398  virtual void rotatePitchDown( double rads );
399  virtual void rotateFlashlightPitchDown( double rads );
401 
403  virtual void startRollLeft();
406  virtual void stopRollLeft();
407  virtual void rollLeft(double rads);
409 
411  virtual void startRollRight();
414  virtual void stopRollRight();
415  virtual void rollRight(double rads);
417 
419  virtual void startLevelYawLeft();
422  virtual void stopLevelYawLeft();
424 
426  virtual void startLevelYawRight();
430  virtual void stopLevelYawRight();
432 
434  virtual void startLevelPitchUp();
437  virtual void stopLevelPitchUp();
438  virtual void rotateLevelPitchUp(double rads);
440 
442  virtual void startLevelPitchDown();
445  virtual void stopLevelPitchDown();
446  virtual void rotateLevelPitchDown(double rads);
448 
450  virtual void startLevelRollLeft();
453  virtual void stopLevelRollLeft();
454  virtual void rollLevelLeft(double rads);
456 
458  virtual void startLevelRollRight();
461  virtual void stopLevelRollRight();
462  virtual void rollLevelRight(double rads);
464 
465  virtual void rotateLevelYawLeft( double rads );
466  virtual void rotateLevelYawRight( double rads );
467  virtual void rotateFlashlightYawLeft( double rads );
468  virtual void rotateFlashlightYawRight( double rads );
469 
470  virtual void startLookLeft();
471  virtual void stopLookLeft();
472  virtual void lookLeft( double rads );
473 
474  virtual void startLookRight();
475  virtual void stopLookRight();
476  virtual void lookRight( double rads );
477 
478  virtual void startLookUp();
479  virtual void stopLookUp();
480  virtual void lookUp( double rads );
481 
482  virtual void startLookDown();
483  virtual void stopLookDown();
484  virtual void lookDown( double rads );
485 
486  virtual void startLookTiltRight();
487  virtual void stopLookTiltRight();
488  virtual void lookTiltRight( double rads );
489 
490  virtual void startLookTiltLeft();
491  virtual void stopLookTiltLeft();
492  virtual void lookTiltLeft( double rads );
493 
495  virtual void startOrbitingLeft();
498  virtual void stopOrbitingLeft();
499  virtual void orbitLeft( double rads );
501 
503  virtual void startOrbitingRight();
506  virtual void stopOrbitingRight();
507  virtual void orbitRight( double rads );
509 
511  virtual void startOrbitingUp();
514  virtual void stopOrbitingUp();
515  virtual void orbitUp( double rads );
517 
519  virtual void startOrbitingDown();
522  virtual void stopOrbitingDown();
523  virtual void orbitDown( double rads );
525 
527  virtual void setLocation( double x, double y, double z);
528 
532  virtual void setAttachedLocation( double x, double y, double z ) override;
533  virtual void setAttachedX( double x ) override;
534  virtual void setAttachedY( double y ) override;
535  virtual void setAttachedZ( double z ) override;
536  virtual void getAttachedPosition( double& x, double& y, double& z ) const override;
537 
539  virtual void setOrientation( double psi, double theta, double phi );
540 
542  virtual void setTopographicOrientation( double psi, double theta, double phi );
543 
545  virtual void setOrientation( double x, double y, double z, double w);
546 
548  virtual void setAttachedOrientation( double psi, double theta, double phi ) override;
549  virtual void setAttachedYaw(double psi) override;
550  virtual void setAttachedPitch(double theta) override;
551  virtual void setAttachedRoll(double phi) override;
553  virtual void getAttachedOrientation(double& psi, double& theta, double& phi) const override;
555  virtual void getAttachedOrientationByDecomp(double& psi, double& theta, double& phi) const;
556 
558  virtual void setAttachedOrientation( double x, double y, double z,
559  double w);
560 
563  void setLocalModelScalingEnabled( bool enabled );
564 
567  void setLocalModelScalingAmount( float amount );
568 
571  virtual void jumpTo( double x, double y, double z );
572 
574  virtual void jumpTo( DtUniqueID elementID );
575 
576  virtual void orientTo( double x, double y, double z );
577 
579  virtual void dragTerrain( double lastX, double lastY, double lastZ,
580  double currX, double currY, double currZ );
581 
582  virtual void dragTerrain2( double myStartDragX, double myStartDragY,
583  double myStartDragZ, int deltaMouseX, int deltaMouseY );
584 
585  virtual void dragGravityUp( double windowUnits );
586  virtual void dragGravityDown( double windowUnits );
587  virtual void dragGravityLeft( double windowUnits );
588  virtual void dragGravityRight( double windowUnits );
589  virtual void scrollObserverForward( int wheelUnits );
590  virtual void scrollObserverBack( int wheelUnits );
591  virtual void scrollLevelObserverForward( int wheelUnits );
592  virtual void scrollLevelObserverBack( int wheelUnits );
593 
594  virtual void scrollFlashlightWider( int wheelUnits );
595  virtual void scrollFlashlightNarrower( int wheelUnits );
596 
598  virtual float flashlightAngle();
599 
600  //{@
602  virtual void startIncreasingViewResolution();
603  virtual void stopIncreasingViewResolution();
604  virtual void increaseViewResolution();
605 
606  virtual void startDecreasingViewResolution();
607  virtual void stopDecreasingViewResolution();
608  virtual void decreaseViewResolution();
609 
610  // Sets the view resolution in meters per pixel.
611  virtual void setViewResolution( double resolution);
612 
613  // Get the current view resolution.
614  virtual double viewResolution() const;
615 
621  virtual void setCurrentViewMagnification( double mag );
622 
624  virtual double currentViewMagnification() const;
625 
627 
628  //
630  //
631 
633  virtual void setOrbitSpeed( double speed );
634 
636  virtual void setLinearSpeed( double speed );
637 
639  virtual void setRotationSpeed( double speed );
640 
642  virtual void setMinLinearSpeed( double minSpeed );
643 
645  virtual void setMaxLinearSpeed( double maxSpeed );
646 
648  virtual void setLinearScaledSpeedGain( double gain );
649 
655  virtual void gotoTerrainCenter( DtUniqueID terrainPatch, bool retry );
656 
658  virtual void resetAttachment();
659 
660  virtual void resetOrientation();
661 
663  virtual void resetCamera();
664  virtual void level();
665 
666  virtual void stopAll();
667 
668  virtual void attachToObjects( const std::vector<DtUniqueID>& elementIds );
669  virtual void setSecondaryAttachment( const std::vector<DtUniqueID>& elementIds );
670  virtual void setLocationTrackAttachment( const osg::Vec3d& location );
671  virtual void setLocationTrackAttachment( double x, double y, double z );
672 
673  virtual void attachToPart( int partId);
674  virtual void detach();
675  virtual void setAttachType( DtObserverObject::AttachType type );
676  virtual void setHideModelOnAttach( bool hide );
677 
680  virtual void setUsesBoundingVolumeForAttachedOffsets(bool useBoundingVolume);
681 
684  virtual bool usesBoundingVolumeForAttachedOffsets() const;
685 
689  virtual void setAttachmentHas3DCockpit( bool cockpit );
690 
691  virtual void scaleCurrentAttachments( bool scaled );
692  virtual void setOrientToTargetConstraint( bool orient );
693  virtual void setOrbiting( bool orbit );
694  virtual void setOrientCameraToTargetConstraint( bool orient );
695 
696  virtual void setConstrainToTerrain( bool trueFalse );
697  virtual void setConstrainToCenter( bool trueFalse );
698 
701  virtual void suppressConstrainToTerrain( bool trueFalse );
702 
703  virtual void setSpeedScaling( bool trueFalse );
704 
706  virtual void setSpeedScaledSpeed( double speed );
707 
709  virtual void getLocation(double &x, double &y, double& z) const;
711  virtual void getObserverPosition(double &x, double &y, double& z) const;
712  virtual void getEffectiveLocation(double &x, double &y, double& z) const;
714 
716  virtual void getObserverCameraPosition(double& x, double& y, double& z) const;
717 
719  virtual void getOrientation( double& psi, double& theta, double& phi ) const;
720 
723  virtual void getObserverCameraOrientation(double& psi, double& theta, double& phi, bool includeShake) const;
724 
726  virtual void getTopographicOrientation( double& psi, double& theta, double& phi ) const;
727 
728  virtual void getOrientation( double& x, double& y, double& z, double& w ) const;
729 
730  virtual void getFlashlightOrientation( double& x, double& y, double& z, double& w ) const;
731 
734  virtual void getObserverPlatformFront(double& x, double& y, double& z) const;
735 
738  virtual void getObserverPlatformUp(double& x, double& y, double& z) const;
739 
742  virtual void getObserverPlatformRight(double& x, double& y, double& z) const;
743 
746  virtual void getObserverCameraFront(double& x, double& y, double& z, bool includeShake) const;
747 
749  virtual void getObserverCameraUp(double& x, double& y, double& z, bool includeShake) const;
750 
752  virtual void getObserverCameraRight(double& x, double& y, double& z, bool includeShake) const;
753 
754  virtual void getCameraUp(double& x, double& y, double& z);
755 
756  virtual void getCameraFront(double& x, double& y, double& z);
757 
758  virtual void getCameraRight(double& x, double& y, double& z);
759 
761  virtual void setCameraShakeRotation(double x, double y, double z, double w);
762 
764  virtual void getCameraShakeRotation(double& x, double& y, double& z, double& w);;
765 
768 // virtual double calculate2DAltitude();
769 
770 
773  virtual double heightAboveTerrainFromCurrentZoom(double magnification = 1.) const;
774 
778  virtual double altitudeFromCurrentZoom(double magnification=1.) const;
779 
782  virtual double zoomFromHeightAboveTerrain(double hat, double magnification=1) const;
783 
786  virtual double zoomFromAltitude(double altitude, double magnification=1.) const;
787 
788 
792  virtual double zoomFromCurrentAltitude() const;
793 
796  virtual double topographicHeading() const;
797 
799  virtual void getLinearVelocity(double &x, double &y, double &z) const;
800 
802  virtual void getRotationalVelocity( double& x, double& y, double& z) const;
803 
807  virtual void setModeSetting( int setting, bool value );
808 
811  virtual void setNorthType(DtObserverObject::NorthType northType);
812 
814  virtual std::vector<DtUniqueID> currentAttachments() const;
815 
818 
819  virtual const osg::Vec3d& locationTrackAttachmentVec3d() const;
820  virtual void getLocationTrackAttachment( double& x, double& y, double& z ) const;
822 
826  virtual DtObserverObject::AttachType attachType3D() const;
827 
831  virtual DtObserverObject::AttachType attachType2D() const;
832 
834  virtual bool attachedObjectHidden() const;
835 
839  virtual bool attachmentHas3DCockpit() const;
840 
843  virtual osg::Vec3d attachedOffsetVector() const;
844 
849  virtual double attachedNearClipOffset() const;
850 
852  virtual double heightAboveTerrain() const;
853 
855  virtual double heightOfTerrain() const;
856 
858  virtual const DtIntersectorsContainer* intersectorsContainer(void) const;
859 
861  virtual DtIntersectorsContainer* intersectorsContainer(void);
862 
863  protected:
864 
866  virtual bool shouldOrientToGlobeCenter();
867 
869  virtual void adjustToGlobeCurvature();
870 
872  virtual bool shouldRotateGlobe();
873 
874  virtual void calcObserverWorldVectors();
875  virtual const osg::Vec3d& observerWorldUp() const;
876  virtual const osg::Vec3d& observerWorldNorth() const;
877  virtual const osg::Vec3d& observerWorldEast() const;
878 
879  virtual const osg::Vec3d& attachedWorldUp() const;
880 
881  virtual osg::Vec3d& observerUp();
882  virtual osg::Vec3d& observerFront();
883  virtual osg::Vec3d& observerRight();
884  virtual void observerBasis(osg::Vec3d& up, osg::Vec3d& front, osg::Vec3d& right);
885 
886  virtual osg::Vec3d& attachedUp();
887  virtual osg::Vec3d& attachedFront();
888  virtual osg::Vec3d& attachedRight();
889 
890  virtual osg::Vec3d& attachedOffsetUp();
891  virtual osg::Vec3d& attachedOffsetFront();
892  virtual osg::Vec3d& attachedOffsetRight();
893 
895  virtual osg::Vec3d& levelAttachedUp();
896  virtual osg::Vec3d& levelAttachedFront();
897  virtual osg::Vec3d& levelAttachedRight();
898 
900  virtual osg::Vec3d& levelObserverMimicUp();
901  virtual osg::Vec3d& levelObserverMimicFront();
902  virtual osg::Vec3d& levelObserverMimicRight();
903 
904  virtual osg::Vec3d& cameraUp();
905  virtual osg::Vec3d& cameraFront();
906  virtual osg::Vec3d& cameraRight();
907 
908  virtual osg::Vec3d& levelObserverUp();
909  virtual osg::Vec3d& levelObserverFront();
910  virtual osg::Vec3d& levelObserverRight();
911 
912  virtual void advanceOrbitLeft( double rads );
913  virtual void advanceOrbitRight( double rads );
914  virtual void advanceOrbitUp( double rads );
915  virtual void advanceOrbitDown( double rads );
916 
917  virtual void makeLevelObserverMatrix();
918 
920  virtual void calculateLevelAttachedRotation();
921 
923  virtual void makeLevelObserverMimicMatrix();
924 
928  virtual osg::Vec3d calcWorldPositionChange();
929 
930  virtual osg::Vec3d calcMimicPositionChange();
931 
932  virtual osg::Vec3d calcAttachedPosition(const osg::Quat& attInverse, const osg::Vec3d& attachedAdvance);
933  virtual osg::Vec3d calcAttachedAdvance(const osg::Quat& tetherTrackInverse);
934 
935  virtual osg::Vec3d calcFollowPositionChange();
936  virtual osg::Vec3d calcSpaceFollowPositionChange();
937  virtual osg::Vec3d calcTetherPositionChange();
938  virtual osg::Vec3d calcTetherTrackPositionChange();
939 
940  virtual osg::Vec3d calcTrackPositionChange();
941  virtual osg::Quat calcTetherTrackRotation();
942 
943  virtual osg::Quat calcFlashlightOrientationChange();
944  virtual osg::Quat calcWorldOrientationChange();
945  virtual osg::Quat calcTetherOrientationChange();
946  virtual osg::Quat calcMimicOrientationChange();
947  virtual osg::Quat calcFollowOrientationChange();
948 
949  virtual void setCurrentAttachmentsVisibility( bool visible );
950 
957 
960  virtual void orientTo( const osg::Vec3d& target );
961 
963  virtual void orientCameraTo( const osg::Vec3d& target );
964 
965  virtual TerrainResult getTerrainCenter( const DtUniqueID& patchID, osg::Vec3d& center );
966 
967  virtual DtCoordinateConverter& coordinateConverter();
968  virtual const DtCoordinateConverter& coordinateConverter() const;
969 
970  virtual void initializeAttachment();
971 
972  virtual const osg::Vec3d& scalingIntersection() const;
973  virtual void getViewIntersection();
974 
976  virtual double linearSpeed();
977 
979  virtual double speedScalingGain() const;
980 
981  virtual void calcTerrainConstraint(const osg::Vec3d& prev );
982 
988  virtual bool updateAttachPositionAndOrientation();
989 
990  virtual bool getSecondaryAttachPosition( osg::Vec3d& position );
991 
992  virtual void getObserverOffsetVector( double& x, double& y, double& z ) const;
993  virtual void setObserverOffsetVector( double x, double y, double z );
994 
997 
998  virtual void getCameraFromParentOffsetVector( double& x, double& y, double& z ) const;
999  virtual void getCameraFromParentRotationOffset( double& x, double& y, double& z, double& w ) const;
1001 
1002  virtual void getAttachedRotationOffset( double& x, double& y, double& z, double& w ) const;
1003  virtual void setAttachedRotationOffset( double x, double y, double z,
1004  double w );
1005 
1006  virtual void getBoundingVolume( DtSceneObject& sceneObject,
1007  osg::Vec3& bvolExtents, osg::Vec3d& bvolCenter );
1008 
1009  virtual void getBoundingVolume( DtTerrainPatchObject& patchObject,
1010  osg::Vec3& bvolExtents, osg::Vec3d& bvolCenter );
1011 
1012  virtual void setLocation( const osg::Vec3d& location, bool suppress=true );
1013 
1014  virtual bool isMoving() const;
1015  virtual bool isRotating() const;
1016 
1017  virtual double computeNearClipDistance( DtSceneObject* sceneObject );
1018  virtual float computeLocalModelScalingAmount( DtSceneObject* sceneObject );
1019 
1020  virtual void calcScaledSpeed();
1021  virtual bool getTerrainOrPropIntersection( const osg::Vec3d& startPos,
1022  const osg::Vec3d& endPos, osg::Vec3d& result, const osg::Node::NodeMask mask = ~DtOsgNodeFlags::FlagSupportOff) const;
1023 
1025  virtual DtSceneObject* findSceneObjectFromElement(const DtElementID& id);
1026 
1028  virtual DtTerrainPatchObject* findTerrainPatchObjectFromElement( DtElementID id );
1029  virtual DtOsgObserverObject* findObserverObjectFromElement( DtElementID id );
1030 
1031  virtual void getPositionAndOrientation( DtSceneObject& sceneObject, osg::Vec3d& position,
1032  osg::Vec3d& orientToPosition, osg::Quat& orientation );
1033 
1034  virtual void getPositionAndOrientation( DtTerrainPatchObject& patchObject, osg::Vec3d& position,
1035  osg::Vec3d& orientToPosition, osg::Quat& orientation );
1036 
1037  virtual void getPositionAndOrientation( DtOsgObserverObject& observerObject, osg::Vec3d& position,
1038  osg::Vec3d& orientToPosition, osg::Quat& orientation );
1039 
1041  virtual void getPositionFromSceneObject( DtSceneObject& sceneObject, osg::Vec3d& position ) const;
1042 
1044  virtual void getPositionFromObserverObject( DtOsgObserverObject& observerObject, osg::Vec3d& position ) const;
1045 
1048  virtual bool getPartPositionOriFromSceneObject( DtSceneObject& sceneObject,
1049  int partId, osg::Vec3d& position, osg::Quat& ori ) const;
1050 
1053  virtual void force2D();
1054 
1056  virtual void dimensionChanged( bool is2D );
1057  virtual void setIs2D( bool is2D );
1058 
1060  virtual double calculate3DAltitude() const;
1061 
1063  virtual void calculateAltitude();
1064 
1065  // Sends the location of the observer on the master to all others; only used
1066  // if different
1067  virtual void synchronizeLocation( double x, double y, double z );
1068 
1069  // Sends the orientation of the observer on the master to all others; only used
1070  // if different
1071  virtual void synchronizeOrientation( double x, double y, double z, double w );
1072 
1088  virtual void calcHeightAboveTerrain(bool force=false);
1089 
1091  std::list<DtChannel*> findChannels();
1094  std::list<const DtChannel*> findChannels() const;
1096 
1105  virtual double frustumPixelHeight() const;
1106 
1108  virtual void slot_coordinateSystemChanged();
1109 
1111  virtual void cache3DOffsetAndRotation();
1112 
1114  virtual void restoreAttachOffsetsFrom3DCache();
1115 
1116 
1119  virtual void slot_dateChanged();
1120 
1123  virtual bool getAttachedToBoundingVolume(DtSceneObject* const sceneObject, osg::Vec3d& boundingVolumeCenter, osg::Vec3& boundingVolumeExtents,
1124  double& maxOffset, double& maxExtent);
1125 
1128  virtual bool setupAttachOffsetsAfterReset(DtSceneObject* const sceneObject, osg::Vec3d boundingVolumeCenter, osg::Vec3 boundingVolumeExtents,
1129  double maxOffset, double maxExtent);
1130 
1134  virtual void setupAttachOffsets(double maxExtent);
1135 
1138  virtual void reinitializeAfterBoundingVolumeChange();
1139 
1142  virtual void resetAfterBoundingVolumeChange();
1143 
1144  protected:
1145 
1146  static const double theObserverBoundingSphere;
1148 
1149  static const double theMaxTerrainRetryTime;
1150 
1151  // below this altitude, ignore myConstrainToCenter
1152  static const double theCenterConstrainHeight;
1153 
1154  // Zoom won't get any smaller than this
1155  static const double theMinViewResolution;
1156 
1157  // Zoom won't get any larger than this
1158  static const double theMaxViewResolution;
1159 
1160 
1161  protected:
1162 
1164 
1165  std::vector<DtUniqueID> myCurrentAttachments;
1166  std::vector<DtUniqueID> mySecondaryAttachments;
1168 
1172 
1175 
1176  //
1178  //
1187 
1190 
1193 
1196 
1199 
1202 
1204 
1206 
1208  osg::Vec3d myDragMove;
1209 
1211 
1212  osg::Vec3d myOrbitAdvance;
1213 
1219 
1222 
1225  osg::Quat myMasterRotation;
1226 
1229 
1232 
1237 
1240 
1243 
1248 
1254 
1255  //bool myGlobeObserverMode;
1257 
1260 
1262  {
1263  public:
1264 
1266  {
1267  Stopped = 0,
1268  Forward = 1,
1269  Backward = 2,
1270  Left = 4,
1271  Right = 8,
1272  Up = 16,
1273  Down = 32
1274  };
1275 
1277  : myState(Stopped)
1278  {
1279  }
1280 
1282  inline void applyMovement(double linearDistance)
1283  {
1284  if(moving(Right)) myAdvance[0] += linearDistance;
1285  if(moving(Left)) myAdvance[0] -= linearDistance;
1286  if(moving(Forward)) myAdvance[1] += linearDistance;
1287  if(moving(Backward)) myAdvance[1] -= linearDistance;
1288  if(moving(Up)) myAdvance[2] += linearDistance;
1289  if(moving(Down)) myAdvance[2] -= linearDistance;
1290  }
1291 
1293  inline const osg::Vec3d& advance() const
1294  {
1295  return myAdvance;
1296  }
1297 
1298  inline void stop()
1299  {
1300  myState = Stopped;
1301  myAdvance.set(0.0,0.0,0.0);
1302  myEuler.set(0.0,0.0,0.0);
1303  }
1304 
1305  inline void clearAdvance()
1306  {
1307  myAdvance.set(0.0,0.0,0.0);
1308  }
1309 
1310  inline bool stopped()
1311  {
1312  return myState == Stopped;
1313  }
1314 
1315  inline bool moving() const
1316  {
1317  return myState != Stopped;
1318  }
1319 
1320  inline bool moving(Direction d) const
1321  {
1322  return (myState & d) != 0;
1323  }
1324 
1325  inline void setMoving(Direction d, bool moving)
1326  {
1327  myState = moving ? myState | d : myState & ~d;
1328  }
1329 
1330  enum Angle
1331  {
1332  YawLeft = 1,
1333  YawRight = 2,
1334  PitchUp = 4,
1335  PitchDown = 8,
1336  RollLeft = 16,
1337  RollRight = 32
1338  };
1339 
1340  inline void applyRotation(double angle)
1341  {
1342  if(rotating(YawRight)) myEuler[0] -= angle;
1343  if(rotating(YawLeft)) myEuler[0] += angle;
1344  if(rotating(PitchUp)) myEuler[1] += angle;
1345  if(rotating(PitchDown)) myEuler[1] -= angle;
1346  if(rotating(RollRight)) myEuler[2] += angle;
1347  if(rotating(RollLeft)) myEuler[2] -= angle;
1348  }
1349 
1350  inline const osg::Vec3d& euler() const
1351  {
1352  return myEuler;
1353  }
1354 
1355  inline osg::Vec3d& euler()
1356  {
1357  return myEuler;
1358  }
1359 
1360  inline void level()
1361  {
1362  myEuler.set(0.0,0.0,0.0);
1363  }
1364 
1365  inline bool rotating() const
1366  {
1367  return myState != Stopped;
1368  }
1369 
1370  inline bool rotating( Angle d ) const
1371  {
1372  return (myState & d) != 0;
1373  }
1374 
1375  inline void setRotating( Angle d, bool rotating )
1376  {
1377  myState = rotating ? myState | d : myState & ~d;
1378  }
1379 
1380  protected:
1381 
1385  osg::Vec3d myAdvance;
1386  osg::Vec3d myEuler;
1387 
1388  unsigned char myState;
1389  };
1390 
1395 
1400 
1402 
1407 
1411 
1417 
1421 
1422  //
1431 
1435 
1439 
1441  osg::Vec3d myCameraOffset;
1443  osg::Quat myCameraRotation;
1444 
1445  osg::Vec3d myObserverWorldUp;
1448 
1449  osg::Vec3d myAttachedWorldUp;
1452 
1453  osg::Vec3d myObserverUp;
1454  osg::Vec3d myObserverFront;
1455  osg::Vec3d myObserverRight;
1456 
1457  osg::Vec3d myLevelObserverUp;
1460 
1461  osg::Vec3d myAttachedUp;
1462  osg::Vec3d myAttachedFront;
1463  osg::Vec3d myAttachedRight;
1464 
1465  osg::Vec3d myLevelAttachedUp;
1468 
1472 
1476 
1477  osg::Vec3d myCameraUp;
1478  osg::Vec3d myCameraFront;
1479  osg::Vec3d myCameraRight;
1480 
1482 
1487 
1489 
1492 
1495 
1504  // force an orientation reset AFTER the next time the observer position is updated
1505  // Needed when making large attach jumps
1507 
1515 
1517 
1519  osg::Vec3d myViewIntersect;
1520 
1522  mutable osg::Vec3d myMutableDownIntersect;
1523 
1524  osg::Vec3d myAttachPosition;
1525 
1528 
1532 
1533  double myAltitude;
1534 
1539 
1543 
1544  typedef std::unordered_map<DtElementID, bool> ElementVisibilityMap;
1546 
1547  // Paged terrain initialization
1555 
1556  // Used for speed scaling, this is the same as myHeightAboveTerrain
1557  // when unattached, but the distance from the attached entity when
1558  // attached
1560 
1561  // curvature adjustment
1565 
1566  osg::Quat myCameraShakeRot;
1567 
1569 
1570  DtIntersectorsContainer* myIntersectors = nullptr;
1571 
1573 
1576  DtCoordinateSystem* myCoordinateSystem = nullptr;
1577  };
1578 
1579 }
osg::Quat myCameraRotation
This is the camera (wrt the observer) as a quaternion.
Definition: DtOsgObserverObject.h:1443
osg::Vec3d myDragMove
Change in world position due to drag.
Definition: DtOsgObserverObject.h:1208
osg::Vec3d myMutableDownIntersect
Definition: DtOsgObserverObject.h:1522
Definition: DtOsgObserverObject.h:57
bool myHaveViewIntersect
Definition: DtOsgObserverObject.h:1518
void setRotating(Angle d, bool rotating)
Definition: DtOsgObserverObject.h:1375
ElementVisibilityMap myPendingVisibilityState
Definition: DtOsgObserverObject.h:1545
bool myAttachmentHas3DCockpit
Definition: DtOsgObserverObject.h:1484
osg::Vec3d myLevelObserverMimicUp
Definition: DtOsgObserverObject.h:1469
osg::Vec3d myAttachedWorldEast
Definition: DtOsgObserverObject.h:1451
bool myHave3DOffsetCache
Definition: DtOsgObserverObject.h:1249
int myOrientToTargetConstraint
This is an int rather than a bool because we increment/decrement it, much like a reference pointer...
Definition: DtOsgObserverObject.h:1500
osg::Vec3d myObserverUp
Definition: DtOsgObserverObject.h:1453
double myHeightOfTerrain
Definition: DtOsgObserverObject.h:1554
std::vector< DtUniqueID > myCurrentAttachments
Definition: DtOsgObserverObject.h:1165
double myStartGotoTerrainCenterTime
Definition: DtOsgObserverObject.h:1550
static const unsigned int FlagSupportOff
Is this node part of support (whether or not other scene objects can ground clamp to this model) ...
Definition: DtOsgNodeTraversalFlags.h:22
osg::Quat myLevelAttachedRotation
Definition: DtOsgObserverObject.h:1239
osg::Vec3d myAttachedOffsetUp
Definition: DtOsgObserverObject.h:1473
osg::Vec3d myAttachedOffsetRight
Definition: DtOsgObserverObject.h:1475
osg::Vec3d myOrbitAdvance
Definition: DtOsgObserverObject.h:1212
DtCoordinateConverter is the base class for &#39;local (cig) to geocentric&#39; converters.
Definition: DtCoordinateConverter.h:25
osg::Vec3d myCameraRight
Definition: DtOsgObserverObject.h:1479
osg::Vec3d myCameraUp
Definition: DtOsgObserverObject.h:1477
double myHeightAboveTerrain
Definition: DtOsgObserverObject.h:1553
double myMaxLinearSpeed
Need just these, for terrain scaling.
Definition: DtOsgObserverObject.h:1413
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
double myLinearSpeed
Definition: DtOsgObserverObject.h:1409
This form is used for doing level (&#39;flying carpet&#39;) style movements.
Definition: DtOsgObserverObject.h:1261
osg::Vec3d myLevelAttachedFront
Definition: DtOsgObserverObject.h:1466
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
bool myOrbitingLeft
Definition: DtOsgObserverObject.h:1403
osg::Vec3d myObserverPosition
Change in observer position this frame.
Definition: DtOsgObserverObject.h:1198
Contains makVrv:DtOsgNodeTraversalFlags class.
Utility class that contains intersectors for all model sets in the system (3d, xr, 2d) Use an object of this class when all models sets can be possibly needed. When you know which model set you need, you can just use the DtIntersectorCreator to create an intersector for a model set Models sets corresponding to 3d, xr and 2d are created by default (these correspond to values of 0, 1 and 5) Additional model sets can be registered with DtIntersectorsContainer::registerModelSet.
Definition: DtIntersectorsContainer.h:37
MotionState myFlashlightRotatingState
Definition: DtOsgObserverObject.h:1401
osg::Vec3d myLocationAttachPoint
Definition: DtOsgObserverObject.h:1568
osg::Vec3d my2DTo3DCachedObserverOffsetVector
Definition: DtOsgObserverObject.h:1245
osg::Vec3d myLevelAttachedPosition
Definition: DtOsgObserverObject.h:1205
double mySceneCenterOffsetX
Definition: DtOsgObserverObject.h:1418
void level()
Definition: DtOsgObserverObject.h:1360
bool mySpeedScaling
Definition: DtOsgObserverObject.h:1485
bool myViewResolutionDecreasingState
Definition: DtOsgObserverObject.h:1537
osg::Vec3d myLevelObserverFront
Definition: DtOsgObserverObject.h:1458
double myViewResolution
Definition: DtOsgObserverObject.h:1538
bool myLookingUp
Definition: DtOsgObserverObject.h:1427
osg::Vec3d myAttachedOffsetFront
Definition: DtOsgObserverObject.h:1474
osg::Matrixd myLevelObserverRotationMatrix
Definition: DtOsgObserverObject.h:1242
bool myOrbitingUp
Definition: DtOsgObserverObject.h:1405
static const double theCenterConstrainHeight
Definition: DtOsgObserverObject.h:1152
void applyMovement(double linearDistance)
Update the advance based upon the movement.
Definition: DtOsgObserverObject.h:1282
std::unordered_map< DtElementID, bool > ElementVisibilityMap
Definition: DtOsgObserverObject.h:1544
TerrainResult
Definition: DtOsgObserverObject.h:54
bool myOrbitingDown
Definition: DtOsgObserverObject.h:1406
bool myInternalSuppressConstrainToTerrain
suppress when jumping...
Definition: DtOsgObserverObject.h:1491
osg::Vec3d myObserverWorldUp
Definition: DtOsgObserverObject.h:1445
bool rotating(Angle d) const
Definition: DtOsgObserverObject.h:1370
osg::Vec3d myAttachedWorldNorth
Definition: DtOsgObserverObject.h:1450
osg::Vec3d myLevelObserverRight
Definition: DtOsgObserverObject.h:1459
bool myHaveTerrainPivot
Definition: DtOsgObserverObject.h:1516
const osg::Vec3d & advance() const
Get the current movement advance.
Definition: DtOsgObserverObject.h:1293
osg::Vec3d myAttachedFront
Definition: DtOsgObserverObject.h:1462
osg::Vec3d myLevelAttachedUp
Definition: DtOsgObserverObject.h:1465
osg::Quat myAttachedRotationOffset
My Attached rotation offset.
Definition: DtOsgObserverObject.h:1221
osg::Quat myPreviousAttachedObserverRotation
This is here so we can be in tether attach mode, detach, then attach to another entity and have a rea...
Definition: DtOsgObserverObject.h:1236
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
double mySpeedScaleHeightEquivalent
Definition: DtOsgObserverObject.h:1559
MotionState myAbsoluteLevelRotatingState
Definition: DtOsgObserverObject.h:1399
osg::Quat my2DTo3DCachedObserverRotationOffset
Definition: DtOsgObserverObject.h:1247
unsigned char myState
Definition: DtOsgObserverObject.h:1388
bool myLookingTiltLeft
Definition: DtOsgObserverObject.h:1430
DtSignalConnectionManager myConnections
Definition: DtOsgObserverObject.h:1572
double myLinearScaledSpeedGain
Definition: DtOsgObserverObject.h:1415
osg::Vec3d myObserverPositionVector
— Observer
Definition: DtOsgObserverObject.h:1180
bool myLookingLeft
Definition: DtOsgObserverObject.h:1426
osg::Vec3d myPreviousOffsetVector
Definition: DtOsgObserverObject.h:1531
bool myGotoTerrainCenterPending
Definition: DtOsgObserverObject.h:1548
A DtTerrainPatchObject contains the methods for loading a file as a terrain. When loading a file as a...
Definition: DtTerrainPatchObject.h:35
static const double theHeightAboveTerrainUpdatePeriod
Definition: DtOsgObserverObject.h:1147
bool myOrientToOnReset
Definition: DtOsgObserverObject.h:1502
bool myViewResolutionIncreasingState
Currently for 2D only, these variables will be ignored if projecting in 3D mode.
Definition: DtOsgObserverObject.h:1536
osg::Vec3d myObserverWorldEast
Definition: DtOsgObserverObject.h:1447
double mySceneCenterOffsetZ
Definition: DtOsgObserverObject.h:1420
MotionState myRotatingState
Definition: DtOsgObserverObject.h:1396
const osg::Vec3d & euler() const
Definition: DtOsgObserverObject.h:1350
osg::Matrixd myLevelObserverMimicRotationMatrix
Definition: DtOsgObserverObject.h:1241
double myAltitude
Definition: DtOsgObserverObject.h:1533
osg::Quat myAttachedRotation
Definition: DtOsgObserverObject.h:1238
osg::Vec3d myLevelObserverMimicFront
Definition: DtOsgObserverObject.h:1470
osg::Vec3d mySavedObserverOffsetVector
Used for switching between track mode and other attached modes.
Definition: DtOsgObserverObject.h:1195
osg::Vec3d myMasterPositionVector
Definition: DtOsgObserverObject.h:1182
bool myExternalSuppressConstrainToTerrain
suppress when told to
Definition: DtOsgObserverObject.h:1494
float myFlashlightAngle
Definition: DtOsgObserverObject.h:1564
bool myHideModelOnAttach
Definition: DtOsgObserverObject.h:1483
double myAttachedRoll
Definition: DtOsgObserverObject.h:1171
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
bool myMovedSinceLastHAT
Definition: DtOsgObserverObject.h:1563
bool myLocalModelScalingEnabled
Definition: DtOsgObserverObject.h:1188
bool moving() const
Definition: DtOsgObserverObject.h:1315
Contains makVrv::DtObserverObject class declaration.
bool myChanged
Definition: DtOsgObserverObject.h:1173
void applyRotation(double angle)
Definition: DtOsgObserverObject.h:1340
int myPartAttachment
Definition: DtOsgObserverObject.h:1167
osg::Quat myFinalCameraRotation
This is the combined camera/observer orientation; this is what the DtOsgChannel uses to orient itself...
Definition: DtOsgObserverObject.h:1434
Direction
Definition: DtOsgObserverObject.h:1265
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:35
MotionState myAttachedObserverState
Definition: DtOsgObserverObject.h:1393
static const double theMaxTerrainRetryTime
Definition: DtOsgObserverObject.h:1149
MotionState myRotatingLevelState
Definition: DtOsgObserverObject.h:1397
osg::Vec3d my2DTo3DCachedObserverPosition
Definition: DtOsgObserverObject.h:1244
osg::Quat myMasterRotation
Definition: DtOsgObserverObject.h:1225
double myAttachedYaw
Definition: DtOsgObserverObject.h:1169
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtSignalConnectionManager myAttachmentBoundingVolumeSignals
Definition: DtOsgObserverObject.h:1163
osg::Vec3d myLastSpeedPositionVector
Definition: DtOsgObserverObject.h:1181
osg::Vec3d myLevelObserverUp
Definition: DtOsgObserverObject.h:1457
Contains makVrv::DtQuat class.
DtUniqueID myPendingTerrainPatchId
Definition: DtOsgObserverObject.h:1551
bool rotating() const
Definition: DtOsgObserverObject.h:1365
DtObserverObject::AttachType my3DAttachType
Definition: DtOsgObserverObject.h:1481
NorthType
Definition: DtObserverObject.h:62
double myHeightAboveTerrainTimer
Definition: DtOsgObserverObject.h:1486
double mySceneCenterOffsetY
Definition: DtOsgObserverObject.h:1419
osg::Vec3d myFinalCameraPositionVector
This is the combined camera/observer orientation; this is what the DtOsgChannel uses to orient itself...
Definition: DtOsgObserverObject.h:1438
bool myConstrainToCenter
This variable is true when the bounding radius is too big The reset view will be from far away trying...
Definition: DtOsgObserverObject.h:1256
bool myIsChangingDimension
Definition: DtOsgObserverObject.h:1250
double myCurvatureAdjustment
Definition: DtOsgObserverObject.h:1562
double myNextGotoTerrainCenterTime
Definition: DtOsgObserverObject.h:1549
static const double theMinViewResolution
Definition: DtOsgObserverObject.h:1155
Angle
Definition: DtOsgObserverObject.h:1330
MotionState myAbsoluteRotatingState
Definition: DtOsgObserverObject.h:1398
osg::Vec3d myObserverRotationalVelocityVector
Definition: DtOsgObserverObject.h:1186
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
osg::Vec3d myPreviousTerrainCenter
Definition: DtOsgObserverObject.h:1552
bool myMutableHaveDownIntersect
Definition: DtOsgObserverObject.h:1521
bool myForceOrientReset
Definition: DtOsgObserverObject.h:1506
void stop()
Definition: DtOsgObserverObject.h:1298
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
bool myOrientCameraToTargetConstraint
Definition: DtOsgObserverObject.h:1501
osg::Vec3d myObserverFront
Definition: DtOsgObserverObject.h:1454
osg::Vec3d myObserverWorldNorth
Definition: DtOsgObserverObject.h:1446
MotionState myLevelObserverState
Definition: DtOsgObserverObject.h:1392
bool myLookingTiltRight
Definition: DtOsgObserverObject.h:1429
osg::Vec3d myObserverOffsetVector
Current offset from an attachment, when attached.
Definition: DtOsgObserverObject.h:1192
double myLastTickTime
Definition: DtOsgObserverObject.h:1174
osg::Vec3d myPreviousPositionVector
for backing out if we hit a constraint
Definition: DtOsgObserverObject.h:1530
void clearAdvance()
Definition: DtOsgObserverObject.h:1305
bool moving(Direction d) const
Definition: DtOsgObserverObject.h:1320
osg::Vec3d myEuler
Definition: DtOsgObserverObject.h:1386
osg::Quat myCameraShakeRot
Definition: DtOsgObserverObject.h:1566
osg::Quat myFlashlightRotation
Flashlight orientation offset as a quaternion.
Definition: DtOsgObserverObject.h:1228
Base class to provide boost signal/slot management.
osg::Vec3d myViewIntersect
Definition: DtOsgObserverObject.h:1519
osg::Quat my2DTo3DCachedObserverRotation
Definition: DtOsgObserverObject.h:1246
osg::Vec3d myLevelObserverMimicRight
Definition: DtOsgObserverObject.h:1471
bool mySyncPending
Definition: DtOsgObserverObject.h:1183
osg::Vec3d myAdvance
This, when scaled, will provide the direction that the observer should move in as the result of tick-...
Definition: DtOsgObserverObject.h:1385
bool myLookingRight
-— Camera
Definition: DtOsgObserverObject.h:1425
osg::Vec3d myAttachedUp
Definition: DtOsgObserverObject.h:1461
DT_DLL_vrfutil double mag(double x[3])
osg::Vec3d myCameraOffset
This is the camera offset wrt to observer.
Definition: DtOsgObserverObject.h:1441
osg::Quat mySavedObserverRotation
This is used for switching between track mode and other attach modes.
Definition: DtOsgObserverObject.h:1231
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:44
osg::Vec3d myLevelAttachedRight
Definition: DtOsgObserverObject.h:1467
double myRotationSpeed
Definition: DtOsgObserverObject.h:1410
double myLastAttachedBvolDiameter
Definition: DtOsgObserverObject.h:1526
bool mySyncSuppressed
Definition: DtOsgObserverObject.h:1184
void setMoving(Direction d, bool moving)
Definition: DtOsgObserverObject.h:1325
double myMinLinearSpeed
Definition: DtOsgObserverObject.h:1414
osg::Quat myObserverRotation
This is our ENU observer orientation as a quaternion.
Definition: DtOsgObserverObject.h:1224
double myAttachedPitch
Definition: DtOsgObserverObject.h:1170
Contains DLL export macros.
double myLastAttachBvolOffset
Definition: DtOsgObserverObject.h:1527
MotionState myObserverState
Definition: DtOsgObserverObject.h:1391
osg::Vec3d myObserverLinearVelocityVector
Definition: DtOsgObserverObject.h:1185
float myLocalModelScalingAmount
Definition: DtOsgObserverObject.h:1189
osg::Vec3d myAttachedWorldUp
Definition: DtOsgObserverObject.h:1449
bool stopped()
Definition: DtOsgObserverObject.h:1310
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
std::vector< DtUniqueID > mySecondaryAttachments
Definition: DtOsgObserverObject.h:1166
osg::Vec3d myAttachPosition
Definition: DtOsgObserverObject.h:1524
A utility Quaternion class.
Definition: DtQuat.h:19
osg::Vec3d myOrientToPosition
Definition: DtOsgObserverObject.h:1210
bool myOrbitingRight
Definition: DtOsgObserverObject.h:1404
double myLastViewMagnification
Definition: DtOsgObserverObject.h:1542
osg::Vec3d myAttachedPosition
Definition: DtOsgObserverObject.h:1203
double myOrbitSpeed
Definition: DtOsgObserverObject.h:1408
static const double theMaxViewResolution
Definition: DtOsgObserverObject.h:1158
MotionState myLevelAttachedObserverState
Definition: DtOsgObserverObject.h:1394
DtModelSetId
Definition: DtModelSetEnums.h:19
bool myConstrainToTerrain
Definition: DtOsgObserverObject.h:1488
bool myUsesBoundingVolumeForAttachedOffsets
Whether or not the observer is using bounding volumes for attached offsets. This is all the time for ...
Definition: DtOsgObserverObject.h:1514
double myCurrentViewMagnification
Only used in 3D.
Definition: DtOsgObserverObject.h:1541
osg::Vec3d myObserverRight
Definition: DtOsgObserverObject.h:1455
bool myOrbiting
Definition: DtOsgObserverObject.h:1503
osg::Vec3d myCameraFront
Definition: DtOsgObserverObject.h:1478
bool myLookingDown
Definition: DtOsgObserverObject.h:1428
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtOsgObserverObject.h:49
osg::Vec3d myLevelObserverPosition
Gravity change in observer position this frame.
Definition: DtOsgObserverObject.h:1201
double myCurrentObserverDistance
largest of the distances currently in play in a given frame. This is how far we&#39;ll advance...
Definition: DtOsgObserverObject.h:1218
double mySpeedScaleSpeed
Definition: DtOsgObserverObject.h:1416
static const double theObserverBoundingSphere
Definition: DtOsgObserverObject.h:1146
osg::Vec3d myAttachedRight
Definition: DtOsgObserverObject.h:1463
osg::Vec3d & euler()
Definition: DtOsgObserverObject.h:1355
AttachType
Definition: DtObserverObject.h:42
MotionState()
Definition: DtOsgObserverObject.h:1276

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)