VR-Vantage
Loading...
Searching...
No Matches
DtObserver.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2026 MAK Technologies, Inc.
3 * All rights reserved.
4 ******************************************************************************/
5
9
10#pragma once
11
17#include <matrix/vlVector.h>
18
20
21
22class DtTaitBryan;
23
24namespace makVrv
25{
27 class DtDe;
30 class DtSensor;
31 class DtOceanLayer;
32 class DtQuat;
33 class DtCameraShake;
35
39 {
40 public:
41
42 typedef std::vector<DtElementID> ElementList;
43
46 const DtObserverConfiguration& config );
47
49 virtual ~DtObserver();
50
52 inline DtDe& de()
53 {
54 return myDe;
55 }
56
59
62
63 //@name Saved View loading / setting functions.
65
68
71
74
77
83
86 bool hasInitialLocation() const;
87
89
97 bool projectionIs2D() const;
98 void setProjectionIs2D( bool is2d );
100
102
104 const std::string& name() const;
105 void setName( const std::string& name );
106
116
117 int observerMode() const;
120
122 double viewResolution() const;
123
125 void setViewResolution(double resolution);
126
129
131 double viewMagnification() const;
132
134 void setViewMagnification(double magnficationFactor);
135
138
140 double entityLodScale() const;
141
144
146 double terrainLodScale() const;
147
149 void setPaperMapLayer(const std::string& paperMapLayer);
150
152 std::string paperMapLayer() const;
153
156
158 bool inUse( const std::string& channelKeyToIgnore = "" ) const;
159
160 //@name Attachment functions.
162
165
168
171
174
177
179
182 void setPrimaryAttachment(const ElementList& elements);
185
187
194
197
200 void setLocationTrackAttachment( double x, double y, double z );
201
204 void getLocationTrackAttachment( double& x, double& y, double& z ) const;
205
209 void setPartAttachment(int partId);
210
212 int partAttachment() const;
213
215 void detach();
216
218 bool attached() const;
219
221 bool tracking() const;
222
225
228
229 void setHideModelOnAttach( bool hide );
230 bool hideModelOnAttach() const;
231
235
236 void setAttachmentHas3DCockpit( bool cockpit);
239
242
243 void setOrientToTargetConstraint( bool orient );
245
249
252
254
255 //@name Movement functions
257
260 void reset();
261
264 void setAllowReset(bool b);
265
267 bool allowReset() const;
268
270 void setAllowAttach(bool b);
271
273 bool allowAttach() const;
274
276 void setAllowDetach(bool b);
277
279 bool allowDetach() const;
280
283
285 void centerOnTerrain( const DtUniqueID& terrainPatch );
286
289 void suppressConstrainToTerrain( bool trueFalse );
290
292 void setConstrainToCenter( bool trueFalse );
294 bool constrainToCenter() const;
295
297 void getLocation( double &x, double &y, double& z ) const;
298
300 DtVector location() const;
301
303 DtVector observerCameraPosition() const;
304
306 void setLocation( double x, double y, double z );
307
309 void getOrientation( double& psi, double& theta, double& phi ) const;
310
312 void getTopographicOrientation( double& psi, double& theta, double& phi ) const;
313
315 void setOrientation( double psi, double theta, double phi );
316
318 void setTopographicOrientation( double psi, double theta, double phi );
319
321 void getOrientation( double& x, double& y, double& z, double& w ) const;
322
324 void setOrientation( double x, double y, double z, double w );
325
328 DtTaitBryan observerCameraOrientation(bool includeShake=true) const;
329
332 virtual DtVector observerPlatformFront() const;
333
336 virtual DtVector observerPlatformUp() const;
337
340 virtual DtVector observerPlatformRight() const;
341
345 virtual DtVector observerCameraFront(bool includeShake=true) const;
346
348 virtual DtVector observerCameraUp(bool includeShake = true) const;
349
351 virtual DtVector observerCameraRight(bool includeShake = true) const;
352
355 void moveUnit(const DtVector& direction);
356
359 void rotateUnit(const DtTaitBryan& rotation);
360
362
363 void getLinearVelocity(double &x, double &y, double &z) const;
364 DtVector linearVelocity() const;
366
368
369 void getRotationalVelocity( double& x, double& y, double& z ) const;
370 DtVector rotationalVelocity() const;
372
375
377 double observerAltitude() const;
378
384
385 //@name Attached Movement functions
387
393 void setAttachedLocation( double x, double y, double z );
394 void setAttachedX( double x );
395 void setAttachedY( double y );
396 void setAttachedZ( double z );
397
400 void setAttachedOrientation( double psi, double theta, double phi );
401 void setAttachedYaw(double psi);
402 void setAttachedPitch(double theta);
403 void setAttachedRoll(double phi);
404
407 void setLocalModelScalingEnabled( bool enabled );
408
411 void setLocalModelScalingAmount( float amount );
412
414
415 //@name Speed functions
417
419 void setOrbitSpeedGain( int gain, bool forwardToObserverModeManager = true );
420
422 int orbitSpeedGain() const;
423
425 int orbitSpeedGainFromSpeed( double speed ) const;
426
427 void setRotationSpeedGain( int gain, bool forwardToObserverModeManager = true );
428 int rotationSpeedGain() const;
429
431 void setLinearSpeedGain( int gain );
432 int linearSpeedGain() const;
433
434 void setLinearScaledSpeedGain( int gain, bool forwardToObserverModeManager = true );
436
437 void setLinearUnscaledSpeedGain( int gain, bool forwardToObserverModeManager = true );
439
440 void setGainPrecision( int amt, bool forwardToObserverModeManager = true );
441 int gainPrecision() const;
442
443 void setModelScaleFactor( double modelScaleFactor, bool forwardToObserverModeManager = true );
444 double modelScaleFactor() const;
445
446 void setModelScaleType( const std::string& modelScaleType, bool forwardToObserverModeManager = true );
447 const std::string& modelScaleType() const;
448
449 void setMaxModelScaleFactor(double maxModelScaleFactor, bool forwardToObserverModeManager = true);
450 double maxModelScaleFactor() const;
451
453 bool forwardToObserverModeManager = true );
455
459 void setIsFrustumBasedViewMagnificationEnabled(bool enabled, bool forwardToObserverModeManager = true);
461
463 void setNorthType(DtObserverObject::NorthType northType, bool forwardToObserverModeManager = true);
464
467
472 virtual void setColorControlEnabled(bool enabled, bool forwardToObserverModeManager = true);
473
475 virtual bool colorControlEnabled() const;
476
481 virtual void setColorControlInvert(bool enabled, bool forwardToObserverModeManager = true);
482
484 virtual bool colorControlInvert() const;
485
490 virtual void setColorControlContrast(double value, bool forwardToObserverModeManager = true);
491
493 virtual double colorControlContrast() const;
494
499 virtual void setColorControlBrightness(double value, bool forwardToObserverModeManager = true);
500
502 virtual double colorControlBrightness() const;
503
508 virtual void setColorControlColorMix(double value, bool forwardToObserverModeManager = true);
509
511 virtual double colorControlColorMix() const;
512
514 bool forwardToObserverModeManager = true );
516
517 void setOrbitSpeed( double speed );
518 double orbitSpeed() const;
519
520 void setRotationSpeed( double speed );
521 double rotationSpeed() const;
522
523 void setLinearSpeed( double speed );
524 double linearSpeed() const;
525
527
529 virtual void toggleFlashlight();
530
533
535 virtual bool setCameraShake(const std::string& shakeType);
536
539 const DtObserverObject::DtLodCenterSettings& settings, bool forwardToObserverModeManager = true);
541
544 virtual void setCameraShakeRotation(const DtQuat& rotQuat) const;
545
546 //@name Sensor functions
548
549 virtual void setSensor(const std::string& sensorName);
550
552 virtual std::string findSensor();
553
555 virtual void disableSensor();
556
558 virtual void slot_sensorRemoved(DtSensor* sensor);
560
561 // Called by the input driver before any mouse or keyboard input is processed for the
562 // frame, to sync local and remote observers.
563 virtual void synchronize();
564
566 boost::signalslib::signal<void(const std::string&, DtUniqueID)> signal_objectAttached;
567
569 boost::signalslib::signal<void(const std::string&)> signal_objectsDetached;
570
572 boost::signalslib::signal<void(DtObserver*, int)> signal_observerModeChanged;
573
575 boost::signalslib::signal<void(DtObserver*, int)> signal_linearScaledSpeedGainChanged;
576
578 boost::signalslib::signal<void(DtObserver*, int)> signal_linearUnscaledSpeedGainChanged;
579
581 boost::signalslib::signal<void(DtObserver*, int)> signal_rotationSpeedGainChanged;
582
584 boost::signalslib::signal<void(DtObserver*, int)> signal_orbitSpeedGainChanged;
585
587 boost::signalslib::signal<void(DtObserver*, int)> signal_gainPrecisionChanged;
588
590 boost::signalslib::signal<void(DtObserver*, double)> signal_modelScaleFactorChanged;
591
593 boost::signalslib::signal<void(DtObserver*, std::string)> signal_modelScaleTypeChanged;
594
596 boost::signalslib::signal<void(DtObserver*, double)> signal_viewMagnificationChanged;
597
599 boost::signalslib::signal<void(DtObserver*, double)> signal_terrainLodScaleChanged;
600
602 boost::signalslib::signal<void(DtObserver*, double)> signal_entityLodScaleChanged;
603
606
608 boost::signalslib::signal<void(DtObserver*, std::string)> signal_paperMapLayerChanged;
609
611 boost::signalslib::signal<void (DtObserver*,
614
617 boost::signalslib::signal<void (DtObserver*, double offset)>
619
622
624 boost::signalslib::signal<void(DtObserver*, DtObserverObject::NorthType northType)>
626
630 boost::signalslib::signal<void (DtSensor*)> signal_sensorChanged;
631
634 boost::signalslib::signal<void ()> signal_terrainChanged;
635
637 void getObserverOffsetVector( double& x, double& y, double& z ) const;
638 void getObserverRotationOffset( double& x, double& y, double& z, double& w ) const;
639
642
643 void getCameraFromParentOffsetVector( double& x, double& y, double& z ) const;
644 void getCameraFromParentRotationOffset( double& x, double& y, double& z, double& w ) const;
646
647
650 virtual void setUsesBoundingVolumeForAttachedOffsets(bool useBoundingVolume);
651
655
656 protected:
657
661 void slot_oceanLayerDeleted(const std::string&);
662
663 void updateGlobalTerrainFlag(bool flag);
664
665 double calcLinearSpeed() const;
666 double calcRotationSpeed() const;
667 double calcOrbitSpeed() const;
668
669 void setObserverOffsetVector( double x, double y, double z );
670
671 void setObserverRotationOffset( double x, double y, double z, double w );
672
673 void getDisplayNamesFromUniqueIds(const std::vector<DtUniqueID>& idsIn,
674 std::set<std::string>& displayNamesOut) const;
675 bool getUniqueIdsFromDisplayNames(const std::set<std::string>& displayNamesIn,
676 std::vector<DtUniqueID>& idsOut) const;
677
682
685
687
689 virtual void slot_onElementsAdded( const DtElementData::ElementList& elements );
690
698
699
701 virtual void attachToObjects(const ElementList& objects);
702
705 virtual void slot_attachNextTick(const ElementList objects);
706
708 virtual bool sceneObjectsAvailable(const ElementList& elements);
710
714
718
742
743 // Called when the DE raises the channel configuration modified signal. If a channel
744 // config has it's lod scale modified, the observer will modify all the other channels that
745 // it controls to keep them in sync.
747
749 void attachTo( bool afterTrue );
750
751 protected:
752
753 static const double theMoveStepSize;
754
767 std::vector<DtUniqueID> myCurrentAttachments;
768 std::vector<DtUniqueID> mySecondaryAttachments;
770 unsigned int myPartId;
785 std::string myPaperMapLayer;
786
788
801 };
802}
Contains the DtElementAttributeManager class declaration.
Contains makVrv::DtElementData class.
Contains vrvCore::DtObserverMode class.
Contains makVrv::DtObserverObject class declaration.
Contains makArchives::DtObserverStateRecord class.
Base class to provide boost signal/slot management.
A DtObserverSettingsRecord contains the settings of an observer.
Definition DtObserverSettingsRecord.h:21
AttachType
Definition DtObserverSettingsRecord.h:25
A DtObserverSettingsRecord contains the state of an observer.
Definition DtObserverStateRecord.h:21
The abstract interface necessary for agents.
Definition DtAgentManagerInterface.h:34
Definition DtCameraShake.h:24
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition DtChannelConfiguration.h:27
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer,...
Definition DtDe.h:77
std::vector< EntryAttributes > EntryAttributesList
Definition DtElementAttributeManager.h:44
std::vector< DtElementEntry * > ElementList
Type definition for a vector of DtElementEntry pointers.
Definition DtElementData.h:47
TODO: This class is used to encapsulate a set of default observer settings and parameters.
Definition DtObserverConfiguration.h:23
int linearScaledSpeedGain() const
double calcOrbitSpeed() const
virtual bool setCameraShake(const std::string &shakeType)
Tell the observer what kind of camera shake to set.
void toggleConstrainToCenter()
double myViewMagnification
Definition DtObserver.h:779
virtual DtCameraShake * cameraShake()
Get the camera shake is on this observer.
void detach()
Detach from all elements.
bool isSecondaryAttached(DtElementID) const
Returns true if the object is attached as a secondary object.
DtSensor * mySensor
Definition DtObserver.h:782
DtObserverObjectAgent * myObserverObjectAgent
Definition DtObserver.h:757
boost::signalslib::signal< void(DtObserver *, double offset)> signal_speedScalingMslModeOffsetChanged
Signal emitted when an observer's speed scaling MSL mode offset changes.
Definition DtObserver.h:618
boost::signalslib::signal< void(const std::string &, DtUniqueID)> signal_objectAttached
Boost signal called when observer attaches to an object.
Definition DtObserver.h:566
DtElementID lastSingleAttached() const
bool myAllowAttach
Definition DtObserver.h:775
void setAttachedOrientation(double psi, double theta, double phi)
int gainPrecision() const
void setModelScaleFactor(double modelScaleFactor, bool forwardToObserverModeManager=true)
void setOrientToTargetConstraint(bool orient)
int rotationSpeedGain() const
unsigned int myPartId
Definition DtObserver.h:770
void slot_channelModified(const DtChannelConfiguration &config)
void setObserverRotationOffset(double x, double y, double z, double w)
virtual void attachToObjects(const ElementList &objects)
float myDelayedAttachedYValue
Definition DtObserver.h:796
void setAttachedYaw(double psi)
void slot_observerModeSettingChanged(int observerMode, int settingKey)
virtual void disableSensor()
Disables the current sensor.
boost::signalslib::signal< void(DtObserver *, DtObserverObject::NorthType northType)> signal_northTypeChanged
Signal emitted when an observer's north type changed.
Definition DtObserver.h:625
void setAllowReset(bool b)
void setLocalModelScalingEnabled(bool enabled)
void setLinearSpeedGain(int gain)
Set scaled or unscaled gain based on current speed scaling state.
void slot_observerModeLodCenterSettingsChanged(int observerMode)
DtDe & myDe
Definition DtObserver.h:755
void setHideModelOnAttach(bool hide)
boost::signalslib::signal< void()> signal_terrainChanged
Definition DtObserver.h:634
void centerOnTerrain(const DtUniqueID &terrainPatch)
reset and recenter to specified terrain patch
virtual bool sceneObjectsAvailable(const ElementList &elements)
Check to see if scene objects are available for all the elements we've been asked attach to.
int linearUnscaledSpeedGain() const
int orbitSpeedGainFromSpeed(double speed) const
Calculate the gain for a given speed.
virtual void slot_attachNextTick(const ElementList objects)
virtual void slot_onElementAttributesChanged(const DtElementAttributeManager::EntryAttributesList &attributes)
Called by signal whenever element attributes change.
void setOrbitSpeedGain(int gain, bool forwardToObserverModeManager=true)
Set the orbit speed gain.
void attachTo(bool afterTrue)
Protected implementation of attach to.
virtual double colorControlBrightness() const
Gets the color control brightness value.
virtual bool colorControlInvert() const
Gets the color control invert value.
bool isFrustumBasedViewMagnificationEnabled() const
virtual void setCameraShakeRotation(const DtQuat &rotQuat) const
virtual double colorControlContrast() const
Gets the color control contrast value.
bool myAttachedXDelayedFlag
Definition DtObserver.h:789
virtual void setColorControlColorMix(double value, bool forwardToObserverModeManager=true)
Sets the current color control color mix value. Defines how much color to mix in to the image.
void setPrimaryAttachment(const ElementList &elements)
bool myAttachedYDelayedFlag
Definition DtObserver.h:790
boost::signalslib::signal< void(DtObserver *, int)> signal_observerModeChanged
Boost signal called when observer's mode changed.
Definition DtObserver.h:572
void attachToPreviousElement()
Tell the observer to attach to the previous allowable object.
void setAllowDetach(bool b)
Sets whether or not detachment is allowed.
void setGainPrecision(int amt, bool forwardToObserverModeManager=true)
virtual double colorControlColorMix() const
Gets the color control color mix value.
void slot_observerModeColorControlBrightnessChanged(int observerMode)
virtual void slot_sensorRemoved(DtSensor *sensor)
Called when a sensor is removed or deleted from the sensor manager.
DtCameraShake * myCameraShake
Definition DtObserver.h:783
int partAttachment() const
Get the part ID that the observer is attached to.
virtual bool colorControlEnabled() const
Gets the color control enabled value.
float myTerrainLodScale
Definition DtObserver.h:781
DtObserverConfiguration & configuration()
void setOrientation(double x, double y, double z, double w)
Go to this orientation.
boost::signalslib::signal< void(const std::string &)> signal_objectsDetached
Boost signal called when observer detaches from all.
Definition DtObserver.h:569
int myObserverMode
Definition DtObserver.h:763
virtual std::string findSensor()
Get the name of the current sensor; returns "" if there is none.
double viewMagnification() const
Get this observer's view magnification.
void setAttachedLocation(double x, double y, double z)
void setAllowAttach(bool b)
Sets whether or not attachment is allowed.
DtSignalConnectionManager myConnections
Definition DtObserver.h:756
virtual void setUsesBoundingVolumeForAttachedOffsets(bool useBoundingVolume)
Set whether or not the (attached) observer will use the the object it is attached to's bounding volum...
double speedScalingMslModeOffset() const
void setLocation(double x, double y, double z)
Go to this position (database coordinates).
bool allowReset() const
Get if reset is allowed.
double calcRotationSpeed() const
bool myProjectionIs2D
Definition DtObserver.h:784
DtObserverObject::SpeedScalingMode speedScalingMode() const
void slot_oceanLayerAdded(const DtOceanLayer &)
void setLinearSpeed(double speed)
std::string myPaperMapLayer
Definition DtObserver.h:785
void setFromRecord(const makArchives::DtObserverSettingsRecord &rec)
Fill out this object's settings from the record.
bool setObserverMode(int observerMode)
bool haveLastSingleAttached() const
Has this observer ever attached to a single entity?
bool myAllowReset
Definition DtObserver.h:774
virtual DtVector observerPlatformRight() const
void setModelScaleType(const std::string &modelScaleType, bool forwardToObserverModeManager=true)
void getLocation(double &x, double &y, double &z) const
Get the observer's position from the remote object (no observer camera offset).
double observerAltitude() const
Get the observer's current altitude.
void setViewResolution(double resolution)
Set the observer's resolution (2D). In meters per pixel.
void slot_observerModeModelScaleTypeChanged(int observerMode)
void getObserverRotationOffset(double &x, double &y, double &z, double &w) const
void getCameraFromParentRotationOffset(double &x, double &y, double &z, double &w) const
void getOrientation(double &x, double &y, double &z, double &w) const
Get the observer's orientation from the local observer object.
virtual void setLodCenterSettings(const DtObserverObject::DtLodCenterSettings &settings, bool forwardToObserverModeManager=true)
Set the lod center settings to use.
void getRotationalVelocity(double &x, double &y, double &z) const
Get the observer's rotational velocity from the remote object.
double orbitSpeed() const
void getCameraFromParentOffsetVector(double &x, double &y, double &z) const
DtObserverObject::AttachType convertObserverSettingsAttachType(makArchives::DtObserverSettingsRecord::AttachType type) const
virtual bool lodCenterSettings(DtObserverObject::DtLodCenterSettings &settings) const
void setRotationSpeedGain(int gain, bool forwardToObserverModeManager=true)
bool myAttachmentHas3DCockpit
Definition DtObserver.h:765
boost::signalslib::signal< void(DtObserver *, double)> signal_entityLodScaleChanged
Boost signal called when the observer's LOD Distance Scale used for entities is changed.
Definition DtObserver.h:602
void setLocationTrackAttachment(double x, double y, double z)
virtual DtVector observerPlatformFront() const
const std::string & modelScaleType() const
DtObserverObject::NorthType northType() const
Gets the current north type.
virtual void slot_disableBuoyancyForAttachedEntitiesChanged(bool disable)
Looks up the attached scene object, finds its clamping updater and disables it.
bool allowDetach() const
Get if detach is allowed.
std::vector< DtElementID > ElementList
Definition DtObserver.h:42
bool myFlashlightEnabled
Definition DtObserver.h:778
void slot_observerModeOrbitSpeedGainChanged(int observerMode)
bool tracking() const
Check if the observer is attached to elements.
void slot_observerModeIsFrustumBasedViewMagnificationEnabledChanged(int observerMode)
virtual void toggleFlashlight()
Toggle the observer-attached flashlight on or off.
bool allowAttach() const
Get if attach is allowed.
void getLocationTrackAttachment(double &x, double &y, double &z) const
bool getRecord(makArchives::DtObserverStateRecord &recOut) const
Returns true if recOut was filled with all the state of this object.
void setSecondaryAttachment(const ElementList &element)
virtual bool usesBoundingVolumeForAttachedOffsets() const
Set whether or not the (attached) observer will use the the object it is attached to's bounding volum...
void moveUnit(const DtVector &direction)
void centerOnTerrain()
rest and recenter.
void getLinearVelocity(double &x, double &y, double &z) const
Get the observer's linear velocity from the remote object.
makArchives::DtObserverStateRecord myCachedObserverStateRecord
Definition DtObserver.h:762
void setModeSpecificObserverObjectData()
double linearSpeed() const
bool inUse(const std::string &channelKeyToIgnore="") const
Returns true in this observer is found in any channel configuration.
bool myAttachedZDelayedFlag
Definition DtObserver.h:791
void setSecondaryAttachment(DtElementID element)
void setAttachedPitch(double theta)
const ElementList & secondaryAttachments() const
Get the secondary attachments.
void setAttachedZ(double z)
void setLinearScaledSpeedGain(int gain, bool forwardToObserverModeManager=true)
bool isPrimaryAttached(DtElementID) const
Returns true if the object is attached as a primary object.
bool myAllowDetach
Definition DtObserver.h:776
void suppressConstrainToTerrain(bool trueFalse)
void attachToNextElement()
Tell the observer to attach to the next allowable object.
void setOrbitSpeed(double speed)
int observerMode() const
void getTopographicOrientation(double &psi, double &theta, double &phi) const
Get the observer's orientation from the local observer object in topo.
void slot_completeAttachment()
preTick slot for completing an attachment for an element that changed last frame
void disconnectFromElementDataSignals()
boost::signalslib::signal< void(DtObserver *, std::string)> signal_paperMapLayerChanged
Signal called when the observer's paper map layer is changed.
Definition DtObserver.h:608
bool myAttachmentDelayed
Definition DtObserver.h:787
void setLinearUnscaledSpeedGain(int gain, bool forwardToObserverModeManager=true)
virtual ~DtObserver()
DTOR.
void setSpeedScalingMode(DtObserverObject::SpeedScalingMode mode, bool forwardToObserverModeManager=true)
boost::signalslib::signal< void(DtObserver *, bool)> signal_isFrustumBasedViewMagnificationEnabledChanged
Boost signal called when the observer's use of an effective zoom calculation has changed.
Definition DtObserver.h:621
DtVector rotationalVelocity() const
boost::signalslib::signal< void(DtObserver *, double)> signal_modelScaleFactorChanged
Boost signal called when the model scale factor is changed.
Definition DtObserver.h:590
void setTerrainLodScale(double terrainLodScale)
Set this observer's LOD Scale (used for terrain visuals).
void slot_observerModeSpeedScalingMslModeOffsetChanged(int observerMode)
bool myConstrainToCenter
Definition DtObserver.h:772
void slot_observerModeSpeedScalingModeChanged(int observerMode)
bool myAttachedYawDelayedFlag
Definition DtObserver.h:792
void slot_observerModeModelScaleFactorChanged(int observerMode)
void setOrientation(double psi, double theta, double phi)
Go to this orientation.
bool isAttached(DtElementID) const
Returns true if the element is attached as either a primary or secondary element.
std::vector< DtUniqueID > myCurrentAttachments
Definition DtObserver.h:767
virtual void slot_onElementsAdded(const DtElementData::ElementList &elements)
Called by signal whenever elements are added.
void setPrimaryAttachment(DtElementID element)
void setMaxModelScaleFactor(double maxModelScaleFactor, bool forwardToObserverModeManager=true)
void slot_terrainCleared()
reset observer
int orbitSpeedGain() const
Get the orbit speed gain.
float myDelayedAttachedZValue
Definition DtObserver.h:797
void connectToElementDataSignals()
float myDelayedAttachedYawValue
Definition DtObserver.h:798
virtual DtVector observerCameraUp(bool includeShake=true) const
Get a vector representation of the observer * camera up axis.
double observerHeightAboveTerrain() const
float myEntityLodScale
Definition DtObserver.h:780
bool attachmentHas3DCockpit() const
void setPartAttachment(int partId)
bool constrainToCenter() const
void setNorthType(DtObserverObject::NorthType northType, bool forwardToObserverModeManager=true)
Sets the current north type.
void slot_observerModeLinearScaledSpeedGainChanged(int observerMode)
DtUniqueID myLastSingleAttached
Definition DtObserver.h:769
const std::string & name() const
Get the configuration name.
void setAttachedRoll(double phi)
bool myOrientToTargetConstraint
Definition DtObserver.h:771
makArchives::DtObserverStateRecord getCachedObserverStateRecord() const
void slot_observerModeModelSetChanged(int observerMode)
void slot_observerModeRotationSpeedGainChanged(int observerMode)
void setViewMagnification(double magnficationFactor)
Set this observer's view magnification.
DtObserver(DtDe &de, DtAgentManagerInterface &sceneInterface, const DtObserverConfiguration &config)
CTOR.
bool hasInitialLocation() const
bool getUniqueIdsFromDisplayNames(const std::set< std::string > &displayNamesIn, std::vector< DtUniqueID > &idsOut) const
bool myAttachedPitchDelayedFlag
Definition DtObserver.h:793
boost::signalslib::signal< void(DtObserver *, double)> signal_viewMagnificationChanged
Boost signal called when the observer's view magnification is changed.
Definition DtObserver.h:596
static const double theMoveStepSize
Definition DtObserver.h:753
void setAttachmentHas3DCockpit(bool cockpit)
double entityLodScale() const
Get this observer's LOD scale (used for entities).
bool hideModelOnAttach() const
virtual DtVector observerPlatformUp() const
void slot_observerModeColorControlInvertChanged(int observerMode)
void setAttachedY(double y)
DtObserverObject::AttachType attachType() const
void slot_observerModeColorControlContrastChanged(int observerMode)
void setConstrainToCenter(bool trueFalse)
constrain to point to center of earth (0.0.0)
void setEntityLodScale(double entityLodScale)
Set this observer's LOD Scale (used for entities).
virtual DtVector observerCameraRight(bool includeShake=true) const
Get a vector representation of the observer * camera right axis.
float myDelayedAttachedRollValue
Definition DtObserver.h:800
void updateGlobalTerrainFlag(bool flag)
double viewResolution() const
Get the observer's resolution (2D).In meters per pixel.
bool myHasInitialLocation
Definition DtObserver.h:777
boost::signalslib::signal< void(DtSensor *)> signal_sensorChanged
Definition DtObserver.h:630
void setFromRecord(const makArchives::DtObserverStateRecord &rec)
Fill out this object's state from the record.
DtObserverObjectAgent & agent()
Get the observer object agent.
boost::signalslib::signal< void(DtObserver *, DtObserverObject::DtLodCenterSettings)> signal_lodCenterSettingsChanged
Boost signal called when the observer's LOD Center Settings has changed.
Definition DtObserver.h:605
boost::signalslib::signal< void(DtObserver *, DtObserverObject::SpeedScalingMode scalingMode)> signal_speedScalingModeChanged
Signal emitted when an observer's speed scaling mode changes.
Definition DtObserver.h:613
void setSpeedScalingMslModeOffset(double offset, bool forwardToObserverModeManager=true)
int linearSpeedGain() const
DtDe & de()
Get the observer's DtDe.
Definition DtObserver.h:52
void slot_observerModeSensorChanged(int observerMode)
virtual void setColorControlBrightness(double value, bool forwardToObserverModeManager=true)
Sets the current color control brightness value. Defines the grayscale brightness in the image.
bool attached() const
Check if the observer is attached to elements.
double modelScaleFactor() const
double calcLinearSpeed() const
void slot_observerModeNorthTypeChanged(int observerMode)
double terrainLodScale() const
Get this observer's LOD scale (used for terrain visuals).
void slot_observerModeIs2DChanged(int observerMode)
DtTaitBryan observerCameraOrientation(bool includeShake=true) const
void getObserverOffsetVector(double &x, double &y, double &z) const
Needed public for CIGI request position packets.
DtObserverObject::AttachType myAttachType
Definition DtObserver.h:766
virtual void setColorControlEnabled(bool enabled, bool forwardToObserverModeManager=true)
Sets the color control enabled value. Defines if the color control should be used for an observer mod...
virtual DtVector observerCameraFront(bool includeShake=true) const
virtual void synchronize()
bool orientToTargetConstraint() const
bool myHideModelOnAttach
Definition DtObserver.h:764
makArchives::DtObserverSettingsRecord::AttachType convertObserverAttachType(DtObserverObject::AttachType type) const
bool myConnectedToElementDataSignals
Definition DtObserver.h:773
void setIsFrustumBasedViewMagnificationEnabled(bool enabled, bool forwardToObserverModeManager=true)
Set whether or not an effective zoom is calculated.
bool getRecord(makArchives::DtObserverSettingsRecord &recOut) const
Returns true if recOut was filled with all the setting of this object.
std::string paperMapLayer() const
Get this observer's paper map layer.
void setLocalModelScalingAmount(float amount)
void setTopographicOrientation(double psi, double theta, double phi)
Go to this topographic orientation.
double maxModelScaleFactor() const
bool observerObjectMoving() const
Check to see if the observer object is moving.
const ElementList & primaryAttachments() const
Get the primary attachments.
void setRotationSpeed(double speed)
const DtObserverConfiguration & configuration() const
bool projectionIs2D() const
float myDelayedAttachedXValue
Definition DtObserver.h:795
boost::signalslib::signal< void(DtObserver *, int)> signal_linearUnscaledSpeedGainChanged
Boost signal called when the unscaled linear speed gain is changed.
Definition DtObserver.h:578
virtual void setSensor(const std::string &sensorName)
Set the sensor to use on channels rendering with this observer.
void setAttachType(DtObserverObject::AttachType type)
boost::signalslib::signal< void(DtObserver *, std::string)> signal_modelScaleTypeChanged
Boost signal called when the model scale type is changed.
Definition DtObserver.h:593
void setName(const std::string &name)
void slot_observerModeColorControlEnabledChanged(int observerMode)
DtObserverConfiguration * myConfiguration
Definition DtObserver.h:758
void slot_observerModeLinearUnscaledSpeedGainChanged(int observerMode)
virtual void setColorControlInvert(bool enabled, bool forwardToObserverModeManager=true)
Sets the current color control invert value. Defines if the grayscale computed output should be inver...
void slot_oceanLayerDeleted(const std::string &)
boost::signalslib::signal< void(DtObserver *, int)> signal_linearScaledSpeedGainChanged
Boost signal called when the scaled linear speed gain is changed.
Definition DtObserver.h:575
std::vector< DtUniqueID > mySecondaryAttachments
Definition DtObserver.h:768
boost::signalslib::signal< void(DtObserver *, int)> signal_gainPrecisionChanged
Boost signal called when the gain precision is changed.
Definition DtObserver.h:587
void slot_observerModeGainPrecisionChanged(int observerMode)
boost::signalslib::signal< void(DtObserver *, int)> signal_orbitSpeedGainChanged
Boost signal called when the orbit speed gain is changed.
Definition DtObserver.h:584
void setObserverOffsetVector(double x, double y, double z)
void getOrientation(double &psi, double &theta, double &phi) const
Get the observer's orientation from the local observer object.
virtual void setColorControlContrast(double value, bool forwardToObserverModeManager=true)
Sets the current color control contrast value. Defines the grayscale contrast in the image.
DtVector linearVelocity() const
boost::signalslib::signal< void(DtObserver *, int)> signal_rotationSpeedGainChanged
Boost signal called when the rotation speed gain is changed.
Definition DtObserver.h:581
const DtObserverObjectAgent & agent() const
Get the terrain patch object agent.
void setAttachedX(double x)
void getDisplayNamesFromUniqueIds(const std::vector< DtUniqueID > &idsIn, std::set< std::string > &displayNamesOut) const
void slot_observerModeColorControlColorMixChanged(int observerMode)
void setPaperMapLayer(const std::string &paperMapLayer)
Set the observer's paper map layer.
float myDelayedAttachedPitchValue
Definition DtObserver.h:799
DtVector observerCameraPosition() const
Get the position of the observer's camera.
bool myAttachedRollDelayedFlag
Definition DtObserver.h:794
void setViewResolutionFromHeightAboveTerrain(double hat)
Set the observer's resolution (2D). In meters per pixel.
void slot_observerModeAdded(int observerMode)
void setProjectionIs2D(bool is2d)
boost::signalslib::signal< void(DtObserver *, double)> signal_terrainLodScaleChanged
Boost signal called when the observer's LOD Distance Scale used for terrain visuals is changed.
Definition DtObserver.h:599
void slot_observerModeKeyMapChanged(int observerMode)
DtVector location() const
Get the observer's position from the remote object (no observer camera offset).
void rotateUnit(const DtTaitBryan &rotation)
double rotationSpeed() const
Agent class for the scene object class: DtObserverObject.
Definition DtObserverObjectAgent.hpp:27
AttachType
Definition DtObserverObject.h:43
NorthType
Definition DtObserverObject.h:63
SpeedScalingMode
Definition DtObserverObject.h:57
The ocean layer is a type of terrain layer which contains information about an area that should be re...
Definition DtOceanLayer.h:26
Definition DtQuat.h:20
Definition DtSensor.h:31
Class to manage disconnection of boost connections on deletion.
Definition DtSignalConnectionManager.h:21
Contains DtCreateSensorFieldOfViewCommand and DtCreateSensorFieldOfViewCommandCreator class declarati...
Definition DtGridLinesSettingsRecord.h:16
DtUniqueID DtElementID
Definition DtUniqueID.h:23
unsigned long long DtUniqueID
Definition DtUniqueID.h:19
Definition DtObserverObject.h:72
#define DT_DLL_VRVCORE
Definition vrvCore.h:20