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(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;
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;
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 );
379 void setAttachedOrientation(
double psi,
double theta,
double phi );
380 void setAttachedYaw(
double psi);
381 void setAttachedPitch(
double theta);
382 void setAttachedRoll(
double phi);
386 void setLocalModelScalingEnabled(
bool enabled );
390 void setLocalModelScalingAmount(
float amount );
398 void setOrbitSpeedGain(
int gain,
bool forwardToObserverModeManager =
true );
401 int orbitSpeedGain()
const;
404 int orbitSpeedGainFromSpeed(
double speed )
const;
406 void setRotationSpeedGain(
int gain,
bool forwardToObserverModeManager =
true );
407 int rotationSpeedGain()
const;
410 void setLinearSpeedGain(
int gain );
411 int linearSpeedGain()
const;
413 void setLinearScaledSpeedGain(
int gain,
bool forwardToObserverModeManager =
true );
414 int linearScaledSpeedGain()
const;
416 void setLinearUnscaledSpeedGain(
int gain,
bool forwardToObserverModeManager =
true );
417 int linearUnscaledSpeedGain()
const;
419 void setGainPrecision(
int amt,
bool forwardToObserverModeManager =
true );
420 int gainPrecision()
const;
422 void setModelScaleFactor(
double modelScaleFactor,
bool forwardToObserverModeManager =
true );
423 double modelScaleFactor()
const;
425 void setModelScaleType(
const std::string& modelScaleType,
bool forwardToObserverModeManager =
true );
426 const std::string& modelScaleType()
const;
428 void setMaxModelScaleFactor(
double maxModelScaleFactor,
bool forwardToObserverModeManager =
true);
429 double maxModelScaleFactor()
const;
432 bool forwardToObserverModeManager =
true );
435 void setLodScaleCenterEnabled(
bool enabled,
bool forwardToObserverModeManager =
true);
436 bool lodScaleCenterEnabled()
const;
438 void setLodScaleCenterMagMinLimit(
double limit,
bool forwardToObserverModeManager =
true);
439 double lodScaleCenterMagMinLimit()
const;
447 void setSpeedScalingMslModeOffset(
double offset,
448 bool forwardToObserverModeManager =
true );
449 double speedScalingMslModeOffset()
const;
451 void setOrbitSpeed(
double speed );
452 double orbitSpeed()
const;
454 void setRotationSpeed(
double speed );
455 double rotationSpeed()
const;
457 void setLinearSpeed(
double speed );
458 double linearSpeed()
const;
463 virtual void toggleFlashlight();
469 virtual bool setCameraShake(
const std::string& shakeType);
473 virtual void setCameraShakeRotation(
const DtQuat& rotQuat)
const;
477 virtual void setSensor(
const std::string& sensorName);
481 virtual std::string findSensor();
484 virtual void disableSensor();
487 virtual void slot_sensorRemoved(
DtSensor* sensor);
492 virtual void synchronize();
540 boost::signalslib::signal<void (DtObserver*, double offset)>
550 boost::signalslib::signal<void(DtObserver*, DtObserverObject::NorthType northType)>
563 void getObserverOffsetVector(
double& x,
double& y,
double& z )
const;
564 void getObserverRotationOffset(
double& x,
double& y,
double& z,
double& w )
const;
569 void getCameraFromParentOffsetVector(
double& x,
double& y,
double& z )
const;
570 void getCameraFromParentRotationOffset(
double& x,
double& y,
double& z,
double& w )
const;
575 void slot_terrainCleared();
577 void slot_oceanLayerDeleted(
const std::string&);
579 void updateGlobalTerrainFlag(
bool flag);
581 double calcLinearSpeed()
const;
582 double calcRotationSpeed()
const;
583 double calcOrbitSpeed()
const;
585 void setObserverOffsetVector(
double x,
double y,
double z );
587 void setObserverRotationOffset(
double x,
double y,
double z,
double w );
589 void getDisplayNamesFromUniqueIds(
const std::vector<DtUniqueID>& idsIn,
590 std::set<std::string>& displayNamesOut)
const;
591 bool getUniqueIdsFromDisplayNames(
const std::set<std::string>& displayNamesIn,
592 std::vector<DtUniqueID>& idsOut)
const;
599 void connectToElementDataSignals();
600 void disconnectFromElementDataSignals();
602 void setModeSpecificObserverObjectData();
608 virtual void slot_onElementAttributesChanged(
613 void slot_completeAttachment();
615 void slot_observerModeModelSetChanged(
int observerMode );
616 void slot_observerModeSensorChanged(
int observerMode );
617 void slot_observerModeIs2DChanged(
int observerMode );
618 void slot_observerModeKeyMapChanged(
int observerMode );
619 void slot_observerModeGainPrecisionChanged(
int observerMode );
620 void slot_observerModeOrbitSpeedGainChanged(
int observerMode );
621 void slot_observerModeRotationSpeedGainChanged(
int observerMode );
622 void slot_observerModeLinearScaledSpeedGainChanged(
int observerMode );
623 void slot_observerModeLinearUnscaledSpeedGainChanged(
int observerMode );
624 void slot_observerModeModelScaleFactorChanged(
int observerMode );
625 void slot_observerModeModelScaleTypeChanged(
int observerMode );
626 void slot_observerModeSpeedScalingModeChanged(
int observerMode );
627 void slot_observerModeSpeedScalingMslModeOffsetChanged(
int observerMode );
628 void slot_observerModeLodScaleCenterEnabledChanged(
int observerMode);
629 void slot_observerModeLodScaleCenterMagMinLimitChanged(
int observerMode);
630 void slot_observerModeNorthTypeChanged(
int observerMode);
631 void slot_observerModeSettingChanged(
int observerMode,
int settingKey);
632 void slot_observerModeAdded(
int observerMode );
640 void attachTo(
bool afterTrue );
DtObserverObjectAgent * myObserverObjectAgent
Definition: DtObserver.h:648
bool myAllowDetach
Definition: DtObserver.h:667
int myObserverMode
Definition: DtObserver.h:654
AttachType
Definition: DtObserverSettingsRecord.h:24
std::vector< DtUniqueID > mySecondaryAttachments
Definition: DtObserver.h:659
makArchives::DtObserverStateRecord myCachedObserverStateRecord
This is used as a work-around to cache attachments for entities which have not yet been created...
Definition: DtObserver.h:653
DtUniqueID myLastSingleAttached
Definition: DtObserver.h:660
TODO: This class is used to encapsulate a set of default observer settings and parameters.
Definition: DtObserverConfiguration.h:22
bool myConstrainToCenter
Definition: DtObserver.h:663
bool myFlashlightEnabled
Definition: DtObserver.h:669
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:504
boost::signalslib::signal< void(DtObserver *, int)> signal_linearUnscaledSpeedGainChanged
Boost signal called when the unscaled linear speed gain is changed.
Definition: DtObserver.h:507
boost::signalslib::signal< void(DtObserver *, DtObserverObject::NorthType northType)> signal_northTypeChanged
Signal emitted when an observer's north type changed.
Definition: DtObserver.h:551
Contains makVrv::DtElementData class.
boost::signalslib::signal< void(const std::string &)> signal_objectsDetached
Boost signal called when observer detaches from all.
Definition: DtObserver.h:498
A DtObserverSettingsRecord contains the state of an observer.
Definition: DtObserverStateRecord.h:20
DtObserverObject::AttachType myAttachType
Definition: DtObserver.h:657
boost::signalslib::signal< void(DtObserver *, double offset)> signal_speedScalingMslModeOffsetChanged
Signal emitted when an observer's speed scaling MSL mode offset changes.
Definition: DtObserver.h:541
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:672
bool myAllowAttach
Definition: DtObserver.h:666
boost::signalslib::signal< void(DtSensor *)> signal_sensorChanged
Called when the observer changes which sensor it's using.
Definition: DtObserver.h:556
static const double theMoveStepSize
Definition: DtObserver.h:644
SpeedScalingMode
Definition: DtObserverObject.h:50
A facade for a DtObserverObject.
Definition: DtObserver.h:37
bool myAllowReset
Definition: DtObserver.h:665
Contains makVrv::DtObserverObject class.
bool myConnectedToElementDataSignals
Definition: DtObserver.h:664
DtCameraShake * myCameraShake
Definition: DtObserver.h:673
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
std::vector< EntryAttributes > EntryAttributesList
Definition: DtElementAttributeManager.h:43
boost::signalslib::signal< void(DtObserver *, int)> signal_rotationSpeedGainChanged
Boost signal called when the rotation speed gain is changed.
Definition: DtObserver.h:510
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
unsigned int myPartId
Definition: DtObserver.h:661
boost::signalslib::signal< void(DtObserver *, int)> signal_orbitSpeedGainChanged
Boost signal called when the orbit speed gain is changed.
Definition: DtObserver.h:513
boost::signalslib::signal< void(DtObserver *, int)> signal_gainPrecisionChanged
Boost signal called when the gain precision is changed.
Definition: DtObserver.h:516
boost::signalslib::signal< void(DtObserver *, double)> signal_modelScaleFactorChanged
Boost signal called when the model scale factor is changed.
Definition: DtObserver.h:519
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:536
boost::signalslib::signal< void(const std::string &, DtUniqueID)> signal_objectAttached
Boost signal called when observer attaches to an object.
Definition: DtObserver.h:495
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
bool myAttachmentHas3DCockpit
Definition: DtObserver.h:656
std::string myPaperMapLayer
Definition: DtObserver.h:675
bool myProjectionIs2D
Definition: DtObserver.h:674
bool myOrientToTargetConstraint
Definition: DtObserver.h:662
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:649
std::vector< DtElementEntry * > ElementList
Type definition for a vector of DtElementEntry pointers.
Definition: DtElementData.h:46
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:560
bool myHideModelOnAttach
Definition: DtObserver.h:655
A DtObserverSettingsRecord contains the settings of an observer.
Definition: DtObserverSettingsRecord.h:20
const char int mode
Definition: ioapi.h:38
boost::signalslib::signal< void(DtObserver *, bool)> signal_lodScaleCenterEnabledChanged
Boost signal called when the observer's lod scale center enabled is changed.
Definition: DtObserver.h:544
boost::signalslib::signal< void(DtObserver *, double)> signal_lodScaleChanged
Boost signal called when the observer's view magnification is changed.
Definition: DtObserver.h:528
Contains the DtElementAttributeManager class declaration.
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:33
bool myHasInitialLocation
Definition: DtObserver.h:668
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
std::vector< DtUniqueID > myCurrentAttachments
Definition: DtObserver.h:658
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:525
boost::signalslib::signal< void(DtObserver *, std::string)> signal_paperMapLayerChanged
Signal called when the observer's paper map layer is changed.
Definition: DtObserver.h:531
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:547
voidpf uLong offset
Definition: ioapi.h:42
float myLodScale
Definition: DtObserver.h:671
Provides an algorithm for shaking the camera.
Definition: DtCameraShake.h:23
DtSignalConnectionManager myConnections
Definition: DtObserver.h:647
boost::signalslib::signal< void(DtObserver *, int)> signal_observerModeChanged
Boost signal called when observer's mode changed.
Definition: DtObserver.h:501
DtDe & myDe
Definition: DtObserver.h:646
DtDe & de()
Get the observer's DtDe.
Definition: DtObserver.h:51
double myViewMagnification
Definition: DtObserver.h:670
boost::signalslib::signal< void(DtObserver *, std::string)> signal_modelScaleTypeChanged
Boost signal called when the model scale type is changed.
Definition: DtObserver.h:522
AttachType
Definition: DtObserverObject.h:36