20 #include <osg/Matrixd>
26 #include <unordered_map>
39 class DtCoordinateConverter;
41 class DtTerrainPatchObject;
42 class DtAgentUpdateResolverInterface;
43 class DtIntersectorsContainer;
44 class DtCoordinateSystem;
56 TerrainResultNoData = 0,
81 virtual void tick(
double simTime );
84 virtual void tickAttachment();
91 virtual double altitude()
const;
93 virtual void setNameAndRegister(
const std::string& name );
100 virtual void setCameraPositionAndOrientation(
const osg::Vec3d& position,
101 const osg::Quat& rotation );
103 virtual void getCameraPositionAndOrientation( osg::Vec3d& position,
104 osg::Quat& rotation )
const;
106 virtual void getCameraPositionAndOrientation(
DtVector& position,
110 static void matrixdToTaitBryan(
const osg::Matrixd& mat, DtTaitBryan& tb,
bool isWorld2D =
false );
111 static double clampUnity(
double x );
121 virtual void startMoveObserverRight();
124 virtual void stopMoveObserverRight();
125 virtual void moveObserverRight(
double meters );
128 virtual void startMoveObserverForward();
131 virtual void stopMoveObserverForward();
132 virtual void moveObserverForward(
double meters );
136 virtual void startMoveObserverUp();
139 virtual void stopMoveObserverUp();
140 virtual void moveObserverUp(
double meters );
144 virtual void startMoveObserverLeft();
147 virtual void stopMoveObserverLeft();
148 virtual void moveObserverLeft(
double meters );
152 virtual void startMoveObserverBack();
155 virtual void stopMoveObserverBack();
156 virtual void moveObserverBack(
double meters );
160 virtual void startMoveObserverDown();
163 virtual void stopMoveObserverDown();
164 virtual void moveObserverDown(
double meters );
168 virtual void startMoveLevelObserverRight();
172 virtual void stopMoveLevelObserverRight();
173 virtual void moveLevelObserverRight(
double meters );
177 virtual void startMoveLevelObserverForward();
181 virtual void stopMoveLevelObserverForward();
182 virtual void moveLevelObserverForward(
double meters );
186 virtual void startMoveLevelObserverUp();
190 virtual void stopMoveLevelObserverUp();
191 virtual void moveLevelObserverUp(
double meters );
195 virtual void startMoveLevelObserverLeft();
199 virtual void stopMoveLevelObserverLeft();
200 virtual void moveLevelObserverLeft(
double meters );
204 virtual void startMoveLevelObserverBack();
208 virtual void stopMoveLevelObserverBack();
209 virtual void moveLevelObserverBack(
double meters );
213 virtual void startMoveLevelObserverDown();
216 virtual void stopMoveLevelObserverDown();
217 virtual void moveLevelObserverDown(
double meters );
221 virtual void startMoveAttachedRight();
224 virtual void stopMoveAttachedRight();
225 virtual void moveAttachedRight(
double meters );
228 virtual void startMoveAttachedForward();
231 virtual void stopMoveAttachedForward();
232 virtual void moveAttachedForward(
double meters );
236 virtual void startMoveAttachedUp();
239 virtual void stopMoveAttachedUp();
240 virtual void moveAttachedUp(
double meters );
244 virtual void startMoveAttachedLeft();
247 virtual void stopMoveAttachedLeft();
248 virtual void moveAttachedLeft(
double meters );
252 virtual void startMoveAttachedBack();
255 virtual void stopMoveAttachedBack();
256 virtual void moveAttachedBack(
double meters );
260 virtual void startMoveAttachedDown();
263 virtual void stopMoveAttachedDown();
264 virtual void moveAttachedDown(
double meters );
268 virtual void startMoveLevelAttachedRight();
272 virtual void stopMoveLevelAttachedRight();
273 virtual void moveLevelAttachedRight(
double meters );
277 virtual void startMoveLevelAttachedForward();
281 virtual void stopMoveLevelAttachedForward();
282 virtual void moveLevelAttachedForward(
double meters );
286 virtual void startMoveLevelAttachedUp();
290 virtual void stopMoveLevelAttachedUp();
291 virtual void moveLevelAttachedUp(
double meters );
295 virtual void startMoveLevelAttachedLeft();
299 virtual void stopMoveLevelAttachedLeft();
300 virtual void moveLevelAttachedLeft(
double meters );
304 virtual void startMoveLevelAttachedBack();
308 virtual void stopMoveLevelAttachedBack();
309 virtual void moveLevelAttachedBack(
double meters );
313 virtual void startMoveLevelAttachedDown();
316 virtual void stopMoveLevelAttachedDown();
317 virtual void moveLevelAttachedDown(
double meters );
321 virtual void startMoveAttachedContextRight();
324 virtual void stopMoveAttachedContextRight();
325 virtual void moveAttachedContextRight(
double meters );
329 virtual void startMoveAttachedContextForward();
332 virtual void stopMoveAttachedContextForward();
333 virtual void moveAttachedContextForward(
double meters );
337 virtual void startMoveAttachedContextUp();
340 virtual void stopMoveAttachedContextUp();
341 virtual void moveAttachedContextUp(
double meters );
345 virtual void startMoveAttachedContextLeft();
348 virtual void stopMoveAttachedContextLeft();
349 virtual void moveAttachedContextLeft(
double meters );
353 virtual void startMoveAttachedContextBack();
356 virtual void stopMoveAttachedContextBack();
357 virtual void moveAttachedContextBack(
double meters );
361 virtual void startMoveAttachedContextDown();
363 virtual void stopMoveAttachedContextDown();
364 virtual void moveAttachedContextDown(
double meters );
368 virtual void startYawLeft();
371 virtual void stopYawLeft();
372 virtual void rotateYawLeft(
double rads);
376 virtual void startYawRight();
380 virtual void stopYawRight();
381 virtual void rotateYawRight(
double rads);
385 virtual void startPitchUp();
388 virtual void stopPitchUp();
389 virtual void rotatePitchUp(
double rads );
390 virtual void rotateFlashlightPitchUp(
double rads );
394 virtual void startPitchDown();
397 virtual void stopPitchDown();
398 virtual void rotatePitchDown(
double rads );
399 virtual void rotateFlashlightPitchDown(
double rads );
403 virtual void startRollLeft();
406 virtual void stopRollLeft();
407 virtual void rollLeft(
double rads);
411 virtual void startRollRight();
414 virtual void stopRollRight();
415 virtual void rollRight(
double rads);
419 virtual void startLevelYawLeft();
422 virtual void stopLevelYawLeft();
426 virtual void startLevelYawRight();
430 virtual void stopLevelYawRight();
434 virtual void startLevelPitchUp();
437 virtual void stopLevelPitchUp();
438 virtual void rotateLevelPitchUp(
double rads);
442 virtual void startLevelPitchDown();
445 virtual void stopLevelPitchDown();
446 virtual void rotateLevelPitchDown(
double rads);
450 virtual void startLevelRollLeft();
453 virtual void stopLevelRollLeft();
454 virtual void rollLevelLeft(
double rads);
458 virtual void startLevelRollRight();
461 virtual void stopLevelRollRight();
462 virtual void rollLevelRight(
double rads);
465 virtual void rotateLevelYawLeft(
double rads );
466 virtual void rotateLevelYawRight(
double rads );
467 virtual void rotateFlashlightYawLeft(
double rads );
468 virtual void rotateFlashlightYawRight(
double rads );
470 virtual void startLookLeft();
471 virtual void stopLookLeft();
472 virtual void lookLeft(
double rads );
474 virtual void startLookRight();
475 virtual void stopLookRight();
476 virtual void lookRight(
double rads );
478 virtual void startLookUp();
479 virtual void stopLookUp();
480 virtual void lookUp(
double rads );
482 virtual void startLookDown();
483 virtual void stopLookDown();
484 virtual void lookDown(
double rads );
486 virtual void startLookTiltRight();
487 virtual void stopLookTiltRight();
488 virtual void lookTiltRight(
double rads );
490 virtual void startLookTiltLeft();
491 virtual void stopLookTiltLeft();
492 virtual void lookTiltLeft(
double rads );
495 virtual void startOrbitingLeft();
498 virtual void stopOrbitingLeft();
499 virtual void orbitLeft(
double rads );
503 virtual void startOrbitingRight();
506 virtual void stopOrbitingRight();
507 virtual void orbitRight(
double rads );
511 virtual void startOrbitingUp();
514 virtual void stopOrbitingUp();
515 virtual void orbitUp(
double rads );
519 virtual void startOrbitingDown();
522 virtual void stopOrbitingDown();
523 virtual void orbitDown(
double rads );
527 virtual void setLocation(
double x,
double y,
double z);
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;
539 virtual void setOrientation(
double psi,
double theta,
double phi );
542 virtual void setTopographicOrientation(
double psi,
double theta,
double phi );
545 virtual void setOrientation(
double x,
double y,
double z,
double w);
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;
555 virtual void setAttachedOrientation(
double x,
double y,
double z,
560 void setLocalModelScalingEnabled(
bool enabled );
564 void setLocalModelScalingAmount(
float amount );
568 virtual void jumpTo(
double x,
double y,
double z );
573 virtual void orientTo(
double x,
double y,
double z );
576 virtual void dragTerrain(
double lastX,
double lastY,
double lastZ,
577 double currX,
double currY,
double currZ );
579 virtual void dragTerrain2(
double myStartDragX,
double myStartDragY,
580 double myStartDragZ,
int deltaMouseX,
int deltaMouseY );
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 );
591 virtual void scrollFlashlightWider(
int wheelUnits );
592 virtual void scrollFlashlightNarrower(
int wheelUnits );
595 virtual float flashlightAngle();
599 virtual void startIncreasingViewResolution();
600 virtual void stopIncreasingViewResolution();
601 virtual void increaseViewResolution();
603 virtual void startDecreasingViewResolution();
604 virtual void stopDecreasingViewResolution();
605 virtual void decreaseViewResolution();
608 virtual void setViewResolution(
double resolution);
611 virtual double viewResolution()
const;
618 virtual void setCurrentViewMagnification(
double mag );
621 virtual double currentViewMagnification()
const;
630 virtual void setOrbitSpeed(
double speed );
633 virtual void setLinearSpeed(
double speed );
636 virtual void setRotationSpeed(
double speed );
639 virtual void setMinLinearSpeed(
double minSpeed );
642 virtual void setMaxLinearSpeed(
double maxSpeed );
645 virtual void setLinearScaledSpeedGain(
double gain );
652 virtual void gotoTerrainCenter(
DtUniqueID terrainPatch,
bool retry );
655 virtual void resetAttachment();
657 virtual void resetOrientation();
660 virtual void resetCamera();
661 virtual void level();
663 virtual void stopAll();
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 );
670 virtual void attachToPart(
int partId);
671 virtual void detach();
673 virtual void setHideModelOnAttach(
bool hide );
677 virtual void setUsesBoundingVolumeForAttachedOffsets(
bool useBoundingVolume);
681 virtual bool usesBoundingVolumeForAttachedOffsets()
const;
686 virtual void setAttachmentHas3DCockpit(
bool cockpit );
688 virtual void scaleCurrentAttachments(
bool scaled );
689 virtual void setOrientToTargetConstraint(
bool orient );
690 virtual void setOrbiting(
bool orbit );
691 virtual void setOrientCameraToTargetConstraint(
bool orient );
693 virtual void setConstrainToTerrain(
bool trueFalse );
694 virtual void setConstrainToCenter(
bool trueFalse );
698 virtual void suppressConstrainToTerrain(
bool trueFalse );
700 virtual void setSpeedScaling(
bool trueFalse );
703 virtual void setSpeedScaledSpeed(
double speed );
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;
713 virtual void getObserverCameraPosition(
double& x,
double& y,
double& z)
const;
716 virtual void getOrientation(
double& psi,
double& theta,
double& phi )
const;
720 virtual void getObserverCameraOrientation(
double& psi,
double& theta,
double& phi,
bool includeShake)
const;
723 virtual void getTopographicOrientation(
double& psi,
double& theta,
double& phi )
const;
725 virtual void getOrientation(
double& x,
double& y,
double& z,
double& w )
const;
727 virtual void getFlashlightOrientation(
double& x,
double& y,
double& z,
double& w )
const;
731 virtual void getObserverPlatformFront(
double& x,
double& y,
double& z)
const;
735 virtual void getObserverPlatformUp(
double& x,
double& y,
double& z)
const;
739 virtual void getObserverPlatformRight(
double& x,
double& y,
double& z)
const;
743 virtual void getObserverCameraFront(
double& x,
double& y,
double& z,
bool includeShake)
const;
746 virtual void getObserverCameraUp(
double& x,
double& y,
double& z,
bool includeShake)
const;
749 virtual void getObserverCameraRight(
double& x,
double& y,
double& z,
bool includeShake)
const;
751 virtual void getCameraUp(
double& x,
double& y,
double& z);
753 virtual void getCameraFront(
double& x,
double& y,
double& z);
755 virtual void getCameraRight(
double& x,
double& y,
double& z);
758 virtual void setCameraShakeRotation(
double x,
double y,
double z,
double w);
761 virtual void getCameraShakeRotation(
double& x,
double& y,
double& z,
double& w);;
770 virtual double heightAboveTerrainFromCurrentZoom(
double magnification = 1.)
const;
775 virtual double altitudeFromCurrentZoom(
double magnification=1.)
const;
779 virtual double zoomFromHeightAboveTerrain(
double hat,
double magnification=1)
const;
783 virtual double zoomFromAltitude(
double altitude,
double magnification=1.)
const;
789 virtual double zoomFromCurrentAltitude()
const;
793 virtual double topographicHeading()
const;
796 virtual void getLinearVelocity(
double &x,
double &y,
double &z)
const;
799 virtual void getRotationalVelocity(
double& x,
double& y,
double& z)
const;
804 virtual void setModeSetting(
int setting,
bool value );
811 virtual std::vector<DtUniqueID> currentAttachments()
const;
816 virtual const osg::Vec3d& locationTrackAttachmentVec3d()
const;
817 virtual void getLocationTrackAttachment(
double& x,
double& y,
double& z )
const;
831 virtual bool attachedObjectHidden()
const;
836 virtual bool attachmentHas3DCockpit()
const;
840 virtual osg::Vec3d attachedOffsetVector()
const;
846 virtual double attachedNearClipOffset()
const;
849 virtual double heightAboveTerrain()
const;
852 virtual double heightOfTerrain()
const;
863 virtual bool shouldOrientToGlobeCenter();
866 virtual void adjustToGlobeCurvature();
869 virtual bool shouldRotateGlobe();
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;
876 virtual const osg::Vec3d& attachedWorldUp()
const;
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);
883 virtual osg::Vec3d& attachedUp();
884 virtual osg::Vec3d& attachedFront();
885 virtual osg::Vec3d& attachedRight();
887 virtual osg::Vec3d& attachedOffsetUp();
888 virtual osg::Vec3d& attachedOffsetFront();
889 virtual osg::Vec3d& attachedOffsetRight();
892 virtual osg::Vec3d& levelAttachedUp();
893 virtual osg::Vec3d& levelAttachedFront();
894 virtual osg::Vec3d& levelAttachedRight();
897 virtual osg::Vec3d& levelObserverMimicUp();
898 virtual osg::Vec3d& levelObserverMimicFront();
899 virtual osg::Vec3d& levelObserverMimicRight();
901 virtual osg::Vec3d& cameraUp();
902 virtual osg::Vec3d& cameraFront();
903 virtual osg::Vec3d& cameraRight();
905 virtual osg::Vec3d& levelObserverUp();
906 virtual osg::Vec3d& levelObserverFront();
907 virtual osg::Vec3d& levelObserverRight();
909 virtual void advanceOrbitLeft(
double rads );
910 virtual void advanceOrbitRight(
double rads );
911 virtual void advanceOrbitUp(
double rads );
912 virtual void advanceOrbitDown(
double rads );
914 virtual void makeLevelObserverMatrix();
917 virtual void calculateLevelAttachedRotation();
920 virtual void makeLevelObserverMimicMatrix();
925 virtual osg::Vec3d calcWorldPositionChange();
927 virtual osg::Vec3d calcMimicPositionChange();
929 virtual osg::Vec3d calcAttachedPosition(
const osg::Quat& attInverse,
const osg::Vec3d& attachedAdvance);
930 virtual osg::Vec3d calcAttachedAdvance(
const osg::Quat& tetherTrackInverse);
932 virtual osg::Vec3d calcFollowPositionChange();
933 virtual osg::Vec3d calcSpaceFollowPositionChange();
934 virtual osg::Vec3d calcTetherPositionChange();
935 virtual osg::Vec3d calcTetherTrackPositionChange();
937 virtual osg::Vec3d calcTrackPositionChange();
938 virtual osg::Quat calcTetherTrackRotation();
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();
946 virtual void setCurrentAttachmentsVisibility(
bool visible );
957 virtual void orientTo(
const osg::Vec3d& target );
960 virtual void orientCameraTo(
const osg::Vec3d& target );
962 virtual TerrainResult getTerrainCenter(
const DtUniqueID& patchID, osg::Vec3d& center );
967 virtual void initializeAttachment();
969 virtual const osg::Vec3d& scalingIntersection()
const;
970 virtual void getViewIntersection();
973 virtual double linearSpeed();
976 virtual double speedScalingGain()
const;
978 virtual void calcTerrainConstraint(
const osg::Vec3d& prev );
985 virtual bool updateAttachPositionAndOrientation();
987 virtual bool getSecondaryAttachPosition( osg::Vec3d& position );
989 virtual void getObserverOffsetVector(
double& x,
double& y,
double& z )
const;
990 virtual void setObserverOffsetVector(
double x,
double y,
double z );
995 virtual void getCameraFromParentOffsetVector(
double& x,
double& y,
double& z )
const;
996 virtual void getCameraFromParentRotationOffset(
double& x,
double& y,
double& z,
double& w )
const;
999 virtual void getAttachedRotationOffset(
double& x,
double& y,
double& z,
double& w )
const;
1000 virtual void setAttachedRotationOffset(
double x,
double y,
double z,
1004 osg::Vec3& bvolExtents, osg::Vec3d& bvolCenter );
1007 osg::Vec3& bvolExtents, osg::Vec3d& bvolCenter );
1009 virtual void setLocation(
const osg::Vec3d& location,
bool suppress=
true );
1011 virtual bool isMoving()
const;
1012 virtual bool isRotating()
const;
1014 virtual double computeNearClipDistance(
DtSceneObject* sceneObject );
1015 virtual float computeLocalModelScalingAmount(
DtSceneObject* sceneObject );
1017 virtual void calcScaledSpeed();
1018 virtual bool getTerrainOrPropIntersection(
const osg::Vec3d& startPos,
1028 virtual void getPositionAndOrientation(
DtSceneObject& sceneObject, osg::Vec3d& position,
1029 osg::Vec3d& orientToPosition, osg::Quat& orientation );
1031 virtual void getPositionAndOrientation(
DtTerrainPatchObject& patchObject, osg::Vec3d& position,
1032 osg::Vec3d& orientToPosition, osg::Quat& orientation );
1034 virtual void getPositionAndOrientation(
DtOsgObserverObject& observerObject, osg::Vec3d& position,
1035 osg::Vec3d& orientToPosition, osg::Quat& orientation );
1038 virtual void getPositionFromSceneObject(
DtSceneObject& sceneObject, osg::Vec3d& position )
const;
1041 virtual void getPositionFromObserverObject(
DtOsgObserverObject& observerObject, osg::Vec3d& position )
const;
1045 virtual bool getPartPositionOriFromSceneObject(
DtSceneObject& sceneObject,
1046 int partId, osg::Vec3d& position, osg::Quat& ori )
const;
1050 virtual void force2D();
1053 virtual void dimensionChanged(
bool is2D );
1054 virtual void setIs2D(
bool is2D );
1057 virtual double calculate3DAltitude()
const;
1060 virtual void calculateAltitude();
1064 virtual void synchronizeLocation(
double x,
double y,
double z );
1068 virtual void synchronizeOrientation(
double x,
double y,
double z,
double w );
1085 virtual void calcHeightAboveTerrain(
bool force=
false);
1088 std::list<DtChannel*> findChannels();
1091 std::list<const DtChannel*> findChannels()
const;
1102 virtual double frustumPixelHeight()
const;
1105 virtual void slot_coordinateSystemChanged();
1108 virtual void cache3DOffsetAndRotation();
1111 virtual void restoreAttachOffsetsFrom3DCache();
1116 virtual void slot_dateChanged();
1120 virtual bool getAttachedToBoundingVolume(
DtSceneObject*
const sceneObject, osg::Vec3d& boundingVolumeCenter, osg::Vec3& boundingVolumeExtents,
1121 double& maxOffset,
double& maxExtent);
1125 virtual bool setupAttachOffsetsAfterReset(
DtSceneObject*
const sceneObject, osg::Vec3d boundingVolumeCenter, osg::Vec3 boundingVolumeExtents,
1126 double maxOffset,
double maxExtent);
1131 virtual void setupAttachOffsets(
double maxExtent);
1135 virtual void reinitializeAfterBoundingVolumeChange();
1139 virtual void resetAfterBoundingVolumeChange();
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;
1298 myAdvance.set(0.0,0.0,0.0);
1299 myEuler.set(0.0,0.0,0.0);
1304 myAdvance.set(0.0,0.0,0.0);
1309 return myState == Stopped;
1314 return myState != Stopped;
1319 return (myState & d) != 0;
1324 myState = moving ? myState | d : myState & ~d;
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;
1359 myEuler.set(0.0,0.0,0.0);
1364 return myState != Stopped;
1369 return (myState & d) != 0;
1374 myState = rotating ? myState | d : myState & ~d;
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 'local (cig) to geocentric' 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 ('flying carpet') 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'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