19 #include <osg/Matrixd>
25 #include <unordered_map>
38 class DtCoordinateConverter;
40 class DtTerrainPatchObject;
41 class DtAgentUpdateResolverInterface;
42 class DtIntersectorsContainer;
43 class DtCoordinateSystem;
55 TerrainResultNoData = 0,
80 virtual void tick(
double simTime );
83 virtual void tickAttachment();
87 virtual void setModelSet(
int modelSet );
90 virtual double altitude()
const;
92 virtual void setNameAndRegister(
const std::string& name );
99 virtual void setCameraPositionAndOrientation(
const osg::Vec3d& position,
100 const osg::Quat& rotation );
102 virtual void getCameraPositionAndOrientation( osg::Vec3d& position,
103 osg::Quat& rotation )
const;
107 static void matrixdToTaitBryan(
const osg::Matrixd& mat, DtTaitBryan& tb,
bool isWorld2D =
false );
108 static double clampUnity(
double x );
118 virtual void startMoveObserverRight();
121 virtual void stopMoveObserverRight();
122 virtual void moveObserverRight(
double meters );
125 virtual void startMoveObserverForward();
128 virtual void stopMoveObserverForward();
129 virtual void moveObserverForward(
double meters );
133 virtual void startMoveObserverUp();
136 virtual void stopMoveObserverUp();
137 virtual void moveObserverUp(
double meters );
141 virtual void startMoveObserverLeft();
144 virtual void stopMoveObserverLeft();
145 virtual void moveObserverLeft(
double meters );
149 virtual void startMoveObserverBack();
152 virtual void stopMoveObserverBack();
153 virtual void moveObserverBack(
double meters );
157 virtual void startMoveObserverDown();
160 virtual void stopMoveObserverDown();
161 virtual void moveObserverDown(
double meters );
165 virtual void startMoveLevelObserverRight();
169 virtual void stopMoveLevelObserverRight();
170 virtual void moveLevelObserverRight(
double meters );
174 virtual void startMoveLevelObserverForward();
178 virtual void stopMoveLevelObserverForward();
179 virtual void moveLevelObserverForward(
double meters );
183 virtual void startMoveLevelObserverUp();
187 virtual void stopMoveLevelObserverUp();
188 virtual void moveLevelObserverUp(
double meters );
192 virtual void startMoveLevelObserverLeft();
196 virtual void stopMoveLevelObserverLeft();
197 virtual void moveLevelObserverLeft(
double meters );
201 virtual void startMoveLevelObserverBack();
205 virtual void stopMoveLevelObserverBack();
206 virtual void moveLevelObserverBack(
double meters );
210 virtual void startMoveLevelObserverDown();
213 virtual void stopMoveLevelObserverDown();
214 virtual void moveLevelObserverDown(
double meters );
218 virtual void startMoveAttachedRight();
221 virtual void stopMoveAttachedRight();
222 virtual void moveAttachedRight(
double meters );
225 virtual void startMoveAttachedForward();
228 virtual void stopMoveAttachedForward();
229 virtual void moveAttachedForward(
double meters );
233 virtual void startMoveAttachedUp();
236 virtual void stopMoveAttachedUp();
237 virtual void moveAttachedUp(
double meters );
241 virtual void startMoveAttachedLeft();
244 virtual void stopMoveAttachedLeft();
245 virtual void moveAttachedLeft(
double meters );
249 virtual void startMoveAttachedBack();
252 virtual void stopMoveAttachedBack();
253 virtual void moveAttachedBack(
double meters );
257 virtual void startMoveAttachedDown();
260 virtual void stopMoveAttachedDown();
261 virtual void moveAttachedDown(
double meters );
265 virtual void startMoveLevelAttachedRight();
269 virtual void stopMoveLevelAttachedRight();
270 virtual void moveLevelAttachedRight(
double meters );
274 virtual void startMoveLevelAttachedForward();
278 virtual void stopMoveLevelAttachedForward();
279 virtual void moveLevelAttachedForward(
double meters );
283 virtual void startMoveLevelAttachedUp();
287 virtual void stopMoveLevelAttachedUp();
288 virtual void moveLevelAttachedUp(
double meters );
292 virtual void startMoveLevelAttachedLeft();
296 virtual void stopMoveLevelAttachedLeft();
297 virtual void moveLevelAttachedLeft(
double meters );
301 virtual void startMoveLevelAttachedBack();
305 virtual void stopMoveLevelAttachedBack();
306 virtual void moveLevelAttachedBack(
double meters );
310 virtual void startMoveLevelAttachedDown();
313 virtual void stopMoveLevelAttachedDown();
314 virtual void moveLevelAttachedDown(
double meters );
318 virtual void startMoveAttachedContextRight();
321 virtual void stopMoveAttachedContextRight();
322 virtual void moveAttachedContextRight(
double meters );
326 virtual void startMoveAttachedContextForward();
329 virtual void stopMoveAttachedContextForward();
330 virtual void moveAttachedContextForward(
double meters );
334 virtual void startMoveAttachedContextUp();
337 virtual void stopMoveAttachedContextUp();
338 virtual void moveAttachedContextUp(
double meters );
342 virtual void startMoveAttachedContextLeft();
345 virtual void stopMoveAttachedContextLeft();
346 virtual void moveAttachedContextLeft(
double meters );
350 virtual void startMoveAttachedContextBack();
353 virtual void stopMoveAttachedContextBack();
354 virtual void moveAttachedContextBack(
double meters );
358 virtual void startMoveAttachedContextDown();
360 virtual void stopMoveAttachedContextDown();
361 virtual void moveAttachedContextDown(
double meters );
365 virtual void startYawLeft();
368 virtual void stopYawLeft();
369 virtual void rotateYawLeft(
double rads);
373 virtual void startYawRight();
377 virtual void stopYawRight();
378 virtual void rotateYawRight(
double rads);
382 virtual void startPitchUp();
385 virtual void stopPitchUp();
386 virtual void rotatePitchUp(
double rads );
387 virtual void rotateFlashlightPitchUp(
double rads );
391 virtual void startPitchDown();
394 virtual void stopPitchDown();
395 virtual void rotatePitchDown(
double rads );
396 virtual void rotateFlashlightPitchDown(
double rads );
400 virtual void startRollLeft();
403 virtual void stopRollLeft();
404 virtual void rollLeft(
double rads);
408 virtual void startRollRight();
411 virtual void stopRollRight();
412 virtual void rollRight(
double rads);
416 virtual void startLevelYawLeft();
419 virtual void stopLevelYawLeft();
423 virtual void startLevelYawRight();
427 virtual void stopLevelYawRight();
431 virtual void startLevelPitchUp();
434 virtual void stopLevelPitchUp();
435 virtual void rotateLevelPitchUp(
double rads);
439 virtual void startLevelPitchDown();
442 virtual void stopLevelPitchDown();
443 virtual void rotateLevelPitchDown(
double rads);
447 virtual void startLevelRollLeft();
450 virtual void stopLevelRollLeft();
451 virtual void rollLevelLeft(
double rads);
455 virtual void startLevelRollRight();
458 virtual void stopLevelRollRight();
459 virtual void rollLevelRight(
double rads);
462 virtual void rotateLevelYawLeft(
double rads );
463 virtual void rotateLevelYawRight(
double rads );
464 virtual void rotateFlashlightYawLeft(
double rads );
465 virtual void rotateFlashlightYawRight(
double rads );
467 virtual void startLookLeft();
468 virtual void stopLookLeft();
469 virtual void lookLeft(
double rads );
471 virtual void startLookRight();
472 virtual void stopLookRight();
473 virtual void lookRight(
double rads );
475 virtual void startLookUp();
476 virtual void stopLookUp();
477 virtual void lookUp(
double rads );
479 virtual void startLookDown();
480 virtual void stopLookDown();
481 virtual void lookDown(
double rads );
483 virtual void startLookTiltRight();
484 virtual void stopLookTiltRight();
485 virtual void lookTiltRight(
double rads );
487 virtual void startLookTiltLeft();
488 virtual void stopLookTiltLeft();
489 virtual void lookTiltLeft(
double rads );
492 virtual void startOrbitingLeft();
495 virtual void stopOrbitingLeft();
496 virtual void orbitLeft(
double rads );
500 virtual void startOrbitingRight();
503 virtual void stopOrbitingRight();
504 virtual void orbitRight(
double rads );
508 virtual void startOrbitingUp();
511 virtual void stopOrbitingUp();
512 virtual void orbitUp(
double rads );
516 virtual void startOrbitingDown();
519 virtual void stopOrbitingDown();
520 virtual void orbitDown(
double rads );
524 virtual void setLocation(
double x,
double y,
double z);
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;
536 virtual void setOrientation(
double psi,
double theta,
double phi );
539 virtual void setTopographicOrientation(
double psi,
double theta,
double phi );
542 virtual void setOrientation(
double x,
double y,
double z,
double w);
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;
552 virtual void setAttachedOrientation(
double x,
double y,
double z,
557 void setLocalModelScalingEnabled(
bool enabled );
561 void setLocalModelScalingAmount(
float amount );
565 virtual void jumpTo(
double x,
double y,
double z );
570 virtual void orientTo(
double x,
double y,
double z );
573 virtual void dragTerrain(
double lastX,
double lastY,
double lastZ,
574 double currX,
double currY,
double currZ );
576 virtual void dragTerrain2(
double myStartDragX,
double myStartDragY,
577 double myStartDragZ,
int deltaMouseX,
int deltaMouseY );
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 );
588 virtual void scrollFlashlightWider(
int wheelUnits );
589 virtual void scrollFlashlightNarrower(
int wheelUnits );
592 virtual float flashlightAngle();
596 virtual void startIncreasingViewResolution();
597 virtual void stopIncreasingViewResolution();
598 virtual void increaseViewResolution();
600 virtual void startDecreasingViewResolution();
601 virtual void stopDecreasingViewResolution();
602 virtual void decreaseViewResolution();
605 virtual void setViewResolution(
double resolution);
608 virtual double viewResolution()
const;
615 virtual void setCurrentViewMagnification(
double mag );
618 virtual double currentViewMagnification()
const;
627 virtual void setOrbitSpeed(
double speed );
630 virtual void setLinearSpeed(
double speed );
633 virtual void setRotationSpeed(
double speed );
636 virtual void setMinLinearSpeed(
double minSpeed );
639 virtual void setMaxLinearSpeed(
double maxSpeed );
642 virtual void setLinearScaledSpeedGain(
double gain );
649 virtual void gotoTerrainCenter(
DtUniqueID terrainPatch,
bool retry );
652 virtual void resetAttachment();
654 virtual void resetOrientation();
657 virtual void resetCamera();
658 virtual void level();
660 virtual void stopAll();
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 );
667 virtual void attachToPart(
int partId);
668 virtual void detach();
670 virtual void setHideModelOnAttach(
bool hide );
674 virtual void setUsesBoundingVolumeForAttachedOffsets(
bool useBoundingVolume);
678 virtual bool usesBoundingVolumeForAttachedOffsets()
const;
683 virtual void setAttachmentHas3DCockpit(
bool cockpit );
685 virtual void scaleCurrentAttachments(
bool scaled );
686 virtual void setOrientToTargetConstraint(
bool orient );
687 virtual void setOrbiting(
bool orbit );
688 virtual void setOrientCameraToTargetConstraint(
bool orient );
690 virtual void setConstrainToTerrain(
bool trueFalse );
691 virtual void setConstrainToCenter(
bool trueFalse );
695 virtual void suppressConstrainToTerrain(
bool trueFalse );
697 virtual void setSpeedScaling(
bool trueFalse );
700 virtual void setSpeedScaledSpeed(
double speed );
703 virtual void getLocation(
double &x,
double &y,
double& z)
const;
705 virtual void getObserverPosition(
double &x,
double &y,
double& z)
const;
706 virtual void getEffectiveLocation(
double &x,
double &y,
double& z)
const;
710 virtual void getObserverCameraPosition(
double& x,
double& y,
double& z)
const;
713 virtual void getOrientation(
double& psi,
double& theta,
double& phi )
const;
717 virtual void getObserverCameraOrientation(
double& psi,
double& theta,
double& phi,
bool includeShake)
const;
720 virtual void getTopographicOrientation(
double& psi,
double& theta,
double& phi )
const;
722 virtual void getOrientation(
double& x,
double& y,
double& z,
double& w )
const;
724 virtual void getFlashlightOrientation(
double& x,
double& y,
double& z,
double& w )
const;
728 virtual void getObserverPlatformFront(
double& x,
double& y,
double& z)
const;
732 virtual void getObserverPlatformUp(
double& x,
double& y,
double& z)
const;
736 virtual void getObserverPlatformRight(
double& x,
double& y,
double& z)
const;
740 virtual void getObserverCameraFront(
double& x,
double& y,
double& z,
bool includeShake)
const;
743 virtual void getObserverCameraUp(
double& x,
double& y,
double& z,
bool includeShake)
const;
746 virtual void getObserverCameraRight(
double& x,
double& y,
double& z,
bool includeShake)
const;
748 virtual void getCameraUp(
double& x,
double& y,
double& z);
750 virtual void getCameraFront(
double& x,
double& y,
double& z);
752 virtual void getCameraRight(
double& x,
double& y,
double& z);
755 virtual void setCameraShakeRotation(
double x,
double y,
double z,
double w);
758 virtual void getCameraShakeRotation(
double& x,
double& y,
double& z,
double& w);;
767 virtual double heightAboveTerrainFromCurrentZoom(
double magnification = 1.)
const;
772 virtual double altitudeFromCurrentZoom(
double magnification=1.)
const;
776 virtual double zoomFromHeightAboveTerrain(
double hat,
double magnification=1)
const;
780 virtual double zoomFromAltitude(
double altitude,
double magnification=1.)
const;
786 virtual double zoomFromCurrentAltitude()
const;
790 virtual double topographicHeading()
const;
793 virtual void getLinearVelocity(
double &x,
double &y,
double &z)
const;
796 virtual void getRotationalVelocity(
double& x,
double& y,
double& z)
const;
801 virtual void setModeSetting(
int setting,
bool value );
808 virtual std::vector<DtUniqueID> currentAttachments()
const;
813 virtual const osg::Vec3d& locationTrackAttachmentVec3d()
const;
814 virtual void getLocationTrackAttachment(
double& x,
double& y,
double& z )
const;
828 virtual bool attachedObjectHidden()
const;
833 virtual bool attachmentHas3DCockpit()
const;
837 virtual osg::Vec3d attachedOffsetVector()
const;
843 virtual double attachedNearClipOffset()
const;
846 virtual double heightAboveTerrain()
const;
849 virtual double heightOfTerrain()
const;
860 virtual bool shouldOrientToGlobeCenter();
863 virtual void adjustToGlobeCurvature();
866 virtual bool shouldRotateGlobe();
868 virtual void calcObserverWorldVectors();
869 virtual const osg::Vec3d& observerWorldUp()
const;
870 virtual const osg::Vec3d& observerWorldNorth()
const;
871 virtual const osg::Vec3d& observerWorldEast()
const;
873 virtual const osg::Vec3d& attachedWorldUp()
const;
875 virtual osg::Vec3d& observerUp();
876 virtual osg::Vec3d& observerFront();
877 virtual osg::Vec3d& observerRight();
878 virtual void observerBasis(osg::Vec3d& up, osg::Vec3d& front, osg::Vec3d& right);
880 virtual osg::Vec3d& attachedUp();
881 virtual osg::Vec3d& attachedFront();
882 virtual osg::Vec3d& attachedRight();
884 virtual osg::Vec3d& attachedOffsetUp();
885 virtual osg::Vec3d& attachedOffsetFront();
886 virtual osg::Vec3d& attachedOffsetRight();
889 virtual osg::Vec3d& levelAttachedUp();
890 virtual osg::Vec3d& levelAttachedFront();
891 virtual osg::Vec3d& levelAttachedRight();
894 virtual osg::Vec3d& levelObserverMimicUp();
895 virtual osg::Vec3d& levelObserverMimicFront();
896 virtual osg::Vec3d& levelObserverMimicRight();
898 virtual osg::Vec3d& cameraUp();
899 virtual osg::Vec3d& cameraFront();
900 virtual osg::Vec3d& cameraRight();
902 virtual osg::Vec3d& levelObserverUp();
903 virtual osg::Vec3d& levelObserverFront();
904 virtual osg::Vec3d& levelObserverRight();
906 virtual void advanceOrbitLeft(
double rads );
907 virtual void advanceOrbitRight(
double rads );
908 virtual void advanceOrbitUp(
double rads );
909 virtual void advanceOrbitDown(
double rads );
911 virtual void makeLevelObserverMatrix();
914 virtual void calculateLevelAttachedRotation();
917 virtual void makeLevelObserverMimicMatrix();
922 virtual osg::Vec3d calcWorldPositionChange();
924 virtual osg::Vec3d calcMimicPositionChange();
926 virtual osg::Vec3d calcAttachedPosition(
const osg::Quat& attInverse,
const osg::Vec3d& attachedAdvance);
927 virtual osg::Vec3d calcAttachedAdvance(
const osg::Quat& tetherTrackInverse);
929 virtual osg::Vec3d calcFollowPositionChange();
930 virtual osg::Vec3d calcSpaceFollowPositionChange();
931 virtual osg::Vec3d calcTetherPositionChange();
932 virtual osg::Vec3d calcTetherTrackPositionChange();
934 virtual osg::Vec3d calcTrackPositionChange();
935 virtual osg::Quat calcTetherTrackRotation();
937 virtual osg::Quat calcFlashlightOrientationChange();
938 virtual osg::Quat calcWorldOrientationChange();
939 virtual osg::Quat calcTetherOrientationChange();
940 virtual osg::Quat calcMimicOrientationChange();
941 virtual osg::Quat calcFollowOrientationChange();
943 virtual void setCurrentAttachmentsVisibility(
bool visible );
954 virtual void orientTo(
const osg::Vec3d& target );
957 virtual void orientCameraTo(
const osg::Vec3d& target );
959 virtual TerrainResult getTerrainCenter(
const DtUniqueID& patchID, osg::Vec3d& center );
964 virtual void initializeAttachment();
966 virtual const osg::Vec3d& scalingIntersection()
const;
967 virtual void getViewIntersection();
970 virtual double linearSpeed();
973 virtual double speedScalingGain()
const;
975 virtual void calcTerrainConstraint(
const osg::Vec3d& prev );
982 virtual bool updateAttachPositionAndOrientation();
984 virtual bool getSecondaryAttachPosition( osg::Vec3d& position );
986 virtual void getObserverOffsetVector(
double& x,
double& y,
double& z )
const;
987 virtual void setObserverOffsetVector(
double x,
double y,
double z );
992 virtual void getCameraFromParentOffsetVector(
double& x,
double& y,
double& z )
const;
993 virtual void getCameraFromParentRotationOffset(
double& x,
double& y,
double& z,
double& w )
const;
996 virtual void getAttachedRotationOffset(
double& x,
double& y,
double& z,
double& w )
const;
997 virtual void setAttachedRotationOffset(
double x,
double y,
double z,
1001 osg::Vec3& bvolExtents, osg::Vec3d& bvolCenter );
1004 osg::Vec3& bvolExtents, osg::Vec3d& bvolCenter );
1006 virtual void setLocation(
const osg::Vec3d& location,
bool suppress=
true );
1008 virtual bool isMoving()
const;
1009 virtual bool isRotating()
const;
1011 virtual double computeNearClipDistance(
DtSceneObject* sceneObject );
1012 virtual float computeLocalModelScalingAmount(
DtSceneObject* sceneObject );
1014 virtual void calcScaledSpeed();
1015 virtual bool getTerrainOrPropIntersection(
const osg::Vec3d& startPos,
1025 virtual void getPositionAndOrientation(
DtSceneObject& sceneObject, osg::Vec3d& position,
1026 osg::Vec3d& orientToPosition, osg::Quat& orientation );
1028 virtual void getPositionAndOrientation(
DtTerrainPatchObject& patchObject, osg::Vec3d& position,
1029 osg::Vec3d& orientToPosition, osg::Quat& orientation );
1031 virtual void getPositionAndOrientation(
DtOsgObserverObject& observerObject, osg::Vec3d& position,
1032 osg::Vec3d& orientToPosition, osg::Quat& orientation );
1035 virtual void getPositionFromSceneObject(
DtSceneObject& sceneObject, osg::Vec3d& position )
const;
1038 virtual void getPositionFromObserverObject(
DtOsgObserverObject& observerObject, osg::Vec3d& position )
const;
1042 virtual bool getPartPositionOriFromSceneObject(
DtSceneObject& sceneObject,
1043 int partId, osg::Vec3d& position, osg::Quat& ori )
const;
1047 virtual void force2D();
1050 virtual void dimensionChanged(
bool is2D );
1051 virtual void setIs2D(
bool is2D );
1054 virtual double calculate3DAltitude()
const;
1057 virtual void calculateAltitude();
1061 virtual void synchronizeLocation(
double x,
double y,
double z );
1065 virtual void synchronizeOrientation(
double x,
double y,
double z,
double w );
1082 virtual void calcHeightAboveTerrain(
bool force=
false);
1085 std::list<DtChannel*> findChannels();
1088 std::list<const DtChannel*> findChannels()
const;
1099 virtual double frustumPixelHeight()
const;
1102 virtual void slot_coordinateSystemChanged();
1105 virtual void cache3DOffsetAndRotation();
1108 virtual void restoreAttachOffsetsFrom3DCache();
1113 virtual void slot_dateChanged();
1117 virtual bool getAttachedToBoundingVolume(
DtSceneObject*
const sceneObject, osg::Vec3d& boundingVolumeCenter, osg::Vec3& boundingVolumeExtents,
1118 double& maxOffset,
double& maxExtent);
1122 virtual bool setupAttachOffsetsAfterReset(
DtSceneObject*
const sceneObject, osg::Vec3d boundingVolumeCenter, osg::Vec3 boundingVolumeExtents,
1123 double maxOffset,
double maxExtent);
1128 virtual void setupAttachOffsets(
double maxExtent);
1132 virtual void reinitializeAfterBoundingVolumeChange();
1136 virtual void resetAfterBoundingVolumeChange();
1278 if(moving(Right)) myAdvance[0] += linearDistance;
1279 if(moving(Left)) myAdvance[0] -= linearDistance;
1280 if(moving(Forward)) myAdvance[1] += linearDistance;
1281 if(moving(Backward)) myAdvance[1] -= linearDistance;
1282 if(moving(Up)) myAdvance[2] += linearDistance;
1283 if(moving(Down)) myAdvance[2] -= linearDistance;
1295 myAdvance.set(0.0,0.0,0.0);
1296 myEuler.set(0.0,0.0,0.0);
1301 myAdvance.set(0.0,0.0,0.0);
1306 return myState == Stopped;
1311 return myState != Stopped;
1316 return (myState & d) != 0;
1321 myState = moving ? myState | d : myState & ~d;
1336 if(rotating(YawRight)) myEuler[0] -=
angle;
1337 if(rotating(YawLeft)) myEuler[0] +=
angle;
1338 if(rotating(PitchUp)) myEuler[1] +=
angle;
1339 if(rotating(PitchDown)) myEuler[1] -=
angle;
1340 if(rotating(RollRight)) myEuler[2] +=
angle;
1341 if(rotating(RollLeft)) myEuler[2] -=
angle;
1356 myEuler.set(0.0,0.0,0.0);
1361 return myState != Stopped;
1366 return (myState & d) != 0;
1371 myState = rotating ? myState | d : myState & ~d;
osg::Quat myCameraRotation
This is the camera (wrt the observer) as a quaternion.
Definition: DtOsgObserverObject.h:1437
osg::Vec3d myDragMove
Change in world position due to drag.
Definition: DtOsgObserverObject.h:1202
osg::Vec3d myMutableDownIntersect
Definition: DtOsgObserverObject.h:1516
Definition: DtOsgObserverObject.h:56
bool myHaveViewIntersect
Definition: DtOsgObserverObject.h:1512
void setRotating(Angle d, bool rotating)
Definition: DtOsgObserverObject.h:1369
ElementVisibilityMap myPendingVisibilityState
Definition: DtOsgObserverObject.h:1539
bool myAttachmentHas3DCockpit
Definition: DtOsgObserverObject.h:1478
osg::Vec3d myLevelObserverMimicUp
Definition: DtOsgObserverObject.h:1463
osg::Vec3d myAttachedWorldEast
Definition: DtOsgObserverObject.h:1445
bool myHave3DOffsetCache
Definition: DtOsgObserverObject.h:1243
int myOrientToTargetConstraint
This is an int rather than a bool because we increment/decrement it, much like a reference pointer...
Definition: DtOsgObserverObject.h:1494
osg::Vec3d myObserverUp
Definition: DtOsgObserverObject.h:1447
double myHeightOfTerrain
Definition: DtOsgObserverObject.h:1548
std::vector< DtUniqueID > myCurrentAttachments
Definition: DtOsgObserverObject.h:1159
double myStartGotoTerrainCenterTime
Definition: DtOsgObserverObject.h:1544
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:1233
osg::Vec3d myAttachedOffsetUp
Definition: DtOsgObserverObject.h:1467
osg::Vec3d myAttachedOffsetRight
Definition: DtOsgObserverObject.h:1469
osg::Vec3d myOrbitAdvance
Definition: DtOsgObserverObject.h:1206
DtCoordinateConverter is the base class for 'local (cig) to geocentric' converters.
Definition: DtCoordinateConverter.h:25
osg::Vec3d myCameraRight
Definition: DtOsgObserverObject.h:1473
osg::Vec3d myCameraUp
Definition: DtOsgObserverObject.h:1471
double myHeightAboveTerrain
Definition: DtOsgObserverObject.h:1547
double myMaxLinearSpeed
Need just these, for terrain scaling.
Definition: DtOsgObserverObject.h:1407
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
double myLinearSpeed
Definition: DtOsgObserverObject.h:1403
This form is used for doing level ('flying carpet') style movements.
Definition: DtOsgObserverObject.h:1255
osg::Vec3d myLevelAttachedFront
Definition: DtOsgObserverObject.h:1460
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:1397
osg::Vec3d myObserverPosition
Change in observer position this frame.
Definition: DtOsgObserverObject.h:1192
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:1395
osg::Vec3d myLocationAttachPoint
Definition: DtOsgObserverObject.h:1562
osg::Vec3d my2DTo3DCachedObserverOffsetVector
Definition: DtOsgObserverObject.h:1239
osg::Vec3d myLevelAttachedPosition
Definition: DtOsgObserverObject.h:1199
double mySceneCenterOffsetX
Definition: DtOsgObserverObject.h:1412
void level()
Definition: DtOsgObserverObject.h:1354
bool mySpeedScaling
Definition: DtOsgObserverObject.h:1479
bool myViewResolutionDecreasingState
Definition: DtOsgObserverObject.h:1531
osg::Vec3d myLevelObserverFront
Definition: DtOsgObserverObject.h:1452
double myViewResolution
Definition: DtOsgObserverObject.h:1532
bool myLookingUp
Definition: DtOsgObserverObject.h:1421
osg::Vec3d myAttachedOffsetFront
Definition: DtOsgObserverObject.h:1468
osg::Matrixd myLevelObserverRotationMatrix
Definition: DtOsgObserverObject.h:1236
bool myOrbitingUp
Definition: DtOsgObserverObject.h:1399
static const double theCenterConstrainHeight
Definition: DtOsgObserverObject.h:1146
void applyMovement(double linearDistance)
Update the advance based upon the movement.
Definition: DtOsgObserverObject.h:1276
std::unordered_map< DtElementID, bool > ElementVisibilityMap
Definition: DtOsgObserverObject.h:1538
TerrainResult
Definition: DtOsgObserverObject.h:53
bool myOrbitingDown
Definition: DtOsgObserverObject.h:1400
bool myInternalSuppressConstrainToTerrain
suppress when jumping...
Definition: DtOsgObserverObject.h:1485
osg::Vec3d myObserverWorldUp
Definition: DtOsgObserverObject.h:1439
bool rotating(Angle d) const
Definition: DtOsgObserverObject.h:1364
osg::Vec3d myAttachedWorldNorth
Definition: DtOsgObserverObject.h:1444
osg::Vec3d myLevelObserverRight
Definition: DtOsgObserverObject.h:1453
bool myHaveTerrainPivot
Definition: DtOsgObserverObject.h:1510
const osg::Vec3d & advance() const
Get the current movement advance.
Definition: DtOsgObserverObject.h:1287
osg::Vec3d myAttachedFront
Definition: DtOsgObserverObject.h:1456
osg::Vec3d myLevelAttachedUp
Definition: DtOsgObserverObject.h:1459
osg::Quat myAttachedRotationOffset
My Attached rotation offset.
Definition: DtOsgObserverObject.h:1215
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:1230
double mySpeedScaleHeightEquivalent
Definition: DtOsgObserverObject.h:1553
MotionState myAbsoluteLevelRotatingState
Definition: DtOsgObserverObject.h:1393
osg::Quat my2DTo3DCachedObserverRotationOffset
Definition: DtOsgObserverObject.h:1241
unsigned char myState
Definition: DtOsgObserverObject.h:1382
bool myLookingTiltLeft
Definition: DtOsgObserverObject.h:1424
DtSignalConnectionManager myConnections
Definition: DtOsgObserverObject.h:1566
double myLinearScaledSpeedGain
Definition: DtOsgObserverObject.h:1409
osg::Vec3d myObserverPositionVector
— Observer
Definition: DtOsgObserverObject.h:1174
bool myLookingLeft
Definition: DtOsgObserverObject.h:1420
osg::Vec3d myPreviousOffsetVector
Definition: DtOsgObserverObject.h:1525
bool myGotoTerrainCenterPending
Definition: DtOsgObserverObject.h:1542
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:1141
bool myOrientToOnReset
Definition: DtOsgObserverObject.h:1496
bool myViewResolutionIncreasingState
Currently for 2D only, these variables will be ignored if projecting in 3D mode.
Definition: DtOsgObserverObject.h:1530
osg::Vec3d myObserverWorldEast
Definition: DtOsgObserverObject.h:1441
double mySceneCenterOffsetZ
Definition: DtOsgObserverObject.h:1414
MotionState myRotatingState
Definition: DtOsgObserverObject.h:1390
const osg::Vec3d & euler() const
Definition: DtOsgObserverObject.h:1344
osg::Matrixd myLevelObserverMimicRotationMatrix
Definition: DtOsgObserverObject.h:1235
double myAltitude
Definition: DtOsgObserverObject.h:1527
osg::Quat myAttachedRotation
Definition: DtOsgObserverObject.h:1232
osg::Vec3d myLevelObserverMimicFront
Definition: DtOsgObserverObject.h:1464
osg::Vec3d mySavedObserverOffsetVector
Used for switching between track mode and other attached modes.
Definition: DtOsgObserverObject.h:1189
osg::Vec3d myMasterPositionVector
Definition: DtOsgObserverObject.h:1176
bool myExternalSuppressConstrainToTerrain
suppress when told to
Definition: DtOsgObserverObject.h:1488
float myFlashlightAngle
Definition: DtOsgObserverObject.h:1558
bool myHideModelOnAttach
Definition: DtOsgObserverObject.h:1477
double myAttachedRoll
Definition: DtOsgObserverObject.h:1165
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
bool myMovedSinceLastHAT
Definition: DtOsgObserverObject.h:1557
bool myLocalModelScalingEnabled
Definition: DtOsgObserverObject.h:1182
bool moving() const
Definition: DtOsgObserverObject.h:1309
Contains makVrv::DtObserverObject class.
bool myChanged
Definition: DtOsgObserverObject.h:1167
void applyRotation(double angle)
Definition: DtOsgObserverObject.h:1334
int myPartAttachment
Definition: DtOsgObserverObject.h:1161
osg::Quat myFinalCameraRotation
This is the combined camera/observer orientation; this is what the DtOsgChannel uses to orient itself...
Definition: DtOsgObserverObject.h:1428
Direction
Definition: DtOsgObserverObject.h:1259
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:29
MotionState myAttachedObserverState
Definition: DtOsgObserverObject.h:1387
static const double theMaxTerrainRetryTime
Definition: DtOsgObserverObject.h:1143
MotionState myRotatingLevelState
Definition: DtOsgObserverObject.h:1391
osg::Vec3d my2DTo3DCachedObserverPosition
Definition: DtOsgObserverObject.h:1238
osg::Quat myMasterRotation
Definition: DtOsgObserverObject.h:1219
double myAttachedYaw
Definition: DtOsgObserverObject.h:1163
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtSignalConnectionManager myAttachmentBoundingVolumeSignals
Definition: DtOsgObserverObject.h:1157
osg::Vec3d myLastSpeedPositionVector
Definition: DtOsgObserverObject.h:1175
osg::Vec3d myLevelObserverUp
Definition: DtOsgObserverObject.h:1451
DtUniqueID myPendingTerrainPatchId
Definition: DtOsgObserverObject.h:1545
bool rotating() const
Definition: DtOsgObserverObject.h:1359
DtObserverObject::AttachType my3DAttachType
Definition: DtOsgObserverObject.h:1475
NorthType
Definition: DtObserverObject.h:56
double myHeightAboveTerrainTimer
Definition: DtOsgObserverObject.h:1480
double mySceneCenterOffsetY
Definition: DtOsgObserverObject.h:1413
osg::Vec3d myFinalCameraPositionVector
This is the combined camera/observer orientation; this is what the DtOsgChannel uses to orient itself...
Definition: DtOsgObserverObject.h:1432
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:1250
bool myIsChangingDimension
Definition: DtOsgObserverObject.h:1244
double myCurvatureAdjustment
Definition: DtOsgObserverObject.h:1556
double myNextGotoTerrainCenterTime
Definition: DtOsgObserverObject.h:1543
static const double theMinViewResolution
Definition: DtOsgObserverObject.h:1149
Angle
Definition: DtOsgObserverObject.h:1324
MotionState myAbsoluteRotatingState
Definition: DtOsgObserverObject.h:1392
osg::Vec3d myObserverRotationalVelocityVector
Definition: DtOsgObserverObject.h:1180
osg::Vec3d myPreviousTerrainCenter
Definition: DtOsgObserverObject.h:1546
bool myMutableHaveDownIntersect
Definition: DtOsgObserverObject.h:1515
bool myForceOrientReset
Definition: DtOsgObserverObject.h:1500
void stop()
Definition: DtOsgObserverObject.h:1292
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
bool myOrientCameraToTargetConstraint
Definition: DtOsgObserverObject.h:1495
osg::Vec3d myObserverFront
Definition: DtOsgObserverObject.h:1448
osg::Vec3d myObserverWorldNorth
Definition: DtOsgObserverObject.h:1440
MotionState myLevelObserverState
Definition: DtOsgObserverObject.h:1386
bool myLookingTiltRight
Definition: DtOsgObserverObject.h:1423
osg::Vec3d myObserverOffsetVector
Current offset from an attachment, when attached.
Definition: DtOsgObserverObject.h:1186
double myLastTickTime
Definition: DtOsgObserverObject.h:1168
osg::Vec3d myPreviousPositionVector
for backing out if we hit a constraint
Definition: DtOsgObserverObject.h:1524
void clearAdvance()
Definition: DtOsgObserverObject.h:1299
bool moving(Direction d) const
Definition: DtOsgObserverObject.h:1314
osg::Vec3d myEuler
Definition: DtOsgObserverObject.h:1380
osg::Quat myCameraShakeRot
Definition: DtOsgObserverObject.h:1560
osg::Quat myFlashlightRotation
Flashlight orientation offset as a quaternion.
Definition: DtOsgObserverObject.h:1222
Base class to provide boost signal/slot management.
osg::Vec3d myViewIntersect
Definition: DtOsgObserverObject.h:1513
osg::Quat my2DTo3DCachedObserverRotation
Definition: DtOsgObserverObject.h:1240
osg::Vec3d myLevelObserverMimicRight
Definition: DtOsgObserverObject.h:1465
bool mySyncPending
Definition: DtOsgObserverObject.h:1177
osg::Vec3d myAdvance
This, when scaled, will provide the direction that the observer should move in as the result of tick-...
Definition: DtOsgObserverObject.h:1379
bool myLookingRight
-— Camera
Definition: DtOsgObserverObject.h:1419
osg::Vec3d myAttachedUp
Definition: DtOsgObserverObject.h:1455
DT_DLL_vrfutil double mag(double x[3])
osg::Vec3d myCameraOffset
This is the camera offset wrt to observer.
Definition: DtOsgObserverObject.h:1435
osg::Quat mySavedObserverRotation
This is used for switching between track mode and other attach modes.
Definition: DtOsgObserverObject.h:1225
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:1461
double myRotationSpeed
Definition: DtOsgObserverObject.h:1404
double myLastAttachedBvolDiameter
Definition: DtOsgObserverObject.h:1520
bool mySyncSuppressed
Definition: DtOsgObserverObject.h:1178
void setMoving(Direction d, bool moving)
Definition: DtOsgObserverObject.h:1319
double myMinLinearSpeed
Definition: DtOsgObserverObject.h:1408
osg::Quat myObserverRotation
This is our ENU observer orientation as a quaternion.
Definition: DtOsgObserverObject.h:1218
double myAttachedPitch
Definition: DtOsgObserverObject.h:1164
Contains DLL export macros.
double myLastAttachBvolOffset
Definition: DtOsgObserverObject.h:1521
MotionState myObserverState
Definition: DtOsgObserverObject.h:1385
osg::Vec3d myObserverLinearVelocityVector
Definition: DtOsgObserverObject.h:1179
float myLocalModelScalingAmount
Definition: DtOsgObserverObject.h:1183
osg::Vec3d myAttachedWorldUp
Definition: DtOsgObserverObject.h:1443
bool stopped()
Definition: DtOsgObserverObject.h:1304
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:1160
osg::Vec3d myAttachPosition
Definition: DtOsgObserverObject.h:1518
osg::Vec3d myOrientToPosition
Definition: DtOsgObserverObject.h:1204
bool myOrbitingRight
Definition: DtOsgObserverObject.h:1398
double myLastViewMagnification
Definition: DtOsgObserverObject.h:1536
osg::Vec3d myAttachedPosition
Definition: DtOsgObserverObject.h:1197
double myOrbitSpeed
Definition: DtOsgObserverObject.h:1402
static const double theMaxViewResolution
Definition: DtOsgObserverObject.h:1152
MotionState myLevelAttachedObserverState
Definition: DtOsgObserverObject.h:1388
bool myConstrainToTerrain
Definition: DtOsgObserverObject.h:1482
bool myUsesBoundingVolumeForAttachedOffsets
Whether or not the observer is using bounding volumes for attached offsets. This is all the time for ...
Definition: DtOsgObserverObject.h:1508
double myCurrentViewMagnification
Only used in 3D.
Definition: DtOsgObserverObject.h:1535
osg::Vec3d myObserverRight
Definition: DtOsgObserverObject.h:1449
bool myOrbiting
Definition: DtOsgObserverObject.h:1497
osg::Vec3d myCameraFront
Definition: DtOsgObserverObject.h:1472
bool myLookingDown
Definition: DtOsgObserverObject.h:1422
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:1195
double myCurrentObserverDistance
largest of the distances currently in play in a given frame. This is how far we'll advance...
Definition: DtOsgObserverObject.h:1212
double mySpeedScaleSpeed
Definition: DtOsgObserverObject.h:1410
static const double theObserverBoundingSphere
Definition: DtOsgObserverObject.h:1140
osg::Vec3d myAttachedRight
Definition: DtOsgObserverObject.h:1457
osg::Vec3d & euler()
Definition: DtOsgObserverObject.h:1349
AttachType
Definition: DtObserverObject.h:36
MotionState()
Definition: DtOsgObserverObject.h:1270