VR-Forces 5.0.1 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 
19 #include <osg/Matrixd>
20 #include <osg/Vec3d>
21 #include <osg/Vec3>
22 #include <osg/Node>
23 
24 #include <list>
25 #include <unordered_map>
26 
27 class DtTaitBryan;
28 
29 namespace osg
30 {
31  class Node;
32 }
33 
34 namespace makVrv
35 {
36  class DtChannel;
37  class DtOsgChannel;
38  class DtCoordinateConverter;
39  class DtSceneObject;
40  class DtTerrainPatchObject;
41  class DtAgentUpdateResolverInterface;
42  class DtIntersectorsContainer;
43  class DtCoordinateSystem;
44 
49  {
50 
51  public:
52 
54  {
55  TerrainResultNoData = 0,
57  TerrainResultComplete
58  };
59 
60  public:
61 
63  DtOsgObserverObject( DtDe& de, DtUniqueID id, const std::string& name="" );
64 
66  virtual ~DtOsgObserverObject();
67 
69  DtOsgObserverObject() = delete;
70 
73 
75  DtOsgObserverObject& operator=(const DtOsgObserverObject&) = delete;
76 
77  public:
78 
80  virtual void tick( double simTime );
81 
83  virtual void tickAttachment();
84 
87  virtual void setModelSet( int modelSet );
88 
90  virtual double altitude() const;
91 
92  virtual void setNameAndRegister( const std::string& name );
93 
99  virtual void setCameraPositionAndOrientation( const osg::Vec3d& position,
100  const osg::Quat& rotation );
101 
102  virtual void getCameraPositionAndOrientation( osg::Vec3d& position,
103  osg::Quat& rotation ) const;
104 
105 
107  static void matrixdToTaitBryan( const osg::Matrixd& mat, DtTaitBryan& tb, bool isWorld2D = false );
108  static double clampUnity( double x );
109 
110 
111  //
112  //
114  //
115  //
116 
118  virtual void startMoveObserverRight();
121  virtual void stopMoveObserverRight();
122  virtual void moveObserverRight( double meters );
123 
125  virtual void startMoveObserverForward();
128  virtual void stopMoveObserverForward();
129  virtual void moveObserverForward( double meters );
131 
133  virtual void startMoveObserverUp();
136  virtual void stopMoveObserverUp();
137  virtual void moveObserverUp( double meters );
139 
141  virtual void startMoveObserverLeft();
144  virtual void stopMoveObserverLeft();
145  virtual void moveObserverLeft( double meters );
147 
149  virtual void startMoveObserverBack();
152  virtual void stopMoveObserverBack();
153  virtual void moveObserverBack( double meters );
155 
157  virtual void startMoveObserverDown();
160  virtual void stopMoveObserverDown();
161  virtual void moveObserverDown( double meters );
163 
165  virtual void startMoveLevelObserverRight();
169  virtual void stopMoveLevelObserverRight();
170  virtual void moveLevelObserverRight( double meters );
172 
174  virtual void startMoveLevelObserverForward();
178  virtual void stopMoveLevelObserverForward();
179  virtual void moveLevelObserverForward( double meters );
181 
183  virtual void startMoveLevelObserverUp();
187  virtual void stopMoveLevelObserverUp();
188  virtual void moveLevelObserverUp( double meters );
190 
192  virtual void startMoveLevelObserverLeft();
196  virtual void stopMoveLevelObserverLeft();
197  virtual void moveLevelObserverLeft( double meters );
199 
201  virtual void startMoveLevelObserverBack();
205  virtual void stopMoveLevelObserverBack();
206  virtual void moveLevelObserverBack( double meters );
208 
210  virtual void startMoveLevelObserverDown();
213  virtual void stopMoveLevelObserverDown();
214  virtual void moveLevelObserverDown( double meters );
216 
218  virtual void startMoveAttachedRight();
221  virtual void stopMoveAttachedRight();
222  virtual void moveAttachedRight( double meters );
223 
225  virtual void startMoveAttachedForward();
228  virtual void stopMoveAttachedForward();
229  virtual void moveAttachedForward( double meters );
231 
233  virtual void startMoveAttachedUp();
236  virtual void stopMoveAttachedUp();
237  virtual void moveAttachedUp( double meters );
239 
241  virtual void startMoveAttachedLeft();
244  virtual void stopMoveAttachedLeft();
245  virtual void moveAttachedLeft( double meters );
247 
249  virtual void startMoveAttachedBack();
252  virtual void stopMoveAttachedBack();
253  virtual void moveAttachedBack( double meters );
255 
257  virtual void startMoveAttachedDown();
260  virtual void stopMoveAttachedDown();
261  virtual void moveAttachedDown( double meters );
263 
265  virtual void startMoveLevelAttachedRight();
269  virtual void stopMoveLevelAttachedRight();
270  virtual void moveLevelAttachedRight( double meters );
272 
274  virtual void startMoveLevelAttachedForward();
278  virtual void stopMoveLevelAttachedForward();
279  virtual void moveLevelAttachedForward( double meters );
281 
283  virtual void startMoveLevelAttachedUp();
287  virtual void stopMoveLevelAttachedUp();
288  virtual void moveLevelAttachedUp( double meters );
290 
292  virtual void startMoveLevelAttachedLeft();
296  virtual void stopMoveLevelAttachedLeft();
297  virtual void moveLevelAttachedLeft( double meters );
299 
301  virtual void startMoveLevelAttachedBack();
305  virtual void stopMoveLevelAttachedBack();
306  virtual void moveLevelAttachedBack( double meters );
308 
310  virtual void startMoveLevelAttachedDown();
313  virtual void stopMoveLevelAttachedDown();
314  virtual void moveLevelAttachedDown( double meters );
316 
318  virtual void startMoveAttachedContextRight();
321  virtual void stopMoveAttachedContextRight();
322  virtual void moveAttachedContextRight( double meters );
324 
326  virtual void startMoveAttachedContextForward();
329  virtual void stopMoveAttachedContextForward();
330  virtual void moveAttachedContextForward( double meters );
332 
334  virtual void startMoveAttachedContextUp();
337  virtual void stopMoveAttachedContextUp();
338  virtual void moveAttachedContextUp( double meters );
340 
342  virtual void startMoveAttachedContextLeft();
345  virtual void stopMoveAttachedContextLeft();
346  virtual void moveAttachedContextLeft( double meters );
348 
350  virtual void startMoveAttachedContextBack();
353  virtual void stopMoveAttachedContextBack();
354  virtual void moveAttachedContextBack( double meters );
356 
358  virtual void startMoveAttachedContextDown();
360  virtual void stopMoveAttachedContextDown();
361  virtual void moveAttachedContextDown( double meters );
363 
365  virtual void startYawLeft();
368  virtual void stopYawLeft();
369  virtual void rotateYawLeft(double rads);
371 
373  virtual void startYawRight();
377  virtual void stopYawRight();
378  virtual void rotateYawRight(double rads);
380 
382  virtual void startPitchUp();
385  virtual void stopPitchUp();
386  virtual void rotatePitchUp( double rads );
387  virtual void rotateFlashlightPitchUp( double rads );
389 
391  virtual void startPitchDown();
394  virtual void stopPitchDown();
395  virtual void rotatePitchDown( double rads );
396  virtual void rotateFlashlightPitchDown( double rads );
398 
400  virtual void startRollLeft();
403  virtual void stopRollLeft();
404  virtual void rollLeft(double rads);
406 
408  virtual void startRollRight();
411  virtual void stopRollRight();
412  virtual void rollRight(double rads);
414 
416  virtual void startLevelYawLeft();
419  virtual void stopLevelYawLeft();
421 
423  virtual void startLevelYawRight();
427  virtual void stopLevelYawRight();
429 
431  virtual void startLevelPitchUp();
434  virtual void stopLevelPitchUp();
435  virtual void rotateLevelPitchUp(double rads);
437 
439  virtual void startLevelPitchDown();
442  virtual void stopLevelPitchDown();
443  virtual void rotateLevelPitchDown(double rads);
445 
447  virtual void startLevelRollLeft();
450  virtual void stopLevelRollLeft();
451  virtual void rollLevelLeft(double rads);
453 
455  virtual void startLevelRollRight();
458  virtual void stopLevelRollRight();
459  virtual void rollLevelRight(double rads);
461 
462  virtual void rotateLevelYawLeft( double rads );
463  virtual void rotateLevelYawRight( double rads );
464  virtual void rotateFlashlightYawLeft( double rads );
465  virtual void rotateFlashlightYawRight( double rads );
466 
467  virtual void startLookLeft();
468  virtual void stopLookLeft();
469  virtual void lookLeft( double rads );
470 
471  virtual void startLookRight();
472  virtual void stopLookRight();
473  virtual void lookRight( double rads );
474 
475  virtual void startLookUp();
476  virtual void stopLookUp();
477  virtual void lookUp( double rads );
478 
479  virtual void startLookDown();
480  virtual void stopLookDown();
481  virtual void lookDown( double rads );
482 
483  virtual void startLookTiltRight();
484  virtual void stopLookTiltRight();
485  virtual void lookTiltRight( double rads );
486 
487  virtual void startLookTiltLeft();
488  virtual void stopLookTiltLeft();
489  virtual void lookTiltLeft( double rads );
490 
492  virtual void startOrbitingLeft();
495  virtual void stopOrbitingLeft();
496  virtual void orbitLeft( double rads );
498 
500  virtual void startOrbitingRight();
503  virtual void stopOrbitingRight();
504  virtual void orbitRight( double rads );
506 
508  virtual void startOrbitingUp();
511  virtual void stopOrbitingUp();
512  virtual void orbitUp( double rads );
514 
516  virtual void startOrbitingDown();
519  virtual void stopOrbitingDown();
520  virtual void orbitDown( double rads );
522 
524  virtual void setLocation( double x, double y, double z);
525 
529  virtual void setAttachedLocation( double x, double y, double z ) override;
530  virtual void setAttachedX( double x ) override;
531  virtual void setAttachedY( double y ) override;
532  virtual void setAttachedZ( double z ) override;
533  virtual void getAttachedPosition( double& x, double& y, double& z ) const override;
534 
536  virtual void setOrientation( double psi, double theta, double phi );
537 
539  virtual void setTopographicOrientation( double psi, double theta, double phi );
540 
542  virtual void setOrientation( double x, double y, double z, double w);
543 
545  virtual void setAttachedOrientation( double psi, double theta, double phi ) override;
546  virtual void setAttachedYaw(double psi) override;
547  virtual void setAttachedPitch(double theta) override;
548  virtual void setAttachedRoll(double phi) override;
549  virtual void getAttachedOrientation(double& psi, double& theta, double& phi) const override;
550 
552  virtual void setAttachedOrientation( double x, double y, double z,
553  double w);
554 
557  void setLocalModelScalingEnabled( bool enabled );
558 
561  void setLocalModelScalingAmount( float amount );
562 
565  virtual void jumpTo( double x, double y, double z );
566 
568  virtual void jumpTo( DtUniqueID elementID );
569 
570  virtual void orientTo( double x, double y, double z );
571 
573  virtual void dragTerrain( double lastX, double lastY, double lastZ,
574  double currX, double currY, double currZ );
575 
576  virtual void dragTerrain2( double myStartDragX, double myStartDragY,
577  double myStartDragZ, int deltaMouseX, int deltaMouseY );
578 
579  virtual void dragGravityUp( double windowUnits );
580  virtual void dragGravityDown( double windowUnits );
581  virtual void dragGravityLeft( double windowUnits );
582  virtual void dragGravityRight( double windowUnits );
583  virtual void scrollObserverForward( int wheelUnits );
584  virtual void scrollObserverBack( int wheelUnits );
585  virtual void scrollLevelObserverForward( int wheelUnits );
586  virtual void scrollLevelObserverBack( int wheelUnits );
587 
588  virtual void scrollFlashlightWider( int wheelUnits );
589  virtual void scrollFlashlightNarrower( int wheelUnits );
590 
592  virtual float flashlightAngle();
593 
594  //{@
596  virtual void startIncreasingViewResolution();
597  virtual void stopIncreasingViewResolution();
598  virtual void increaseViewResolution();
599 
600  virtual void startDecreasingViewResolution();
601  virtual void stopDecreasingViewResolution();
602  virtual void decreaseViewResolution();
603 
604  // Sets the view resolution in meters per pixel.
605  virtual void setViewResolution( double resolution);
606 
607  // Get the current view resolution.
608  virtual double viewResolution() const;
609 
615  virtual void setCurrentViewMagnification( double mag );
616 
618  virtual double currentViewMagnification() const;
619 
621 
622  //
624  //
625 
627  virtual void setOrbitSpeed( double speed );
628 
630  virtual void setLinearSpeed( double speed );
631 
633  virtual void setRotationSpeed( double speed );
634 
636  virtual void setMinLinearSpeed( double minSpeed );
637 
639  virtual void setMaxLinearSpeed( double maxSpeed );
640 
642  virtual void setLinearScaledSpeedGain( double gain );
643 
649  virtual void gotoTerrainCenter( DtUniqueID terrainPatch, bool retry );
650 
652  virtual void resetAttachment();
653 
654  virtual void resetOrientation();
655 
657  virtual void resetCamera();
658  virtual void level();
659 
660  virtual void stopAll();
661 
662  virtual void attachToObjects( const std::vector<DtUniqueID>& elementIds );
663  virtual void setSecondaryAttachment( const std::vector<DtUniqueID>& elementIds );
664  virtual void setLocationTrackAttachment( const osg::Vec3d& location );
665  virtual void setLocationTrackAttachment( double x, double y, double z );
666 
667  virtual void attachToPart( int partId);
668  virtual void detach();
669  virtual void setAttachType( DtObserverObject::AttachType type );
670  virtual void setHideModelOnAttach( bool hide );
671 
674  virtual void setIsAttachmentResetIfAttachedBoundsChanged(bool isAttachmentReset);
677  virtual bool isAttachmentResetIfAttachedBoundsChanged() const;
678 
682  virtual void setAttachmentHas3DCockpit( bool cockpit );
683 
684  virtual void scaleCurrentAttachments( bool scaled );
685  virtual void setOrientToTargetConstraint( bool orient );
686  virtual void setOrbiting( bool orbit );
687  virtual void setOrientCameraToTargetConstraint( bool orient );
688 
689  virtual void setConstrainToTerrain( bool trueFalse );
690  virtual void setConstrainToCenter( bool trueFalse );
691 
694  virtual void suppressConstrainToTerrain( bool trueFalse );
695 
696  virtual void setSpeedScaling( bool trueFalse );
697 
699  virtual void setSpeedScaledSpeed( double speed );
700 
702  virtual void getLocation(double &x, double &y, double& z) const;
704  virtual void getObserverPosition(double &x, double &y, double& z) const;
705  virtual void getEffectiveLocation(double &x, double &y, double& z) const;
707 
709  virtual void getObserverCameraPosition(double& x, double& y, double& z) const;
710 
712  virtual void getOrientation( double& psi, double& theta, double& phi ) const;
713 
716  virtual void getObserverCameraOrientation(double& psi, double& theta, double& phi, bool includeShake) const;
717 
719  virtual void getTopographicOrientation( double& psi, double& theta, double& phi ) const;
720 
721  virtual void getOrientation( double& x, double& y, double& z, double& w ) const;
722 
723  virtual void getFlashlightOrientation( double& x, double& y, double& z, double& w ) const;
724 
727  virtual void getObserverPlatformFront(double& x, double& y, double& z) const;
728 
731  virtual void getObserverPlatformUp(double& x, double& y, double& z) const;
732 
735  virtual void getObserverPlatformRight(double& x, double& y, double& z) const;
736 
739  virtual void getObserverCameraFront(double& x, double& y, double& z, bool includeShake) const;
740 
742  virtual void getObserverCameraUp(double& x, double& y, double& z, bool includeShake) const;
743 
745  virtual void getObserverCameraRight(double& x, double& y, double& z, bool includeShake) const;
746 
747  virtual void getCameraUp(double& x, double& y, double& z);
748 
749  virtual void getCameraFront(double& x, double& y, double& z);
750 
751  virtual void getCameraRight(double& x, double& y, double& z);
752 
754  virtual void setCameraShakeRotation(double x, double y, double z, double w);
755 
757  virtual void getCameraShakeRotation(double& x, double& y, double& z, double& w);;
758 
761 // virtual double calculate2DAltitude();
762 
763 
766  virtual double heightAboveTerrainFromCurrentZoom(double magnification = 1.) const;
767 
771  virtual double altitudeFromCurrentZoom(double magnification=1.) const;
772 
775  virtual double zoomFromHeightAboveTerrain(double hat, double magnification=1) const;
776 
779  virtual double zoomFromAltitude(double altitude, double magnification=1.) const;
780 
781 
785  virtual double zoomFromCurrentAltitude() const;
786 
789  virtual double topographicHeading() const;
790 
792  virtual void getLinearVelocity(double &x, double &y, double &z) const;
793 
795  virtual void getRotationalVelocity( double& x, double& y, double& z) const;
796 
800  virtual void setModeSetting( int setting, bool value );
801 
804  virtual void setNorthType(DtObserverObject::NorthType northType);
805 
807  virtual std::vector<DtUniqueID> currentAttachments() const;
808 
811 
812  virtual const osg::Vec3d& locationTrackAttachmentVec3d() const;
813  virtual void getLocationTrackAttachment( double& x, double& y, double& z ) const;
815 
819  virtual DtObserverObject::AttachType attachType3D() const;
820 
824  virtual DtObserverObject::AttachType attachType2D() const;
825 
827  virtual bool attachedObjectHidden() const;
828 
832  virtual bool attachmentHas3DCockpit() const;
833 
836  virtual osg::Vec3d attachedOffsetVector() const;
837 
842  virtual double attachedNearClipOffset() const;
843 
845  virtual double heightAboveTerrain() const;
846 
848  virtual double heightOfTerrain() const;
849 
851  virtual const DtIntersectorsContainer* intersectorsContainer(void) const;
852 
854  virtual DtIntersectorsContainer* intersectorsContainer(void);
855 
856  protected:
857 
859  virtual bool shouldOrientToGlobeCenter();
860 
862  virtual void adjustToGlobeCurvature();
863 
865  virtual bool shouldRotateGlobe();
866 
867  virtual void calcObserverWorldVectors();
868  virtual const osg::Vec3d& observerWorldUp() const;
869  virtual const osg::Vec3d& observerWorldNorth() const;
870  virtual const osg::Vec3d& observerWorldEast() const;
871 
872  virtual const osg::Vec3d& attachedWorldUp() const;
873 
874  virtual osg::Vec3d& observerUp();
875  virtual osg::Vec3d& observerFront();
876  virtual osg::Vec3d& observerRight();
877  virtual void observerBasis(osg::Vec3d& up, osg::Vec3d& front, osg::Vec3d& right);
878 
879  virtual osg::Vec3d& attachedUp();
880  virtual osg::Vec3d& attachedFront();
881  virtual osg::Vec3d& attachedRight();
882 
883  virtual osg::Vec3d& attachedOffsetUp();
884  virtual osg::Vec3d& attachedOffsetFront();
885  virtual osg::Vec3d& attachedOffsetRight();
886 
888  virtual osg::Vec3d& levelAttachedUp();
889  virtual osg::Vec3d& levelAttachedFront();
890  virtual osg::Vec3d& levelAttachedRight();
891 
893  virtual osg::Vec3d& levelObserverMimicUp();
894  virtual osg::Vec3d& levelObserverMimicFront();
895  virtual osg::Vec3d& levelObserverMimicRight();
896 
897  virtual osg::Vec3d& cameraUp();
898  virtual osg::Vec3d& cameraFront();
899  virtual osg::Vec3d& cameraRight();
900 
901  virtual osg::Vec3d& levelObserverUp();
902  virtual osg::Vec3d& levelObserverFront();
903  virtual osg::Vec3d& levelObserverRight();
904 
905  virtual void advanceOrbitLeft( double rads );
906  virtual void advanceOrbitRight( double rads );
907  virtual void advanceOrbitUp( double rads );
908  virtual void advanceOrbitDown( double rads );
909 
910  virtual void makeLevelObserverMatrix();
911 
913  virtual void calculateLevelAttachedRotation();
914 
916  virtual void makeLevelObserverMimicMatrix();
917 
921  virtual osg::Vec3d calcWorldPositionChange();
922 
923  virtual osg::Vec3d calcMimicPositionChange();
924 
925  virtual osg::Vec3d calcAttachedPosition(const osg::Quat& attInverse, const osg::Vec3d& attachedAdvance);
926  virtual osg::Vec3d calcAttachedAdvance(const osg::Quat& tetherTrackInverse);
927 
928  virtual osg::Vec3d calcFollowPositionChange();
929  virtual osg::Vec3d calcSpaceFollowPositionChange();
930  virtual osg::Vec3d calcTetherPositionChange();
931  virtual osg::Vec3d calcTetherTrackPositionChange();
932 
933  virtual osg::Vec3d calcTrackPositionChange();
934  virtual osg::Quat calcTetherTrackRotation();
935 
936  virtual osg::Quat calcFlashlightOrientationChange();
937  virtual osg::Quat calcWorldOrientationChange();
938  virtual osg::Quat calcTetherOrientationChange();
939  virtual osg::Quat calcMimicOrientationChange();
940  virtual osg::Quat calcFollowOrientationChange();
941 
942  virtual void setCurrentAttachmentsVisibility( bool visible );
943 
950 
953  virtual void orientTo( const osg::Vec3d& target );
954 
956  virtual void orientCameraTo( const osg::Vec3d& target );
957 
958  virtual TerrainResult getTerrainCenter( const DtUniqueID& patchID, osg::Vec3d& center );
959 
960  virtual DtCoordinateConverter& coordinateConverter();
961  virtual const DtCoordinateConverter& coordinateConverter() const;
962 
963  virtual void initializeAttachment();
964 
965  virtual const osg::Vec3d& scalingIntersection() const;
966  virtual void getViewIntersection();
967 
969  virtual double linearSpeed();
970 
972  virtual double speedScalingGain() const;
973 
974  virtual void calcTerrainConstraint(const osg::Vec3d& prev );
975 
981  virtual bool updateAttachPositionAndOrientation();
982 
983  virtual bool getSecondaryAttachPosition( osg::Vec3d& position );
984 
985  virtual void getObserverOffsetVector( double& x, double& y, double& z ) const;
986  virtual void setObserverOffsetVector( double x, double y, double z );
987 
990 
991  virtual void getCameraFromParentOffsetVector( double& x, double& y, double& z ) const;
992  virtual void getCameraFromParentRotationOffset( double& x, double& y, double& z, double& w ) const;
994 
995  virtual void getAttachedRotationOffset( double& x, double& y, double& z, double& w ) const;
996  virtual void setAttachedRotationOffset( double x, double y, double z,
997  double w );
998 
999  virtual void getBoundingVolume( DtSceneObject& sceneObject,
1000  osg::Vec3& bvolExtents, osg::Vec3d& bvolCenter );
1001 
1002  virtual void getBoundingVolume( DtTerrainPatchObject& patchObject,
1003  osg::Vec3& bvolExtents, osg::Vec3d& bvolCenter );
1004 
1005  virtual void setLocation( const osg::Vec3d& location, bool suppress=true );
1006 
1007  virtual bool isMoving() const;
1008  virtual bool isRotating() const;
1009 
1010  virtual double computeNearClipDistance( DtSceneObject* sceneObject );
1011  virtual float computeLocalModelScalingAmount( DtSceneObject* sceneObject );
1012 
1013  virtual void calcScaledSpeed();
1014  virtual bool getTerrainOrPropIntersection( const osg::Vec3d& startPos,
1015  const osg::Vec3d& endPos, osg::Vec3d& result, const osg::Node::NodeMask mask = ~DtOsgNodeFlags::FlagSupportOff) const;
1016 
1018  virtual DtSceneObject* findSceneObjectFromElement(const DtElementID& id);
1019 
1021  virtual DtTerrainPatchObject* findTerrainPatchObjectFromElement( DtElementID id );
1022  virtual DtOsgObserverObject* findObserverObjectFromElement( DtElementID id );
1023 
1024  virtual void getPositionAndOrientation( DtSceneObject& sceneObject, osg::Vec3d& position,
1025  osg::Vec3d& orientToPosition, osg::Quat& orientation );
1026 
1027  virtual void getPositionAndOrientation( DtTerrainPatchObject& patchObject, osg::Vec3d& position,
1028  osg::Vec3d& orientToPosition, osg::Quat& orientation );
1029 
1030  virtual void getPositionAndOrientation( DtOsgObserverObject& observerObject, osg::Vec3d& position,
1031  osg::Vec3d& orientToPosition, osg::Quat& orientation );
1032 
1034  virtual void getPositionFromSceneObject( DtSceneObject& sceneObject, osg::Vec3d& position ) const;
1035 
1037  virtual void getPositionFromObserverObject( DtOsgObserverObject& observerObject, osg::Vec3d& position ) const;
1038 
1041  virtual bool getPartPositionOriFromSceneObject( DtSceneObject& sceneObject,
1042  int partId, osg::Vec3d& position, osg::Quat& ori ) const;
1043 
1046  virtual void force2D();
1047 
1049  virtual void dimensionChanged( bool is2D );
1050  virtual void setIs2D( bool is2D );
1051 
1053  virtual double calculate3DAltitude() const;
1054 
1056  virtual void calculateAltitude();
1057 
1058  // Sends the location of the observer on the master to all others; only used
1059  // if different
1060  virtual void synchronizeLocation( double x, double y, double z );
1061 
1062  // Sends the orientation of the observer on the master to all others; only used
1063  // if different
1064  virtual void synchronizeOrientation( double x, double y, double z, double w );
1065 
1081  virtual void calcHeightAboveTerrain(bool force=false);
1082 
1084  std::list<DtChannel*> findChannels();
1087  std::list<const DtChannel*> findChannels() const;
1089 
1098  virtual double frustumPixelHeight() const;
1099 
1101  virtual void slot_coordinateSystemChanged();
1102 
1104  virtual void cache3DOffsetAndRotation();
1105 
1106  protected:
1107 
1108  static const double theObserverBoundingSphere;
1110 
1111  static const double theMaxTerrainRetryTime;
1112 
1113  // below this altitude, ignore myConstrainToCenter
1114  static const double theCenterConstrainHeight;
1115 
1116  // Zoom won't get any smaller than this
1117  static const double theMinViewResolution;
1118 
1119  // Zoom won't get any larger than this
1120  static const double theMaxViewResolution;
1121 
1122 
1123  protected:
1124 
1126 
1127  std::vector<DtUniqueID> myCurrentAttachments;
1128  std::vector<DtUniqueID> mySecondaryAttachments;
1130 
1134 
1137 
1138  //
1140  //
1149 
1152 
1155 
1158 
1161 
1164 
1166 
1168 
1170  osg::Vec3d myDragMove;
1171 
1173 
1174  osg::Vec3d myOrbitAdvance;
1175 
1181 
1184 
1187  osg::Quat myMasterRotation;
1188 
1191 
1194 
1199 
1202 
1205 
1210 
1216 
1217  //bool myGlobeObserverMode;
1219 
1222 
1224  {
1225  public:
1226 
1228  {
1229  Stopped = 0,
1230  Forward = 1,
1231  Backward = 2,
1232  Left = 4,
1233  Right = 8,
1234  Up = 16,
1235  Down = 32
1236  };
1237 
1239  : myState(Stopped)
1240  {
1241  }
1242 
1244  inline void applyMovement(double linearDistance)
1245  {
1246  if(moving(Right)) myAdvance[0] += linearDistance;
1247  if(moving(Left)) myAdvance[0] -= linearDistance;
1248  if(moving(Forward)) myAdvance[1] += linearDistance;
1249  if(moving(Backward)) myAdvance[1] -= linearDistance;
1250  if(moving(Up)) myAdvance[2] += linearDistance;
1251  if(moving(Down)) myAdvance[2] -= linearDistance;
1252  }
1253 
1255  inline const osg::Vec3d& advance() const
1256  {
1257  return myAdvance;
1258  }
1259 
1260  inline void stop()
1261  {
1262  myState = Stopped;
1263  myAdvance.set(0.0,0.0,0.0);
1264  myEuler.set(0.0,0.0,0.0);
1265  }
1266 
1267  inline void clearAdvance()
1268  {
1269  myAdvance.set(0.0,0.0,0.0);
1270  }
1271 
1272  inline bool stopped()
1273  {
1274  return myState == Stopped;
1275  }
1276 
1277  inline bool moving() const
1278  {
1279  return myState != Stopped;
1280  }
1281 
1282  inline bool moving(Direction d) const
1283  {
1284  return (myState & d) != 0;
1285  }
1286 
1287  inline void setMoving(Direction d, bool moving)
1288  {
1289  myState = moving ? myState | d : myState & ~d;
1290  }
1291 
1292  enum Angle
1293  {
1294  YawLeft = 1,
1295  YawRight = 2,
1296  PitchUp = 4,
1297  PitchDown = 8,
1298  RollLeft = 16,
1299  RollRight = 32
1300  };
1301 
1302  inline void applyRotation(double angle)
1303  {
1304  if(rotating(YawRight)) myEuler[0] -= angle;
1305  if(rotating(YawLeft)) myEuler[0] += angle;
1306  if(rotating(PitchUp)) myEuler[1] += angle;
1307  if(rotating(PitchDown)) myEuler[1] -= angle;
1308  if(rotating(RollRight)) myEuler[2] += angle;
1309  if(rotating(RollLeft)) myEuler[2] -= angle;
1310  }
1311 
1312  inline const osg::Vec3d& euler() const
1313  {
1314  return myEuler;
1315  }
1316 
1317  inline osg::Vec3d& euler()
1318  {
1319  return myEuler;
1320  }
1321 
1322  inline void level()
1323  {
1324  myEuler.set(0.0,0.0,0.0);
1325  }
1326 
1327  inline bool rotating() const
1328  {
1329  return myState != Stopped;
1330  }
1331 
1332  inline bool rotating( Angle d ) const
1333  {
1334  return (myState & d) != 0;
1335  }
1336 
1337  inline void setRotating( Angle d, bool rotating )
1338  {
1339  myState = rotating ? myState | d : myState & ~d;
1340  }
1341 
1342  protected:
1343 
1347  osg::Vec3d myAdvance;
1348  osg::Vec3d myEuler;
1349 
1350  unsigned char myState;
1351  };
1352 
1357 
1362 
1364 
1369 
1373 
1379 
1383 
1384  //
1393 
1397 
1401 
1403  osg::Vec3d myCameraOffset;
1405  osg::Quat myCameraRotation;
1406 
1407  osg::Vec3d myObserverWorldUp;
1410 
1411  osg::Vec3d myAttachedWorldUp;
1414 
1415  osg::Vec3d myObserverUp;
1416  osg::Vec3d myObserverFront;
1417  osg::Vec3d myObserverRight;
1418 
1419  osg::Vec3d myLevelObserverUp;
1422 
1423  osg::Vec3d myAttachedUp;
1424  osg::Vec3d myAttachedFront;
1425  osg::Vec3d myAttachedRight;
1426 
1427  osg::Vec3d myLevelAttachedUp;
1430 
1434 
1438 
1439  osg::Vec3d myCameraUp;
1440  osg::Vec3d myCameraFront;
1441  osg::Vec3d myCameraRight;
1442 
1444 
1449 
1451 
1454 
1457 
1466  // force an orientation reset AFTER the next time the observer position is updated
1467  // Needed when making large attach jumps
1469 
1473 
1475 
1477  osg::Vec3d myViewIntersect;
1478 
1480  mutable osg::Vec3d myMutableDownIntersect;
1481 
1482  osg::Vec3d myAttachPosition;
1483 
1486 
1490 
1491  double myAltitude;
1492 
1497 
1501 
1502  typedef std::unordered_map<DtElementID, bool> ElementVisibilityMap;
1504 
1505  // Paged terrain initialization
1513 
1514  // Used for speed scaling, this is the same as myHeightAboveTerrain
1515  // when unattached, but the distance from the attached entity when
1516  // attached
1518 
1519  // curvature adjustment
1523 
1524  osg::Quat myCameraShakeRot;
1525 
1527 
1528  DtIntersectorsContainer* myIntersectors = nullptr;
1529 
1531 
1534  DtCoordinateSystem* myCoordinateSystem = nullptr;
1535  };
1536 
1537 }
osg::Quat myCameraRotation
This is the camera (wrt the observer) as a quaternion.
Definition: DtOsgObserverObject.h:1405
osg::Vec3d myDragMove
Change in world position due to drag.
Definition: DtOsgObserverObject.h:1170
osg::Vec3d myMutableDownIntersect
Definition: DtOsgObserverObject.h:1480
Definition: DtOsgObserverObject.h:56
bool myHaveViewIntersect
Definition: DtOsgObserverObject.h:1476
void setRotating(Angle d, bool rotating)
Definition: DtOsgObserverObject.h:1337
ElementVisibilityMap myPendingVisibilityState
Definition: DtOsgObserverObject.h:1503
bool myAttachmentHas3DCockpit
Definition: DtOsgObserverObject.h:1446
osg::Vec3d myLevelObserverMimicUp
Definition: DtOsgObserverObject.h:1431
osg::Vec3d myAttachedWorldEast
Definition: DtOsgObserverObject.h:1413
bool myHave3DOffsetCache
Definition: DtOsgObserverObject.h:1211
int myOrientToTargetConstraint
This is an int rather than a bool because we increment/decrement it, much like a reference pointer...
Definition: DtOsgObserverObject.h:1462
osg::Vec3d myObserverUp
Definition: DtOsgObserverObject.h:1415
double myHeightOfTerrain
Definition: DtOsgObserverObject.h:1512
std::vector< DtUniqueID > myCurrentAttachments
Definition: DtOsgObserverObject.h:1127
double myStartGotoTerrainCenterTime
Definition: DtOsgObserverObject.h:1508
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:1201
osg::Vec3d myAttachedOffsetUp
Definition: DtOsgObserverObject.h:1435
osg::Vec3d myAttachedOffsetRight
Definition: DtOsgObserverObject.h:1437
osg::Vec3d myOrbitAdvance
Definition: DtOsgObserverObject.h:1174
DtCoordinateConverter is the base class for &#39;local (cig) to geocentric&#39; converters.
Definition: DtCoordinateConverter.h:25
osg::Vec3d myCameraRight
Definition: DtOsgObserverObject.h:1441
osg::Vec3d myCameraUp
Definition: DtOsgObserverObject.h:1439
double myHeightAboveTerrain
Definition: DtOsgObserverObject.h:1511
double myMaxLinearSpeed
Need just these, for terrain scaling.
Definition: DtOsgObserverObject.h:1375
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
double myLinearSpeed
Definition: DtOsgObserverObject.h:1371
This form is used for doing level (&#39;flying carpet&#39;) style movements.
Definition: DtOsgObserverObject.h:1223
osg::Vec3d myLevelAttachedFront
Definition: DtOsgObserverObject.h:1428
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:1365
osg::Vec3d myObserverPosition
Change in observer position this frame.
Definition: DtOsgObserverObject.h:1160
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:36
MotionState myFlashlightRotatingState
Definition: DtOsgObserverObject.h:1363
osg::Vec3d myLocationAttachPoint
Definition: DtOsgObserverObject.h:1526
osg::Vec3d my2DTo3DCachedObserverOffsetVector
Definition: DtOsgObserverObject.h:1207
osg::Vec3d myLevelAttachedPosition
Definition: DtOsgObserverObject.h:1167
double mySceneCenterOffsetX
Definition: DtOsgObserverObject.h:1380
void level()
Definition: DtOsgObserverObject.h:1322
bool mySpeedScaling
Definition: DtOsgObserverObject.h:1447
bool myViewResolutionDecreasingState
Definition: DtOsgObserverObject.h:1495
osg::Vec3d myLevelObserverFront
Definition: DtOsgObserverObject.h:1420
double myViewResolution
Definition: DtOsgObserverObject.h:1496
bool myLookingUp
Definition: DtOsgObserverObject.h:1389
osg::Vec3d myAttachedOffsetFront
Definition: DtOsgObserverObject.h:1436
osg::Matrixd myLevelObserverRotationMatrix
Definition: DtOsgObserverObject.h:1204
bool myOrbitingUp
Definition: DtOsgObserverObject.h:1367
static const double theCenterConstrainHeight
Definition: DtOsgObserverObject.h:1114
void applyMovement(double linearDistance)
Update the advance based upon the movement.
Definition: DtOsgObserverObject.h:1244
std::unordered_map< DtElementID, bool > ElementVisibilityMap
Definition: DtOsgObserverObject.h:1502
bool myIsAttachmentResetIfAttachedBoundsChanged
Whether or not the observer will reset its attachment, if the objects it is attached to bounding volu...
Definition: DtOsgObserverObject.h:1472
TerrainResult
Definition: DtOsgObserverObject.h:53
bool myOrbitingDown
Definition: DtOsgObserverObject.h:1368
bool myInternalSuppressConstrainToTerrain
suppress when jumping...
Definition: DtOsgObserverObject.h:1453
osg::Vec3d myObserverWorldUp
Definition: DtOsgObserverObject.h:1407
bool rotating(Angle d) const
Definition: DtOsgObserverObject.h:1332
osg::Vec3d myAttachedWorldNorth
Definition: DtOsgObserverObject.h:1412
osg::Vec3d myLevelObserverRight
Definition: DtOsgObserverObject.h:1421
bool myHaveTerrainPivot
Definition: DtOsgObserverObject.h:1474
const osg::Vec3d & advance() const
Get the current movement advance.
Definition: DtOsgObserverObject.h:1255
osg::Vec3d myAttachedFront
Definition: DtOsgObserverObject.h:1424
osg::Vec3d myLevelAttachedUp
Definition: DtOsgObserverObject.h:1427
osg::Quat myAttachedRotationOffset
My Attached rotation offset.
Definition: DtOsgObserverObject.h:1183
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:1198
double mySpeedScaleHeightEquivalent
Definition: DtOsgObserverObject.h:1517
MotionState myAbsoluteLevelRotatingState
Definition: DtOsgObserverObject.h:1361
osg::Quat my2DTo3DCachedObserverRotationOffset
Definition: DtOsgObserverObject.h:1209
unsigned char myState
Definition: DtOsgObserverObject.h:1350
bool myLookingTiltLeft
Definition: DtOsgObserverObject.h:1392
DtSignalConnectionManager myConnections
Definition: DtOsgObserverObject.h:1530
double myLinearScaledSpeedGain
Definition: DtOsgObserverObject.h:1377
osg::Vec3d myObserverPositionVector
— Observer
Definition: DtOsgObserverObject.h:1142
bool myLookingLeft
Definition: DtOsgObserverObject.h:1388
osg::Vec3d myPreviousOffsetVector
Definition: DtOsgObserverObject.h:1489
bool myGotoTerrainCenterPending
Definition: DtOsgObserverObject.h:1506
A DtTerrainPatchObject contains the methods for loading a file as a terrain. When loading a file as a...
Definition: DtTerrainPatchObject.h:37
static const double theHeightAboveTerrainUpdatePeriod
Definition: DtOsgObserverObject.h:1109
bool myOrientToOnReset
Definition: DtOsgObserverObject.h:1464
bool myViewResolutionIncreasingState
Currently for 2D only, these variables will be ignored if projecting in 3D mode.
Definition: DtOsgObserverObject.h:1494
osg::Vec3d myObserverWorldEast
Definition: DtOsgObserverObject.h:1409
double mySceneCenterOffsetZ
Definition: DtOsgObserverObject.h:1382
MotionState myRotatingState
Definition: DtOsgObserverObject.h:1358
const osg::Vec3d & euler() const
Definition: DtOsgObserverObject.h:1312
osg::Matrixd myLevelObserverMimicRotationMatrix
Definition: DtOsgObserverObject.h:1203
double myAltitude
Definition: DtOsgObserverObject.h:1491
osg::Quat myAttachedRotation
Definition: DtOsgObserverObject.h:1200
osg::Vec3d myLevelObserverMimicFront
Definition: DtOsgObserverObject.h:1432
osg::Vec3d mySavedObserverOffsetVector
Used for switching between track mode and other attached modes.
Definition: DtOsgObserverObject.h:1157
osg::Vec3d myMasterPositionVector
Definition: DtOsgObserverObject.h:1144
bool myExternalSuppressConstrainToTerrain
suppress when told to
Definition: DtOsgObserverObject.h:1456
float myFlashlightAngle
Definition: DtOsgObserverObject.h:1522
bool myHideModelOnAttach
Definition: DtOsgObserverObject.h:1445
double myAttachedRoll
Definition: DtOsgObserverObject.h:1133
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
bool myMovedSinceLastHAT
Definition: DtOsgObserverObject.h:1521
bool myLocalModelScalingEnabled
Definition: DtOsgObserverObject.h:1150
bool moving() const
Definition: DtOsgObserverObject.h:1277
Contains makVrv::DtObserverObject class.
bool myChanged
Definition: DtOsgObserverObject.h:1135
void applyRotation(double angle)
Definition: DtOsgObserverObject.h:1302
int myPartAttachment
Definition: DtOsgObserverObject.h:1129
osg::Quat myFinalCameraRotation
This is the combined camera/observer orientation; this is what the DtOsgChannel uses to orient itself...
Definition: DtOsgObserverObject.h:1396
Direction
Definition: DtOsgObserverObject.h:1227
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:29
MotionState myAttachedObserverState
Definition: DtOsgObserverObject.h:1355
static const double theMaxTerrainRetryTime
Definition: DtOsgObserverObject.h:1111
MotionState myRotatingLevelState
Definition: DtOsgObserverObject.h:1359
osg::Vec3d my2DTo3DCachedObserverPosition
Definition: DtOsgObserverObject.h:1206
osg::Quat myMasterRotation
Definition: DtOsgObserverObject.h:1187
double myAttachedYaw
Definition: DtOsgObserverObject.h:1131
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtSignalConnectionManager myAttachmentBoundingVolumeSignals
Definition: DtOsgObserverObject.h:1125
osg::Vec3d myLastSpeedPositionVector
Definition: DtOsgObserverObject.h:1143
osg::Vec3d myLevelObserverUp
Definition: DtOsgObserverObject.h:1419
DtUniqueID myPendingTerrainPatchId
Definition: DtOsgObserverObject.h:1509
bool rotating() const
Definition: DtOsgObserverObject.h:1327
DtObserverObject::AttachType my3DAttachType
Definition: DtOsgObserverObject.h:1443
NorthType
Definition: DtObserverObject.h:56
double myHeightAboveTerrainTimer
Definition: DtOsgObserverObject.h:1448
double mySceneCenterOffsetY
Definition: DtOsgObserverObject.h:1381
osg::Vec3d myFinalCameraPositionVector
This is the combined camera/observer orientation; this is what the DtOsgChannel uses to orient itself...
Definition: DtOsgObserverObject.h:1400
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:1218
bool myIsChangingDimension
Definition: DtOsgObserverObject.h:1212
double myCurvatureAdjustment
Definition: DtOsgObserverObject.h:1520
double myNextGotoTerrainCenterTime
Definition: DtOsgObserverObject.h:1507
static const double theMinViewResolution
Definition: DtOsgObserverObject.h:1117
Angle
Definition: DtOsgObserverObject.h:1292
MotionState myAbsoluteRotatingState
Definition: DtOsgObserverObject.h:1360
osg::Vec3d myObserverRotationalVelocityVector
Definition: DtOsgObserverObject.h:1148
osg::Vec3d myPreviousTerrainCenter
Definition: DtOsgObserverObject.h:1510
bool myMutableHaveDownIntersect
Definition: DtOsgObserverObject.h:1479
bool myForceOrientReset
Definition: DtOsgObserverObject.h:1468
void stop()
Definition: DtOsgObserverObject.h:1260
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:41
bool myOrientCameraToTargetConstraint
Definition: DtOsgObserverObject.h:1463
osg::Vec3d myObserverFront
Definition: DtOsgObserverObject.h:1416
osg::Vec3d myObserverWorldNorth
Definition: DtOsgObserverObject.h:1408
MotionState myLevelObserverState
Definition: DtOsgObserverObject.h:1354
bool myLookingTiltRight
Definition: DtOsgObserverObject.h:1391
osg::Vec3d myObserverOffsetVector
Current offset from an attachment, when attached.
Definition: DtOsgObserverObject.h:1154
double myLastTickTime
Definition: DtOsgObserverObject.h:1136
osg::Vec3d myPreviousPositionVector
for backing out if we hit a constraint
Definition: DtOsgObserverObject.h:1488
void clearAdvance()
Definition: DtOsgObserverObject.h:1267
bool moving(Direction d) const
Definition: DtOsgObserverObject.h:1282
osg::Vec3d myEuler
Definition: DtOsgObserverObject.h:1348
osg::Quat myCameraShakeRot
Definition: DtOsgObserverObject.h:1524
osg::Quat myFlashlightRotation
Flashlight orientation offset as a quaternion.
Definition: DtOsgObserverObject.h:1190
Base class to provide boost signal/slot management.
osg::Vec3d myViewIntersect
Definition: DtOsgObserverObject.h:1477
osg::Quat my2DTo3DCachedObserverRotation
Definition: DtOsgObserverObject.h:1208
osg::Vec3d myLevelObserverMimicRight
Definition: DtOsgObserverObject.h:1433
bool mySyncPending
Definition: DtOsgObserverObject.h:1145
osg::Vec3d myAdvance
This, when scaled, will provide the direction that the observer should move in as the result of tick-...
Definition: DtOsgObserverObject.h:1347
bool myLookingRight
-— Camera
Definition: DtOsgObserverObject.h:1387
osg::Vec3d myAttachedUp
Definition: DtOsgObserverObject.h:1423
DT_DLL_vrfutil double mag(double x[3])
osg::Vec3d myCameraOffset
This is the camera offset wrt to observer.
Definition: DtOsgObserverObject.h:1403
osg::Quat mySavedObserverRotation
This is used for switching between track mode and other attach modes.
Definition: DtOsgObserverObject.h:1193
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:42
osg::Vec3d myLevelAttachedRight
Definition: DtOsgObserverObject.h:1429
double myRotationSpeed
Definition: DtOsgObserverObject.h:1372
double myLastAttachedBvolDiameter
Definition: DtOsgObserverObject.h:1484
bool mySyncSuppressed
Definition: DtOsgObserverObject.h:1146
void setMoving(Direction d, bool moving)
Definition: DtOsgObserverObject.h:1287
double myMinLinearSpeed
Definition: DtOsgObserverObject.h:1376
osg::Quat myObserverRotation
This is our ENU observer orientation as a quaternion.
Definition: DtOsgObserverObject.h:1186
double myAttachedPitch
Definition: DtOsgObserverObject.h:1132
Contains DLL export macros.
double myLastAttachBvolOffset
Definition: DtOsgObserverObject.h:1485
MotionState myObserverState
Definition: DtOsgObserverObject.h:1353
osg::Vec3d myObserverLinearVelocityVector
Definition: DtOsgObserverObject.h:1147
float myLocalModelScalingAmount
Definition: DtOsgObserverObject.h:1151
osg::Vec3d myAttachedWorldUp
Definition: DtOsgObserverObject.h:1411
bool stopped()
Definition: DtOsgObserverObject.h:1272
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:70
std::vector< DtUniqueID > mySecondaryAttachments
Definition: DtOsgObserverObject.h:1128
osg::Vec3d myAttachPosition
Definition: DtOsgObserverObject.h:1482
osg::Vec3d myOrientToPosition
Definition: DtOsgObserverObject.h:1172
bool myOrbitingRight
Definition: DtOsgObserverObject.h:1366
double myLastViewMagnification
Definition: DtOsgObserverObject.h:1500
osg::Vec3d myAttachedPosition
Definition: DtOsgObserverObject.h:1165
double myOrbitSpeed
Definition: DtOsgObserverObject.h:1370
static const double theMaxViewResolution
Definition: DtOsgObserverObject.h:1120
MotionState myLevelAttachedObserverState
Definition: DtOsgObserverObject.h:1356
bool myConstrainToTerrain
Definition: DtOsgObserverObject.h:1450
double myCurrentViewMagnification
Only used in 3D.
Definition: DtOsgObserverObject.h:1499
osg::Vec3d myObserverRight
Definition: DtOsgObserverObject.h:1417
bool myOrbiting
Definition: DtOsgObserverObject.h:1465
osg::Vec3d myCameraFront
Definition: DtOsgObserverObject.h:1440
bool myLookingDown
Definition: DtOsgObserverObject.h:1390
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtOsgObserverObject.h:48
osg::Vec3d myLevelObserverPosition
Gravity change in observer position this frame.
Definition: DtOsgObserverObject.h:1163
double myCurrentObserverDistance
largest of the distances currently in play in a given frame. This is how far we&#39;ll advance...
Definition: DtOsgObserverObject.h:1180
double mySpeedScaleSpeed
Definition: DtOsgObserverObject.h:1378
static const double theObserverBoundingSphere
Definition: DtOsgObserverObject.h:1108
osg::Vec3d myAttachedRight
Definition: DtOsgObserverObject.h:1425
osg::Vec3d & euler()
Definition: DtOsgObserverObject.h:1317
AttachType
Definition: DtObserverObject.h:36
MotionState()
Definition: DtOsgObserverObject.h:1238

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)