16 #include <matrix/vlVector.h>
25 class DtObserverObjectAgent;
27 class DtAgentManagerInterface;
28 class DtObserverConfiguration;
33 class DtChannelConfiguration;
57 DtObserverObjectAgent& agent();
60 const DtObserverObjectAgent& agent()
const;
85 bool hasInitialLocation()
const;
88 bool projectionIs2D()
const;
97 void setProjectionIs2D(
bool is2d );
103 const std::string& name()
const;
104 void setName(
const std::string& name );
116 int observerMode()
const;
117 bool setObserverMode(
int observerMode );
121 double viewResolution()
const;
124 void setViewResolution(
double resolution);
127 void setViewResolutionFromHeightAboveTerrain(
double hat);
130 double viewMagnification()
const;
133 void setViewMagnification(
double magnficationFactor);
136 void setLodScale(
double lodScale);
139 double lodScale()
const;
142 void setPaperMapLayer(
const std::string& paperMapLayer);
145 std::string paperMapLayer()
const;
151 bool inUse(
const std::string& channelKeyToIgnore =
"" )
const;
157 void attachToNextElement();
160 void attachToPreviousElement();
172 void setPrimaryAttachment(
const ElementList& elements);
180 void setSecondaryAttachment(
const ElementList& element);
190 void setLocationTrackAttachment(
double x,
double y,
double z );
194 void getLocationTrackAttachment(
double&
x,
double&
y,
double&
z )
const;
199 void setPartAttachment(
int partId);
202 int partAttachment()
const;
208 bool attached()
const;
211 bool tracking()
const;
214 const ElementList& primaryAttachments()
const;
217 const ElementList& secondaryAttachments()
const;
219 void setHideModelOnAttach(
bool hide );
220 bool hideModelOnAttach()
const;
226 void setAttachmentHas3DCockpit(
bool cockpit);
227 bool attachmentHas3DCockpit()
const;
233 void setOrientToTargetConstraint(
bool orient );
234 bool orientToTargetConstraint()
const;
241 bool haveLastSingleAttached()
const;
254 void setAllowReset(
bool b);
257 bool allowReset()
const;
260 void setAllowAttach(
bool b);
263 bool allowAttach()
const;
266 void setAllowDetach(
bool b);
269 bool allowDetach()
const;
272 void centerOnTerrain();
275 void centerOnTerrain(
const DtUniqueID& terrainPatch );
279 void suppressConstrainToTerrain(
bool trueFalse );
282 void setConstrainToCenter(
bool trueFalse );
283 void toggleConstrainToCenter();
284 bool constrainToCenter()
const;
287 void getLocation(
double &
x,
double &
y,
double&
z )
const;
290 DtVector location()
const;
293 DtVector observerCameraPosition()
const;
296 void setLocation(
double x,
double y,
double z );
299 void getOrientation(
double& psi,
double& theta,
double& phi )
const;
302 void getTopographicOrientation(
double& psi,
double& theta,
double& phi )
const;
305 void setOrientation(
double psi,
double theta,
double phi );
308 void setTopographicOrientation(
double psi,
double theta,
double phi );
311 void getOrientation(
double&
x,
double&
y,
double&
z,
double&
w )
const;
314 void setOrientation(
double x,
double y,
double z,
double w );
318 DtTaitBryan observerCameraOrientation(
bool includeShake=
true)
const;
322 virtual DtVector observerPlatformFront()
const;
326 virtual DtVector observerPlatformUp()
const;
330 virtual DtVector observerPlatformRight()
const;
335 virtual DtVector observerCameraFront(
bool includeShake=
true)
const;
338 virtual DtVector observerCameraUp(
bool includeShake =
true)
const;
341 virtual DtVector observerCameraRight(
bool includeShake =
true)
const;
345 void moveUnit(
const DtVector& direction);
349 void rotateUnit(
const DtTaitBryan& rotation);
352 void getLinearVelocity(
double &
x,
double &
y,
double &
z)
const;
354 DtVector linearVelocity()
const;
358 void getRotationalVelocity(
double&
x,
double&
y,
double&
z )
const;
360 DtVector rotationalVelocity()
const;
364 bool observerObjectMoving()
const;
367 double observerAltitude()
const;
375 void setAttachedLocation(
double x,
double y,
double z );
376 void setAttachedX(
double x );
377 void setAttachedY(
double y );
378 void setAttachedZ(
double z );
382 void setAttachedOrientation(
double psi,
double theta,
double phi );
383 void setAttachedYaw(
double psi);
384 void setAttachedPitch(
double theta);
385 void setAttachedRoll(
double phi);
389 void setLocalModelScalingEnabled(
bool enabled );
393 void setLocalModelScalingAmount(
float amount );
401 void setOrbitSpeedGain(
int gain,
bool forwardToObserverModeManager =
true );
404 int orbitSpeedGain()
const;
407 int orbitSpeedGainFromSpeed(
double speed )
const;
409 void setRotationSpeedGain(
int gain,
bool forwardToObserverModeManager =
true );
410 int rotationSpeedGain()
const;
413 void setLinearSpeedGain(
int gain );
414 int linearSpeedGain()
const;
416 void setLinearScaledSpeedGain(
int gain,
bool forwardToObserverModeManager =
true );
417 int linearScaledSpeedGain()
const;
419 void setLinearUnscaledSpeedGain(
int gain,
bool forwardToObserverModeManager =
true );
420 int linearUnscaledSpeedGain()
const;
422 void setGainPrecision(
int amt,
bool forwardToObserverModeManager =
true );
423 int gainPrecision()
const;
425 void setModelScaleFactor(
double modelScaleFactor,
bool forwardToObserverModeManager =
true );
426 double modelScaleFactor()
const;
428 void setModelScaleType(
const std::string& modelScaleType,
bool forwardToObserverModeManager =
true );
429 const std::string& modelScaleType()
const;
431 void setMaxModelScaleFactor(
double maxModelScaleFactor,
bool forwardToObserverModeManager =
true);
432 double maxModelScaleFactor()
const;
435 bool forwardToObserverModeManager =
true );
438 void setLodScaleCenterEnabled(
bool enabled,
bool forwardToObserverModeManager =
true);
439 bool lodScaleCenterEnabled()
const;
441 void setLodScaleCenterMagMinLimit(
double limit,
bool forwardToObserverModeManager =
true);
442 double lodScaleCenterMagMinLimit()
const;
450 void setSpeedScalingMslModeOffset(
double offset,
451 bool forwardToObserverModeManager =
true );
452 double speedScalingMslModeOffset()
const;
454 void setOrbitSpeed(
double speed );
455 double orbitSpeed()
const;
457 void setRotationSpeed(
double speed );
458 double rotationSpeed()
const;
460 void setLinearSpeed(
double speed );
461 double linearSpeed()
const;
466 virtual void toggleFlashlight();
472 virtual bool setCameraShake(
const std::string& shakeType);
476 virtual void setCameraShakeRotation(
const DtQuat& rotQuat)
const;
480 virtual void setSensor(
const std::string& sensorName);
484 virtual std::string findSensor();
487 virtual void disableSensor();
490 virtual void slot_sensorRemoved(
DtSensor* sensor);
495 virtual void synchronize();
543 boost::signalslib::signal<void (DtObserver*, double offset)>
553 boost::signalslib::signal<void(DtObserver*, DtObserverObject::NorthType northType)>
566 void getObserverOffsetVector(
double&
x,
double&
y,
double&
z )
const;
567 void getObserverRotationOffset(
double&
x,
double&
y,
double&
z,
double&
w )
const;
572 void getCameraFromParentOffsetVector(
double&
x,
double&
y,
double&
z )
const;
573 void getCameraFromParentRotationOffset(
double&
x,
double&
y,
double&
z,
double&
w )
const;
579 virtual void setUsesBoundingVolumeForAttachedOffsets(
bool useBoundingVolume);
583 virtual bool usesBoundingVolumeForAttachedOffsets()
const;
588 void slot_terrainCleared();
590 void slot_oceanLayerDeleted(
const std::string&);
592 void updateGlobalTerrainFlag(
bool flag);
594 double calcLinearSpeed()
const;
595 double calcRotationSpeed()
const;
596 double calcOrbitSpeed()
const;
598 void setObserverOffsetVector(
double x,
double y,
double z );
600 void setObserverRotationOffset(
double x,
double y,
double z,
double w );
602 void getDisplayNamesFromUniqueIds(
const std::vector<DtUniqueID>& idsIn,
603 std::set<std::string>& displayNamesOut)
const;
604 bool getUniqueIdsFromDisplayNames(
const std::set<std::string>& displayNamesIn,
605 std::vector<DtUniqueID>& idsOut)
const;
612 void connectToElementDataSignals();
613 void disconnectFromElementDataSignals();
615 void setModeSpecificObserverObjectData();
628 virtual void attachToObjects(
const ElementList& objects);
634 virtual void slot_attachNextTick(
const ElementList objects);
637 virtual bool sceneObjectsAvailable(
const ElementList& elements);
641 virtual void slot_onElementAttributesChanged(
646 void slot_completeAttachment();
648 void slot_observerModeModelSetChanged(
int observerMode );
649 void slot_observerModeSensorChanged(
int observerMode );
650 void slot_observerModeIs2DChanged(
int observerMode );
651 void slot_observerModeKeyMapChanged(
int observerMode );
652 void slot_observerModeGainPrecisionChanged(
int observerMode );
653 void slot_observerModeOrbitSpeedGainChanged(
int observerMode );
654 void slot_observerModeRotationSpeedGainChanged(
int observerMode );
655 void slot_observerModeLinearScaledSpeedGainChanged(
int observerMode );
656 void slot_observerModeLinearUnscaledSpeedGainChanged(
int observerMode );
657 void slot_observerModeModelScaleFactorChanged(
int observerMode );
658 void slot_observerModeModelScaleTypeChanged(
int observerMode );
659 void slot_observerModeSpeedScalingModeChanged(
int observerMode );
660 void slot_observerModeSpeedScalingMslModeOffsetChanged(
int observerMode );
661 void slot_observerModeLodScaleCenterEnabledChanged(
int observerMode);
662 void slot_observerModeLodScaleCenterMagMinLimitChanged(
int observerMode);
663 void slot_observerModeNorthTypeChanged(
int observerMode);
664 void slot_observerModeSettingChanged(
int observerMode,
int settingKey);
665 void slot_observerModeAdded(
int observerMode );
673 void attachTo(
bool afterTrue );
DtObserverObjectAgent * myObserverObjectAgent
Definition: DtObserver.h:681
bool myAllowDetach
Definition: DtObserver.h:700
int myObserverMode
Definition: DtObserver.h:687
AttachType
Definition: DtObserverSettingsRecord.h:24
std::vector< DtUniqueID > mySecondaryAttachments
Definition: DtObserver.h:692
makArchives::DtObserverStateRecord myCachedObserverStateRecord
This is used as a work-around to cache attachments for entities which have not yet been created...
Definition: DtObserver.h:686
DtUniqueID myLastSingleAttached
Definition: DtObserver.h:693
TODO: This class is used to encapsulate a set of default observer settings and parameters.
Definition: DtObserverConfiguration.h:22
bool myConstrainToCenter
Definition: DtObserver.h:696
bool myFlashlightEnabled
Definition: DtObserver.h:702
std::vector< DtElementID > ElementList
Definition: DtObserver.h:41
boost::signalslib::signal< void(DtObserver *, int)> signal_linearScaledSpeedGainChanged
Boost signal called when the scaled linear speed gain is changed.
Definition: DtObserver.h:507
boost::signalslib::signal< void(DtObserver *, int)> signal_linearUnscaledSpeedGainChanged
Boost signal called when the unscaled linear speed gain is changed.
Definition: DtObserver.h:510
boost::signalslib::signal< void(DtObserver *, DtObserverObject::NorthType northType)> signal_northTypeChanged
Signal emitted when an observer's north type changed.
Definition: DtObserver.h:554
Contains makVrv::DtElementData class.
boost::signalslib::signal< void(const std::string &)> signal_objectsDetached
Boost signal called when observer detaches from all.
Definition: DtObserver.h:501
A DtObserverSettingsRecord contains the state of an observer.
Definition: DtObserverStateRecord.h:20
DtObserverObject::AttachType myAttachType
Definition: DtObserver.h:690
boost::signalslib::signal< void(DtObserver *, double offset)> signal_speedScalingMslModeOffsetChanged
Signal emitted when an observer's speed scaling MSL mode offset changes.
Definition: DtObserver.h:544
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
DtSensor * mySensor
Definition: DtObserver.h:705
bool myAllowAttach
Definition: DtObserver.h:699
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t x *y t *t t x *y t *t *t x y *z t t *t t x *y *z t *t *t t x y z t t t t x *y z t *t t t x * y(z *w))
boost::signalslib::signal< void(DtSensor *)> signal_sensorChanged
Called when the observer changes which sensor it's using.
Definition: DtObserver.h:559
static const double theMoveStepSize
Definition: DtObserver.h:677
SpeedScalingMode
Definition: DtObserverObject.h:50
A facade for a DtObserverObject.
Definition: DtObserver.h:37
bool myAllowReset
Definition: DtObserver.h:698
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t x *y t *t t x *y t *t *t x y *z w
Definition: exprtk.hpp:9210
Contains makVrv::DtObserverObject class.
bool myConnectedToElementDataSignals
Definition: DtObserver.h:697
DtCameraShake * myCameraShake
Definition: DtObserver.h:706
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
std::vector< EntryAttributes > EntryAttributesList
Define the type used to signal changes to one or more attributes for one or more elements.
Definition: DtElementAttributeManager.h:45
boost::signalslib::signal< void(DtObserver *, int)> signal_rotationSpeedGainChanged
Boost signal called when the rotation speed gain is changed.
Definition: DtObserver.h:513
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
unsigned int myPartId
Definition: DtObserver.h:694
boost::signalslib::signal< void(DtObserver *, int)> signal_orbitSpeedGainChanged
Boost signal called when the orbit speed gain is changed.
Definition: DtObserver.h:516
boost::signalslib::signal< void(DtObserver *, int)> signal_gainPrecisionChanged
Boost signal called when the gain precision is changed.
Definition: DtObserver.h:519
boost::signalslib::signal< void(DtObserver *, double)> signal_modelScaleFactorChanged
Boost signal called when the model scale factor is changed.
Definition: DtObserver.h:522
NorthType
Definition: DtObserverObject.h:56
Definition of a sensor.
Definition: DtSensor.h:30
boost::signalslib::signal< void(DtObserver *, DtObserverObject::SpeedScalingMode scalingMode)> signal_speedScalingModeChanged
Signal emitted when an observer's speed scaling mode changes.
Definition: DtObserver.h:539
x y * z
Definition: exprtk.hpp:9133
boost::signalslib::signal< void(const std::string &, DtUniqueID)> signal_objectAttached
Boost signal called when observer attaches to an object.
Definition: DtObserver.h:498
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
bool myAttachmentHas3DCockpit
Definition: DtObserver.h:689
std::string myPaperMapLayer
Definition: DtObserver.h:708
bool myProjectionIs2D
Definition: DtObserver.h:707
bool myOrientToTargetConstraint
Definition: DtObserver.h:695
The ocean layer is a type of terrain layer which contains information about an area that should be re...
Definition: DtOceanLayer.h:25
DtObserverConfiguration * myConfiguration
Definition: DtObserver.h:682
std::vector< DtElementEntry * > ElementList
Type definition for a vector of DtElementEntry pointers.
Definition: DtElementData.h:47
Contains makArchives::DtObserverStateRecord class.
Base class to provide boost signal/slot management.
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition: DtChannelConfiguration.h:26
boost::signalslib::signal< void()> signal_terrainChanged
Called when the observer sees a change in terrain which might require updates to observer settings...
Definition: DtObserver.h:563
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t x(y+z)
bool myHideModelOnAttach
Definition: DtObserver.h:688
A DtObserverSettingsRecord contains the settings of an observer.
Definition: DtObserverSettingsRecord.h:20
boost::signalslib::signal< void(DtObserver *, bool)> signal_lodScaleCenterEnabledChanged
Boost signal called when the observer's lod scale center enabled is changed.
Definition: DtObserver.h:547
boost::signalslib::signal< void(DtObserver *, double)> signal_lodScaleChanged
Boost signal called when the observer's view magnification is changed.
Definition: DtObserver.h:531
Contains the DtElementAttributeManager class declaration.
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:33
bool myHasInitialLocation
Definition: DtObserver.h:701
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:70
std::vector< DtUniqueID > myCurrentAttachments
Definition: DtObserver.h:691
A utility Quaternion class.
Definition: DtQuat.h:19
boost::signalslib::signal< void(DtObserver *, double)> signal_viewMagnificationChanged
Boost signal called when the observer's view magnification is changed.
Definition: DtObserver.h:528
boost::signalslib::signal< void(DtObserver *, std::string)> signal_paperMapLayerChanged
Signal called when the observer's paper map layer is changed.
Definition: DtObserver.h:534
boost::signalslib::signal< void(DtObserver *, double)> signal_lodScaleCenterMagMinLimitChanged
Boost signal called when the observer's lod scale view magnification minimum is changed.
Definition: DtObserver.h:550
float myLodScale
Definition: DtObserver.h:704
Provides an algorithm for shaking the camera.
Definition: DtCameraShake.h:23
DtSignalConnectionManager myConnections
Definition: DtObserver.h:680
boost::signalslib::signal< void(DtObserver *, int)> signal_observerModeChanged
Boost signal called when observer's mode changed.
Definition: DtObserver.h:504
DtDe & myDe
Definition: DtObserver.h:679
DtDe & de()
Get the observer's DtDe.
Definition: DtObserver.h:51
double myViewMagnification
Definition: DtObserver.h:703
boost::signalslib::signal< void(DtObserver *, std::string)> signal_modelScaleTypeChanged
Boost signal called when the model scale type is changed.
Definition: DtObserver.h:525
AttachType
Definition: DtObserverObject.h:36