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) 2022 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;
552  virtual void getAttachedOrientation(double& psi, double& theta, double& phi) const override;
553 
555  virtual void setAttachedOrientation( double x, double y, double z,
556  double w);
557 
560  void setLocalModelScalingEnabled( bool enabled );
561 
564  void setLocalModelScalingAmount( float amount );
565 
568  virtual void jumpTo( double x, double y, double z );
569 
571  virtual void jumpTo( DtUniqueID elementID );
572 
573  virtual void orientTo( double x, double y, double z );
574 
576  virtual void dragTerrain( double lastX, double lastY, double lastZ,
577  double currX, double currY, double currZ );
578 
579  virtual void dragTerrain2( double myStartDragX, double myStartDragY,
580  double myStartDragZ, int deltaMouseX, int deltaMouseY );
581 
582  virtual void dragGravityUp( double windowUnits );
583  virtual void dragGravityDown( double windowUnits );
584  virtual void dragGravityLeft( double windowUnits );
585  virtual void dragGravityRight( double windowUnits );
586  virtual void scrollObserverForward( int wheelUnits );
587  virtual void scrollObserverBack( int wheelUnits );
588  virtual void scrollLevelObserverForward( int wheelUnits );
589  virtual void scrollLevelObserverBack( int wheelUnits );
590 
591  virtual void scrollFlashlightWider( int wheelUnits );
592  virtual void scrollFlashlightNarrower( int wheelUnits );
593 
595  virtual float flashlightAngle();
596 
597  //{@
599  virtual void startIncreasingViewResolution();
600  virtual void stopIncreasingViewResolution();
601  virtual void increaseViewResolution();
602 
603  virtual void startDecreasingViewResolution();
604  virtual void stopDecreasingViewResolution();
605  virtual void decreaseViewResolution();
606 
607  // Sets the view resolution in meters per pixel.
608  virtual void setViewResolution( double resolution);
609 
610  // Get the current view resolution.
611  virtual double viewResolution() const;
612 
618  virtual void setCurrentViewMagnification( double mag );
619 
621  virtual double currentViewMagnification() const;
622 
624 
625  //
627  //
628 
630  virtual void setOrbitSpeed( double speed );
631 
633  virtual void setLinearSpeed( double speed );
634 
636  virtual void setRotationSpeed( double speed );
637 
639  virtual void setMinLinearSpeed( double minSpeed );
640 
642  virtual void setMaxLinearSpeed( double maxSpeed );
643 
645  virtual void setLinearScaledSpeedGain( double gain );
646 
652  virtual void gotoTerrainCenter( DtUniqueID terrainPatch, bool retry );
653 
655  virtual void resetAttachment();
656 
657  virtual void resetOrientation();
658 
660  virtual void resetCamera();
661  virtual void level();
662 
663  virtual void stopAll();
664 
665  virtual void attachToObjects( const std::vector<DtUniqueID>& elementIds );
666  virtual void setSecondaryAttachment( const std::vector<DtUniqueID>& elementIds );
667  virtual void setLocationTrackAttachment( const osg::Vec3d& location );
668  virtual void setLocationTrackAttachment( double x, double y, double z );
669 
670  virtual void attachToPart( int partId);
671  virtual void detach();
672  virtual void setAttachType( DtObserverObject::AttachType type );
673  virtual void setHideModelOnAttach( bool hide );
674 
677  virtual void setUsesBoundingVolumeForAttachedOffsets(bool useBoundingVolume);
678 
681  virtual bool usesBoundingVolumeForAttachedOffsets() const;
682 
686  virtual void setAttachmentHas3DCockpit( bool cockpit );
687 
688  virtual void scaleCurrentAttachments( bool scaled );
689  virtual void setOrientToTargetConstraint( bool orient );
690  virtual void setOrbiting( bool orbit );
691  virtual void setOrientCameraToTargetConstraint( bool orient );
692 
693  virtual void setConstrainToTerrain( bool trueFalse );
694  virtual void setConstrainToCenter( bool trueFalse );
695 
698  virtual void suppressConstrainToTerrain( bool trueFalse );
699 
700  virtual void setSpeedScaling( bool trueFalse );
701 
703  virtual void setSpeedScaledSpeed( double speed );
704 
706  virtual void getLocation(double &x, double &y, double& z) const;
708  virtual void getObserverPosition(double &x, double &y, double& z) const;
709  virtual void getEffectiveLocation(double &x, double &y, double& z) const;
711 
713  virtual void getObserverCameraPosition(double& x, double& y, double& z) const;
714 
716  virtual void getOrientation( double& psi, double& theta, double& phi ) const;
717 
720  virtual void getObserverCameraOrientation(double& psi, double& theta, double& phi, bool includeShake) const;
721 
723  virtual void getTopographicOrientation( double& psi, double& theta, double& phi ) const;
724 
725  virtual void getOrientation( double& x, double& y, double& z, double& w ) const;
726 
727  virtual void getFlashlightOrientation( double& x, double& y, double& z, double& w ) const;
728 
731  virtual void getObserverPlatformFront(double& x, double& y, double& z) const;
732 
735  virtual void getObserverPlatformUp(double& x, double& y, double& z) const;
736 
739  virtual void getObserverPlatformRight(double& x, double& y, double& z) const;
740 
743  virtual void getObserverCameraFront(double& x, double& y, double& z, bool includeShake) const;
744 
746  virtual void getObserverCameraUp(double& x, double& y, double& z, bool includeShake) const;
747 
749  virtual void getObserverCameraRight(double& x, double& y, double& z, bool includeShake) const;
750 
751  virtual void getCameraUp(double& x, double& y, double& z);
752 
753  virtual void getCameraFront(double& x, double& y, double& z);
754 
755  virtual void getCameraRight(double& x, double& y, double& z);
756 
758  virtual void setCameraShakeRotation(double x, double y, double z, double w);
759 
761  virtual void getCameraShakeRotation(double& x, double& y, double& z, double& w);;
762 
765 // virtual double calculate2DAltitude();
766 
767 
770  virtual double heightAboveTerrainFromCurrentZoom(double magnification = 1.) const;
771 
775  virtual double altitudeFromCurrentZoom(double magnification=1.) const;
776 
779  virtual double zoomFromHeightAboveTerrain(double hat, double magnification=1) const;
780 
783  virtual double zoomFromAltitude(double altitude, double magnification=1.) const;
784 
785 
789  virtual double zoomFromCurrentAltitude() const;
790 
793  virtual double topographicHeading() const;
794 
796  virtual void getLinearVelocity(double &x, double &y, double &z) const;
797 
799  virtual void getRotationalVelocity( double& x, double& y, double& z) const;
800 
804  virtual void setModeSetting( int setting, bool value );
805 
808  virtual void setNorthType(DtObserverObject::NorthType northType);
809 
811  virtual std::vector<DtUniqueID> currentAttachments() const;
812 
815 
816  virtual const osg::Vec3d& locationTrackAttachmentVec3d() const;
817  virtual void getLocationTrackAttachment( double& x, double& y, double& z ) const;
819 
823  virtual DtObserverObject::AttachType attachType3D() const;
824 
828  virtual DtObserverObject::AttachType attachType2D() const;
829 
831  virtual bool attachedObjectHidden() const;
832 
836  virtual bool attachmentHas3DCockpit() const;
837 
840  virtual osg::Vec3d attachedOffsetVector() const;
841 
846  virtual double attachedNearClipOffset() const;
847 
849  virtual double heightAboveTerrain() const;
850 
852  virtual double heightOfTerrain() const;
853 
855  virtual const DtIntersectorsContainer* intersectorsContainer(void) const;
856 
858  virtual DtIntersectorsContainer* intersectorsContainer(void);
859 
860  protected:
861 
863  virtual bool shouldOrientToGlobeCenter();
864 
866  virtual void adjustToGlobeCurvature();
867 
869  virtual bool shouldRotateGlobe();
870 
871  virtual void calcObserverWorldVectors();
872  virtual const osg::Vec3d& observerWorldUp() const;
873  virtual const osg::Vec3d& observerWorldNorth() const;
874  virtual const osg::Vec3d& observerWorldEast() const;
875 
876  virtual const osg::Vec3d& attachedWorldUp() const;
877 
878  virtual osg::Vec3d& observerUp();
879  virtual osg::Vec3d& observerFront();
880  virtual osg::Vec3d& observerRight();
881  virtual void observerBasis(osg::Vec3d& up, osg::Vec3d& front, osg::Vec3d& right);
882 
883  virtual osg::Vec3d& attachedUp();
884  virtual osg::Vec3d& attachedFront();
885  virtual osg::Vec3d& attachedRight();
886 
887  virtual osg::Vec3d& attachedOffsetUp();
888  virtual osg::Vec3d& attachedOffsetFront();
889  virtual osg::Vec3d& attachedOffsetRight();
890 
892  virtual osg::Vec3d& levelAttachedUp();
893  virtual osg::Vec3d& levelAttachedFront();
894  virtual osg::Vec3d& levelAttachedRight();
895 
897  virtual osg::Vec3d& levelObserverMimicUp();
898  virtual osg::Vec3d& levelObserverMimicFront();
899  virtual osg::Vec3d& levelObserverMimicRight();
900 
901  virtual osg::Vec3d& cameraUp();
902  virtual osg::Vec3d& cameraFront();
903  virtual osg::Vec3d& cameraRight();
904 
905  virtual osg::Vec3d& levelObserverUp();
906  virtual osg::Vec3d& levelObserverFront();
907  virtual osg::Vec3d& levelObserverRight();
908 
909  virtual void advanceOrbitLeft( double rads );
910  virtual void advanceOrbitRight( double rads );
911  virtual void advanceOrbitUp( double rads );
912  virtual void advanceOrbitDown( double rads );
913 
914  virtual void makeLevelObserverMatrix();
915 
917  virtual void calculateLevelAttachedRotation();
918 
920  virtual void makeLevelObserverMimicMatrix();
921 
925  virtual osg::Vec3d calcWorldPositionChange();
926 
927  virtual osg::Vec3d calcMimicPositionChange();
928 
929  virtual osg::Vec3d calcAttachedPosition(const osg::Quat& attInverse, const osg::Vec3d& attachedAdvance);
930  virtual osg::Vec3d calcAttachedAdvance(const osg::Quat& tetherTrackInverse);
931 
932  virtual osg::Vec3d calcFollowPositionChange();
933  virtual osg::Vec3d calcSpaceFollowPositionChange();
934  virtual osg::Vec3d calcTetherPositionChange();
935  virtual osg::Vec3d calcTetherTrackPositionChange();
936 
937  virtual osg::Vec3d calcTrackPositionChange();
938  virtual osg::Quat calcTetherTrackRotation();
939 
940  virtual osg::Quat calcFlashlightOrientationChange();
941  virtual osg::Quat calcWorldOrientationChange();
942  virtual osg::Quat calcTetherOrientationChange();
943  virtual osg::Quat calcMimicOrientationChange();
944  virtual osg::Quat calcFollowOrientationChange();
945 
946  virtual void setCurrentAttachmentsVisibility( bool visible );
947 
954 
957  virtual void orientTo( const osg::Vec3d& target );
958 
960  virtual void orientCameraTo( const osg::Vec3d& target );
961 
962  virtual TerrainResult getTerrainCenter( const DtUniqueID& patchID, osg::Vec3d& center );
963 
964  virtual DtCoordinateConverter& coordinateConverter();
965  virtual const DtCoordinateConverter& coordinateConverter() const;
966 
967  virtual void initializeAttachment();
968 
969  virtual const osg::Vec3d& scalingIntersection() const;
970  virtual void getViewIntersection();
971 
973  virtual double linearSpeed();
974 
976  virtual double speedScalingGain() const;
977 
978  virtual void calcTerrainConstraint(const osg::Vec3d& prev );
979 
985  virtual bool updateAttachPositionAndOrientation();
986 
987  virtual bool getSecondaryAttachPosition( osg::Vec3d& position );
988 
989  virtual void getObserverOffsetVector( double& x, double& y, double& z ) const;
990  virtual void setObserverOffsetVector( double x, double y, double z );
991 
994 
995  virtual void getCameraFromParentOffsetVector( double& x, double& y, double& z ) const;
996  virtual void getCameraFromParentRotationOffset( double& x, double& y, double& z, double& w ) const;
998 
999  virtual void getAttachedRotationOffset( double& x, double& y, double& z, double& w ) const;
1000  virtual void setAttachedRotationOffset( double x, double y, double z,
1001  double w );
1002 
1003  virtual void getBoundingVolume( DtSceneObject& sceneObject,
1004  osg::Vec3& bvolExtents, osg::Vec3d& bvolCenter );
1005 
1006  virtual void getBoundingVolume( DtTerrainPatchObject& patchObject,
1007  osg::Vec3& bvolExtents, osg::Vec3d& bvolCenter );
1008 
1009  virtual void setLocation( const osg::Vec3d& location, bool suppress=true );
1010 
1011  virtual bool isMoving() const;
1012  virtual bool isRotating() const;
1013 
1014  virtual double computeNearClipDistance( DtSceneObject* sceneObject );
1015  virtual float computeLocalModelScalingAmount( DtSceneObject* sceneObject );
1016 
1017  virtual void calcScaledSpeed();
1018  virtual bool getTerrainOrPropIntersection( const osg::Vec3d& startPos,
1019  const osg::Vec3d& endPos, osg::Vec3d& result, const osg::Node::NodeMask mask = ~DtOsgNodeFlags::FlagSupportOff) const;
1020 
1022  virtual DtSceneObject* findSceneObjectFromElement(const DtElementID& id);
1023 
1025  virtual DtTerrainPatchObject* findTerrainPatchObjectFromElement( DtElementID id );
1026  virtual DtOsgObserverObject* findObserverObjectFromElement( DtElementID id );
1027 
1028  virtual void getPositionAndOrientation( DtSceneObject& sceneObject, osg::Vec3d& position,
1029  osg::Vec3d& orientToPosition, osg::Quat& orientation );
1030 
1031  virtual void getPositionAndOrientation( DtTerrainPatchObject& patchObject, osg::Vec3d& position,
1032  osg::Vec3d& orientToPosition, osg::Quat& orientation );
1033 
1034  virtual void getPositionAndOrientation( DtOsgObserverObject& observerObject, osg::Vec3d& position,
1035  osg::Vec3d& orientToPosition, osg::Quat& orientation );
1036 
1038  virtual void getPositionFromSceneObject( DtSceneObject& sceneObject, osg::Vec3d& position ) const;
1039 
1041  virtual void getPositionFromObserverObject( DtOsgObserverObject& observerObject, osg::Vec3d& position ) const;
1042 
1045  virtual bool getPartPositionOriFromSceneObject( DtSceneObject& sceneObject,
1046  int partId, osg::Vec3d& position, osg::Quat& ori ) const;
1047 
1050  virtual void force2D();
1051 
1053  virtual void dimensionChanged( bool is2D );
1054  virtual void setIs2D( bool is2D );
1055 
1057  virtual double calculate3DAltitude() const;
1058 
1060  virtual void calculateAltitude();
1061 
1062  // Sends the location of the observer on the master to all others; only used
1063  // if different
1064  virtual void synchronizeLocation( double x, double y, double z );
1065 
1066  // Sends the orientation of the observer on the master to all others; only used
1067  // if different
1068  virtual void synchronizeOrientation( double x, double y, double z, double w );
1069 
1085  virtual void calcHeightAboveTerrain(bool force=false);
1086 
1088  std::list<DtChannel*> findChannels();
1091  std::list<const DtChannel*> findChannels() const;
1093 
1102  virtual double frustumPixelHeight() const;
1103 
1105  virtual void slot_coordinateSystemChanged();
1106 
1108  virtual void cache3DOffsetAndRotation();
1109 
1111  virtual void restoreAttachOffsetsFrom3DCache();
1112 
1113 
1116  virtual void slot_dateChanged();
1117 
1120  virtual bool getAttachedToBoundingVolume(DtSceneObject* const sceneObject, osg::Vec3d& boundingVolumeCenter, osg::Vec3& boundingVolumeExtents,
1121  double& maxOffset, double& maxExtent);
1122 
1125  virtual bool setupAttachOffsetsAfterReset(DtSceneObject* const sceneObject, osg::Vec3d boundingVolumeCenter, osg::Vec3 boundingVolumeExtents,
1126  double maxOffset, double maxExtent);
1127 
1131  virtual void setupAttachOffsets(double maxExtent);
1132 
1135  virtual void reinitializeAfterBoundingVolumeChange();
1136 
1139  virtual void resetAfterBoundingVolumeChange();
1140 
1141  protected:
1142 
1143  static const double theObserverBoundingSphere;
1145 
1146  static const double theMaxTerrainRetryTime;
1147 
1148  // below this altitude, ignore myConstrainToCenter
1149  static const double theCenterConstrainHeight;
1150 
1151  // Zoom won't get any smaller than this
1152  static const double theMinViewResolution;
1153 
1154  // Zoom won't get any larger than this
1155  static const double theMaxViewResolution;
1156 
1157 
1158  protected:
1159 
1161 
1162  std::vector<DtUniqueID> myCurrentAttachments;
1163  std::vector<DtUniqueID> mySecondaryAttachments;
1165 
1169 
1172 
1173  //
1175  //
1184 
1187 
1190 
1193 
1196 
1199 
1201 
1203 
1205  osg::Vec3d myDragMove;
1206 
1208 
1209  osg::Vec3d myOrbitAdvance;
1210 
1216 
1219 
1222  osg::Quat myMasterRotation;
1223 
1226 
1229 
1234 
1237 
1240 
1245 
1251 
1252  //bool myGlobeObserverMode;
1254 
1257 
1259  {
1260  public:
1261 
1263  {
1264  Stopped = 0,
1265  Forward = 1,
1266  Backward = 2,
1267  Left = 4,
1268  Right = 8,
1269  Up = 16,
1270  Down = 32
1271  };
1272 
1274  : myState(Stopped)
1275  {
1276  }
1277 
1279  inline void applyMovement(double linearDistance)
1280  {
1281  if(moving(Right)) myAdvance[0] += linearDistance;
1282  if(moving(Left)) myAdvance[0] -= linearDistance;
1283  if(moving(Forward)) myAdvance[1] += linearDistance;
1284  if(moving(Backward)) myAdvance[1] -= linearDistance;
1285  if(moving(Up)) myAdvance[2] += linearDistance;
1286  if(moving(Down)) myAdvance[2] -= linearDistance;
1287  }
1288 
1290  inline const osg::Vec3d& advance() const
1291  {
1292  return myAdvance;
1293  }
1294 
1295  inline void stop()
1296  {
1297  myState = Stopped;
1298  myAdvance.set(0.0,0.0,0.0);
1299  myEuler.set(0.0,0.0,0.0);
1300  }
1301 
1302  inline void clearAdvance()
1303  {
1304  myAdvance.set(0.0,0.0,0.0);
1305  }
1306 
1307  inline bool stopped()
1308  {
1309  return myState == Stopped;
1310  }
1311 
1312  inline bool moving() const
1313  {
1314  return myState != Stopped;
1315  }
1316 
1317  inline bool moving(Direction d) const
1318  {
1319  return (myState & d) != 0;
1320  }
1321 
1322  inline void setMoving(Direction d, bool moving)
1323  {
1324  myState = moving ? myState | d : myState & ~d;
1325  }
1326 
1327  enum Angle
1328  {
1329  YawLeft = 1,
1330  YawRight = 2,
1331  PitchUp = 4,
1332  PitchDown = 8,
1333  RollLeft = 16,
1334  RollRight = 32
1335  };
1336 
1337  inline void applyRotation(double angle)
1338  {
1339  if(rotating(YawRight)) myEuler[0] -= angle;
1340  if(rotating(YawLeft)) myEuler[0] += angle;
1341  if(rotating(PitchUp)) myEuler[1] += angle;
1342  if(rotating(PitchDown)) myEuler[1] -= angle;
1343  if(rotating(RollRight)) myEuler[2] += angle;
1344  if(rotating(RollLeft)) myEuler[2] -= angle;
1345  }
1346 
1347  inline const osg::Vec3d& euler() const
1348  {
1349  return myEuler;
1350  }
1351 
1352  inline osg::Vec3d& euler()
1353  {
1354  return myEuler;
1355  }
1356 
1357  inline void level()
1358  {
1359  myEuler.set(0.0,0.0,0.0);
1360  }
1361 
1362  inline bool rotating() const
1363  {
1364  return myState != Stopped;
1365  }
1366 
1367  inline bool rotating( Angle d ) const
1368  {
1369  return (myState & d) != 0;
1370  }
1371 
1372  inline void setRotating( Angle d, bool rotating )
1373  {
1374  myState = rotating ? myState | d : myState & ~d;
1375  }
1376 
1377  protected:
1378 
1382  osg::Vec3d myAdvance;
1383  osg::Vec3d myEuler;
1384 
1385  unsigned char myState;
1386  };
1387 
1392 
1397 
1399 
1404 
1408 
1414 
1418 
1419  //
1428 
1432 
1436 
1438  osg::Vec3d myCameraOffset;
1440  osg::Quat myCameraRotation;
1441 
1442  osg::Vec3d myObserverWorldUp;
1445 
1446  osg::Vec3d myAttachedWorldUp;
1449 
1450  osg::Vec3d myObserverUp;
1451  osg::Vec3d myObserverFront;
1452  osg::Vec3d myObserverRight;
1453 
1454  osg::Vec3d myLevelObserverUp;
1457 
1458  osg::Vec3d myAttachedUp;
1459  osg::Vec3d myAttachedFront;
1460  osg::Vec3d myAttachedRight;
1461 
1462  osg::Vec3d myLevelAttachedUp;
1465 
1469 
1473 
1474  osg::Vec3d myCameraUp;
1475  osg::Vec3d myCameraFront;
1476  osg::Vec3d myCameraRight;
1477 
1479 
1484 
1486 
1489 
1492 
1501  // force an orientation reset AFTER the next time the observer position is updated
1502  // Needed when making large attach jumps
1504 
1512 
1514 
1516  osg::Vec3d myViewIntersect;
1517 
1519  mutable osg::Vec3d myMutableDownIntersect;
1520 
1521  osg::Vec3d myAttachPosition;
1522 
1525 
1529 
1530  double myAltitude;
1531 
1536 
1540 
1541  typedef std::unordered_map<DtElementID, bool> ElementVisibilityMap;
1543 
1544  // Paged terrain initialization
1552 
1553  // Used for speed scaling, this is the same as myHeightAboveTerrain
1554  // when unattached, but the distance from the attached entity when
1555  // attached
1557 
1558  // curvature adjustment
1562 
1563  osg::Quat myCameraShakeRot;
1564 
1566 
1567  DtIntersectorsContainer* myIntersectors = nullptr;
1568 
1570 
1573  DtCoordinateSystem* myCoordinateSystem = nullptr;
1574  };
1575 
1576 }
osg::Quat myCameraRotation
This is the camera (wrt the observer) as a quaternion.
Definition: DtOsgObserverObject.h:1440
osg::Vec3d myDragMove
Change in world position due to drag.
Definition: DtOsgObserverObject.h:1205
osg::Vec3d myMutableDownIntersect
Definition: DtOsgObserverObject.h:1519
Definition: DtOsgObserverObject.h:57
bool myHaveViewIntersect
Definition: DtOsgObserverObject.h:1515
void setRotating(Angle d, bool rotating)
Definition: DtOsgObserverObject.h:1372
ElementVisibilityMap myPendingVisibilityState
Definition: DtOsgObserverObject.h:1542
bool myAttachmentHas3DCockpit
Definition: DtOsgObserverObject.h:1481
osg::Vec3d myLevelObserverMimicUp
Definition: DtOsgObserverObject.h:1466
osg::Vec3d myAttachedWorldEast
Definition: DtOsgObserverObject.h:1448
bool myHave3DOffsetCache
Definition: DtOsgObserverObject.h:1246
int myOrientToTargetConstraint
This is an int rather than a bool because we increment/decrement it, much like a reference pointer...
Definition: DtOsgObserverObject.h:1497
osg::Vec3d myObserverUp
Definition: DtOsgObserverObject.h:1450
double myHeightOfTerrain
Definition: DtOsgObserverObject.h:1551
std::vector< DtUniqueID > myCurrentAttachments
Definition: DtOsgObserverObject.h:1162
double myStartGotoTerrainCenterTime
Definition: DtOsgObserverObject.h:1547
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:1236
osg::Vec3d myAttachedOffsetUp
Definition: DtOsgObserverObject.h:1470
osg::Vec3d myAttachedOffsetRight
Definition: DtOsgObserverObject.h:1472
osg::Vec3d myOrbitAdvance
Definition: DtOsgObserverObject.h:1209
DtCoordinateConverter is the base class for &#39;local (cig) to geocentric&#39; converters.
Definition: DtCoordinateConverter.h:25
osg::Vec3d myCameraRight
Definition: DtOsgObserverObject.h:1476
osg::Vec3d myCameraUp
Definition: DtOsgObserverObject.h:1474
double myHeightAboveTerrain
Definition: DtOsgObserverObject.h:1550
double myMaxLinearSpeed
Need just these, for terrain scaling.
Definition: DtOsgObserverObject.h:1410
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
double myLinearSpeed
Definition: DtOsgObserverObject.h:1406
This form is used for doing level (&#39;flying carpet&#39;) style movements.
Definition: DtOsgObserverObject.h:1258
osg::Vec3d myLevelAttachedFront
Definition: DtOsgObserverObject.h:1463
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:1400
osg::Vec3d myObserverPosition
Change in observer position this frame.
Definition: DtOsgObserverObject.h:1195
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:1398
osg::Vec3d myLocationAttachPoint
Definition: DtOsgObserverObject.h:1565
osg::Vec3d my2DTo3DCachedObserverOffsetVector
Definition: DtOsgObserverObject.h:1242
osg::Vec3d myLevelAttachedPosition
Definition: DtOsgObserverObject.h:1202
double mySceneCenterOffsetX
Definition: DtOsgObserverObject.h:1415
void level()
Definition: DtOsgObserverObject.h:1357
bool mySpeedScaling
Definition: DtOsgObserverObject.h:1482
bool myViewResolutionDecreasingState
Definition: DtOsgObserverObject.h:1534
osg::Vec3d myLevelObserverFront
Definition: DtOsgObserverObject.h:1455
double myViewResolution
Definition: DtOsgObserverObject.h:1535
bool myLookingUp
Definition: DtOsgObserverObject.h:1424
osg::Vec3d myAttachedOffsetFront
Definition: DtOsgObserverObject.h:1471
osg::Matrixd myLevelObserverRotationMatrix
Definition: DtOsgObserverObject.h:1239
bool myOrbitingUp
Definition: DtOsgObserverObject.h:1402
static const double theCenterConstrainHeight
Definition: DtOsgObserverObject.h:1149
void applyMovement(double linearDistance)
Update the advance based upon the movement.
Definition: DtOsgObserverObject.h:1279
std::unordered_map< DtElementID, bool > ElementVisibilityMap
Definition: DtOsgObserverObject.h:1541
TerrainResult
Definition: DtOsgObserverObject.h:54
bool myOrbitingDown
Definition: DtOsgObserverObject.h:1403
bool myInternalSuppressConstrainToTerrain
suppress when jumping...
Definition: DtOsgObserverObject.h:1488
osg::Vec3d myObserverWorldUp
Definition: DtOsgObserverObject.h:1442
bool rotating(Angle d) const
Definition: DtOsgObserverObject.h:1367
osg::Vec3d myAttachedWorldNorth
Definition: DtOsgObserverObject.h:1447
osg::Vec3d myLevelObserverRight
Definition: DtOsgObserverObject.h:1456
bool myHaveTerrainPivot
Definition: DtOsgObserverObject.h:1513
const osg::Vec3d & advance() const
Get the current movement advance.
Definition: DtOsgObserverObject.h:1290
osg::Vec3d myAttachedFront
Definition: DtOsgObserverObject.h:1459
osg::Vec3d myLevelAttachedUp
Definition: DtOsgObserverObject.h:1462
osg::Quat myAttachedRotationOffset
My Attached rotation offset.
Definition: DtOsgObserverObject.h:1218
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:1233
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:1556
MotionState myAbsoluteLevelRotatingState
Definition: DtOsgObserverObject.h:1396
osg::Quat my2DTo3DCachedObserverRotationOffset
Definition: DtOsgObserverObject.h:1244
unsigned char myState
Definition: DtOsgObserverObject.h:1385
bool myLookingTiltLeft
Definition: DtOsgObserverObject.h:1427
DtSignalConnectionManager myConnections
Definition: DtOsgObserverObject.h:1569
double myLinearScaledSpeedGain
Definition: DtOsgObserverObject.h:1412
osg::Vec3d myObserverPositionVector
— Observer
Definition: DtOsgObserverObject.h:1177
bool myLookingLeft
Definition: DtOsgObserverObject.h:1423
osg::Vec3d myPreviousOffsetVector
Definition: DtOsgObserverObject.h:1528
bool myGotoTerrainCenterPending
Definition: DtOsgObserverObject.h:1545
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:1144
bool myOrientToOnReset
Definition: DtOsgObserverObject.h:1499
bool myViewResolutionIncreasingState
Currently for 2D only, these variables will be ignored if projecting in 3D mode.
Definition: DtOsgObserverObject.h:1533
osg::Vec3d myObserverWorldEast
Definition: DtOsgObserverObject.h:1444
double mySceneCenterOffsetZ
Definition: DtOsgObserverObject.h:1417
MotionState myRotatingState
Definition: DtOsgObserverObject.h:1393
const osg::Vec3d & euler() const
Definition: DtOsgObserverObject.h:1347
osg::Matrixd myLevelObserverMimicRotationMatrix
Definition: DtOsgObserverObject.h:1238
double myAltitude
Definition: DtOsgObserverObject.h:1530
osg::Quat myAttachedRotation
Definition: DtOsgObserverObject.h:1235
osg::Vec3d myLevelObserverMimicFront
Definition: DtOsgObserverObject.h:1467
osg::Vec3d mySavedObserverOffsetVector
Used for switching between track mode and other attached modes.
Definition: DtOsgObserverObject.h:1192
osg::Vec3d myMasterPositionVector
Definition: DtOsgObserverObject.h:1179
bool myExternalSuppressConstrainToTerrain
suppress when told to
Definition: DtOsgObserverObject.h:1491
float myFlashlightAngle
Definition: DtOsgObserverObject.h:1561
bool myHideModelOnAttach
Definition: DtOsgObserverObject.h:1480
double myAttachedRoll
Definition: DtOsgObserverObject.h:1168
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
bool myMovedSinceLastHAT
Definition: DtOsgObserverObject.h:1560
bool myLocalModelScalingEnabled
Definition: DtOsgObserverObject.h:1185
bool moving() const
Definition: DtOsgObserverObject.h:1312
Contains makVrv::DtObserverObject class.
bool myChanged
Definition: DtOsgObserverObject.h:1170
void applyRotation(double angle)
Definition: DtOsgObserverObject.h:1337
int myPartAttachment
Definition: DtOsgObserverObject.h:1164
osg::Quat myFinalCameraRotation
This is the combined camera/observer orientation; this is what the DtOsgChannel uses to orient itself...
Definition: DtOsgObserverObject.h:1431
Direction
Definition: DtOsgObserverObject.h:1262
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:32
MotionState myAttachedObserverState
Definition: DtOsgObserverObject.h:1390
static const double theMaxTerrainRetryTime
Definition: DtOsgObserverObject.h:1146
MotionState myRotatingLevelState
Definition: DtOsgObserverObject.h:1394
osg::Vec3d my2DTo3DCachedObserverPosition
Definition: DtOsgObserverObject.h:1241
osg::Quat myMasterRotation
Definition: DtOsgObserverObject.h:1222
double myAttachedYaw
Definition: DtOsgObserverObject.h:1166
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtSignalConnectionManager myAttachmentBoundingVolumeSignals
Definition: DtOsgObserverObject.h:1160
osg::Vec3d myLastSpeedPositionVector
Definition: DtOsgObserverObject.h:1178
osg::Vec3d myLevelObserverUp
Definition: DtOsgObserverObject.h:1454
Contains makVrv::DtQuat class.
DtUniqueID myPendingTerrainPatchId
Definition: DtOsgObserverObject.h:1548
bool rotating() const
Definition: DtOsgObserverObject.h:1362
DtObserverObject::AttachType my3DAttachType
Definition: DtOsgObserverObject.h:1478
NorthType
Definition: DtObserverObject.h:59
double myHeightAboveTerrainTimer
Definition: DtOsgObserverObject.h:1483
double mySceneCenterOffsetY
Definition: DtOsgObserverObject.h:1416
osg::Vec3d myFinalCameraPositionVector
This is the combined camera/observer orientation; this is what the DtOsgChannel uses to orient itself...
Definition: DtOsgObserverObject.h:1435
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:1253
bool myIsChangingDimension
Definition: DtOsgObserverObject.h:1247
double myCurvatureAdjustment
Definition: DtOsgObserverObject.h:1559
double myNextGotoTerrainCenterTime
Definition: DtOsgObserverObject.h:1546
static const double theMinViewResolution
Definition: DtOsgObserverObject.h:1152
Angle
Definition: DtOsgObserverObject.h:1327
MotionState myAbsoluteRotatingState
Definition: DtOsgObserverObject.h:1395
osg::Vec3d myObserverRotationalVelocityVector
Definition: DtOsgObserverObject.h:1183
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
osg::Vec3d myPreviousTerrainCenter
Definition: DtOsgObserverObject.h:1549
bool myMutableHaveDownIntersect
Definition: DtOsgObserverObject.h:1518
bool myForceOrientReset
Definition: DtOsgObserverObject.h:1503
void stop()
Definition: DtOsgObserverObject.h:1295
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
bool myOrientCameraToTargetConstraint
Definition: DtOsgObserverObject.h:1498
osg::Vec3d myObserverFront
Definition: DtOsgObserverObject.h:1451
osg::Vec3d myObserverWorldNorth
Definition: DtOsgObserverObject.h:1443
MotionState myLevelObserverState
Definition: DtOsgObserverObject.h:1389
bool myLookingTiltRight
Definition: DtOsgObserverObject.h:1426
osg::Vec3d myObserverOffsetVector
Current offset from an attachment, when attached.
Definition: DtOsgObserverObject.h:1189
double myLastTickTime
Definition: DtOsgObserverObject.h:1171
osg::Vec3d myPreviousPositionVector
for backing out if we hit a constraint
Definition: DtOsgObserverObject.h:1527
void clearAdvance()
Definition: DtOsgObserverObject.h:1302
bool moving(Direction d) const
Definition: DtOsgObserverObject.h:1317
osg::Vec3d myEuler
Definition: DtOsgObserverObject.h:1383
osg::Quat myCameraShakeRot
Definition: DtOsgObserverObject.h:1563
osg::Quat myFlashlightRotation
Flashlight orientation offset as a quaternion.
Definition: DtOsgObserverObject.h:1225
Base class to provide boost signal/slot management.
osg::Vec3d myViewIntersect
Definition: DtOsgObserverObject.h:1516
osg::Quat my2DTo3DCachedObserverRotation
Definition: DtOsgObserverObject.h:1243
osg::Vec3d myLevelObserverMimicRight
Definition: DtOsgObserverObject.h:1468
bool mySyncPending
Definition: DtOsgObserverObject.h:1180
osg::Vec3d myAdvance
This, when scaled, will provide the direction that the observer should move in as the result of tick-...
Definition: DtOsgObserverObject.h:1382
bool myLookingRight
-— Camera
Definition: DtOsgObserverObject.h:1422
osg::Vec3d myAttachedUp
Definition: DtOsgObserverObject.h:1458
DT_DLL_vrfutil double mag(double x[3])
osg::Vec3d myCameraOffset
This is the camera offset wrt to observer.
Definition: DtOsgObserverObject.h:1438
osg::Quat mySavedObserverRotation
This is used for switching between track mode and other attach modes.
Definition: DtOsgObserverObject.h:1228
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:1464
double myRotationSpeed
Definition: DtOsgObserverObject.h:1407
double myLastAttachedBvolDiameter
Definition: DtOsgObserverObject.h:1523
bool mySyncSuppressed
Definition: DtOsgObserverObject.h:1181
void setMoving(Direction d, bool moving)
Definition: DtOsgObserverObject.h:1322
double myMinLinearSpeed
Definition: DtOsgObserverObject.h:1411
osg::Quat myObserverRotation
This is our ENU observer orientation as a quaternion.
Definition: DtOsgObserverObject.h:1221
double myAttachedPitch
Definition: DtOsgObserverObject.h:1167
Contains DLL export macros.
double myLastAttachBvolOffset
Definition: DtOsgObserverObject.h:1524
MotionState myObserverState
Definition: DtOsgObserverObject.h:1388
osg::Vec3d myObserverLinearVelocityVector
Definition: DtOsgObserverObject.h:1182
float myLocalModelScalingAmount
Definition: DtOsgObserverObject.h:1186
osg::Vec3d myAttachedWorldUp
Definition: DtOsgObserverObject.h:1446
bool stopped()
Definition: DtOsgObserverObject.h:1307
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:72
std::vector< DtUniqueID > mySecondaryAttachments
Definition: DtOsgObserverObject.h:1163
osg::Vec3d myAttachPosition
Definition: DtOsgObserverObject.h:1521
A utility Quaternion class.
Definition: DtQuat.h:19
osg::Vec3d myOrientToPosition
Definition: DtOsgObserverObject.h:1207
bool myOrbitingRight
Definition: DtOsgObserverObject.h:1401
double myLastViewMagnification
Definition: DtOsgObserverObject.h:1539
osg::Vec3d myAttachedPosition
Definition: DtOsgObserverObject.h:1200
double myOrbitSpeed
Definition: DtOsgObserverObject.h:1405
static const double theMaxViewResolution
Definition: DtOsgObserverObject.h:1155
MotionState myLevelAttachedObserverState
Definition: DtOsgObserverObject.h:1391
DtModelSetId
Definition: DtModelSetEnums.h:19
bool myConstrainToTerrain
Definition: DtOsgObserverObject.h:1485
bool myUsesBoundingVolumeForAttachedOffsets
Whether or not the observer is using bounding volumes for attached offsets. This is all the time for ...
Definition: DtOsgObserverObject.h:1511
double myCurrentViewMagnification
Only used in 3D.
Definition: DtOsgObserverObject.h:1538
osg::Vec3d myObserverRight
Definition: DtOsgObserverObject.h:1452
bool myOrbiting
Definition: DtOsgObserverObject.h:1500
osg::Vec3d myCameraFront
Definition: DtOsgObserverObject.h:1475
bool myLookingDown
Definition: DtOsgObserverObject.h:1425
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:1198
double myCurrentObserverDistance
largest of the distances currently in play in a given frame. This is how far we&#39;ll advance...
Definition: DtOsgObserverObject.h:1215
double mySpeedScaleSpeed
Definition: DtOsgObserverObject.h:1413
static const double theObserverBoundingSphere
Definition: DtOsgObserverObject.h:1143
osg::Vec3d myAttachedRight
Definition: DtOsgObserverObject.h:1460
osg::Vec3d & euler()
Definition: DtOsgObserverObject.h:1352
AttachType
Definition: DtObserverObject.h:39
MotionState()
Definition: DtOsgObserverObject.h:1273

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)