VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes
makVrv::DtObserver Class Reference

A facade for a DtObserverObject. More...

Public Types

typedef std::vector< DtElementIDElementList
 

Public Member Functions

 DtObserver (DtDe &de, DtAgentManagerInterface &sceneInterface, const DtObserverConfiguration &config)
 CTOR. More...
 
virtual ~DtObserver ()
 DTOR. More...
 
DtDede ()
 Get the observer's DtDe. More...
 
DtObserverObjectAgent & agent ()
 Get the observer object agent. More...
 
const DtObserverObjectAgent & agent () const
 Get the terrain patch object agent. More...
 
const std::string & name () const
 Get the configuration name. More...
 
void setName (const std::string &name)
 
double viewResolution () const
 Get the observer's resolution (2D).In meters per pixel. More...
 
void setViewResolution (double resolution)
 Set the observer's resolution (2D). In meters per pixel. More...
 
void setViewResolutionFromHeightAboveTerrain (double hat)
 Set the observer's resolution (2D). In meters per pixel. More...
 
double viewMagnification () const
 Get this observer's view magnification. More...
 
void setViewMagnification (double magnficationFactor)
 Set this observer's view magnification. More...
 
void setLodScale (double lodScale)
 Set this observer's LOD Scale. More...
 
double lodScale () const
 Get this observer's LOD scale. More...
 
void setPaperMapLayer (std::string paperMapLayer)
 Set the observer's paper map layer. More...
 
std::string paperMapLayer () const
 Get this observer's paper map layer. More...
 
DtObserverConfigurationconfiguration ()
 
const DtObserverConfigurationconfiguration () const
 
bool inUse (const std::string &channelKeyToIgnore="") const
 Returns true in this observer is found in any channel configuration. More...
 
void setLocationTrackAttachment (double x, double y, double z)
 Set the location that will be tracked when in mimic location track or tether location track modes. More...
 
void getLocationTrackAttachment (double &x, double &y, double &z) const
 Get the location that will be tracked when in mimic location track or tether location track modes. More...
 
void setPartAttachment (int partId)
 Set the part number of the primary attachment. More...
 
int partAttachment () const
 Get the part ID that the observer is attached to. More...
 
void detach ()
 Detach from all elements. More...
 
bool attached () const
 Check if the observer is attached to elements. More...
 
bool tracking () const
 Check if the observer is attached to elements. More...
 
const ElementListprimaryAttachments () const
 Get the primary attachments. More...
 
const ElementListsecondaryAttachments () const
 Get the secondary attachments. More...
 
void setHideModelOnAttach (bool hide)
 
bool hideModelOnAttach () const
 
void setAttachType (DtObserverObject::AttachType type)
 
DtObserverObject::AttachType attachType () const
 
void setOrientToTargetConstraint (bool orient)
 
bool orientToTargetConstraint () const
 
DtElementID lastSingleAttached () const
 Last single id this observer attached to. More...
 
bool haveLastSingleAttached () const
 Has this observer ever attached to a single entity? More...
 
bool observerObjectMoving () const
 Check to see if the observer object is moving. More...
 
double observerAltitude () const
 Get the observer's current altitude. More...
 
virtual void toggleFlashlight ()
 Toggle the observer-attached flashlight on or off. More...
 
virtual DtCameraShakecameraShake ()
 Get the camera shake is on this observer. More...
 
virtual bool setCameraShake (const std::string &shakeType)
 Tell the observer what kind of camera shake to set. More...
 
virtual void setCameraShakeRotation (const DtQuat &rotQuat) const
 Provide a rotational offset to the camera for camera shake. More...
 
virtual void synchronize ()
 
void getObserverOffsetVector (double &x, double &y, double &z) const
 Needed public for CIGI request position packets. More...
 
void getObserverRotationOffset (double &x, double &y, double &z, double &w) const
 
bool getRecord (makArchives::DtObserverStateRecord &recOut) const
 Returns true if recOut was filled with all the state of this object. More...
 
void setFromRecord (const makArchives::DtObserverStateRecord &rec)
 Fill out this object's state from the record. More...
 
bool getRecord (makArchives::DtObserverSettingsRecord &recOut) const
 Returns true if recOut was filled with all the setting of this object. More...
 
void setFromRecord (const makArchives::DtObserverSettingsRecord &rec)
 Fill out this object's settings from the record. More...
 
makArchives::DtObserverStateRecord getCachedObserverStateRecord () const
 Get the original copy of the observer state record cached at creation time from myCachedObserverStateRecord. More...
 
bool hasInitialLocation () const
 True if a setFromRecord results in a location set that should not be overriden by a subsequent reset (used in initialization only) More...
 
bool projectionIs2D () const
 Get/set the projection type (2D or 3D) this observer will use Whether or not an observer uses a 2D or 3D view depends on the observer mode in use. More...
 
void setProjectionIs2D (bool is2d)
 
int observerMode () const
 Visual mode for this observer. More...
 
bool setObserverMode (int observerMode)
 
void attachToNextElement ()
 Tell the observer to attach to the next allowable object. More...
 
void attachToPreviousElement ()
 Tell the observer to attach to the previous allowable object. More...
 
bool isAttached (DtElementID) const
 Returns true if the element is attached as either a primary or secondary element. More...
 
bool isPrimaryAttached (DtElementID) const
 Returns true if the object is attached as a primary object. More...
 
bool isSecondaryAttached (DtElementID) const
 Returns true if the object is attached as a secondary object. More...
 
void setPrimaryAttachment (const ElementList &elements)
 Attach to the following elements. More...
 
void setPrimaryAttachment (DtElementID element)
 
void setSecondaryAttachment (const ElementList &element)
 Set secondary attachment to the following elements. More...
 
void setSecondaryAttachment (DtElementID element)
 
void setAttachmentHas3DCockpit (bool cockpit)
 The GL Studio driver uses this to tell the observer that it's going to render a 3D cockpit so the observer can take that into account when determining znear. More...
 
bool attachmentHas3DCockpit () const
 
void reset ()
 If attached, call resetAttachment, else gotoTerrain center with first terrain patch in terrain patch list. More...
 
void setAllowReset (bool b)
 Sets whether or not resetting the observer is allowed. More...
 
bool allowReset () const
 Get if reset is allowed. More...
 
void setAllowAttach (bool b)
 Sets whether or not attachment is allowed. More...
 
bool allowAttach () const
 Get if attach is allowed. More...
 
void setAllowDetach (bool b)
 Sets whether or not detachment is allowed. More...
 
bool allowDetach () const
 Get if detach is allowed. More...
 
void centerOnTerrain ()
 rest and recenter. More...
 
void centerOnTerrain (const DtUniqueID &terrainPatch)
 reset and recenter to specified terrain patch More...
 
void suppressConstrainToTerrain (bool trueFalse)
 if constrain to terrain is on, suppress or end suppress if constrain to terrain is not on, do nothing More...
 
void setConstrainToCenter (bool trueFalse)
 constrain to point to center of earth (0.0.0) More...
 
void toggleConstrainToCenter ()
 
bool constrainToCenter () const
 
void getLocation (double &x, double &y, double &z) const
 Get the observer's position from the remote object (no observer camera offset) More...
 
DtVector location () const
 Get the observer's position from the remote object (no observer camera offset) More...
 
DtVector observerCameraPosition () const
 Get the position of the observer's camera. More...
 
void setLocation (double x, double y, double z)
 Go to this position (database coordinates) More...
 
void getOrientation (double &psi, double &theta, double &phi) const
 Get the observer's orientation from the local observer object. More...
 
void getTopographicOrientation (double &psi, double &theta, double &phi) const
 Get the observer's orientation from the local observer object in topo. More...
 
void setOrientation (double psi, double theta, double phi)
 Go to this orientation. More...
 
void setTopographicOrientation (double psi, double theta, double phi)
 Go to this topographic orientation. More...
 
void getOrientation (double &x, double &y, double &z, double &w) const
 Get the observer's orientation from the local observer object. More...
 
void setOrientation (double x, double y, double z, double w)
 Go to this orientation. More...
 
DtTaitBryan observerCameraOrientation (bool includeShake=true) const
 Get the orientation of the observer's camera. More...
 
virtual DtVector observerPlatformFront () const
 Get a vector representation of the observer's front axis; this is before the camera orientation is applied. More...
 
virtual DtVector observerPlatformUp () const
 Get a vector representation of the observer's up axis; this is before the camera orientation is applied. More...
 
virtual DtVector observerPlatformRight () const
 Get a vector representation of the observer's right axis; this is before the camera orientation is applied. More...
 
virtual DtVector observerCameraFront (bool includeShake=true) const
 Get a vector representation of the observer * camera front axis This is where the observer is actually looking. More...
 
virtual DtVector observerCameraUp (bool includeShake=true) const
 Get a vector representation of the observer * camera up axis. More...
 
virtual DtVector observerCameraRight (bool includeShake=true) const
 Get a vector representation of the observer * camera right axis. More...
 
void moveUnit (const DtVector &direction)
 Move the observer one arbitrary unit in some direction Direction is in observer coordinates. More...
 
void rotateUnit (const DtTaitBryan &rotation)
 Rotate the observer one arbitrary unit Rotation is in observer coordinates. More...
 
void getLinearVelocity (double &x, double &y, double &z) const
 Get the observer's linear velocity from the remote object. More...
 
DtVector linearVelocity () const
 
void getRotationalVelocity (double &x, double &y, double &z) const
 Get the observer's rotational velocity from the remote object. More...
 
DtVector rotationalVelocity () const
 
void setAttachedLocation (double x, double y, double z)
 Go to this position relative to the attached object (if attached, otherwise ignored - also ignored in track attach mode) More...
 
void setAttachedOrientation (double psi, double theta, double phi)
 Go to this orientation relative to the attached object (if attached, otherwise ignored - also ignored in track attach mode) More...
 
void setAttachedYaw (double psi)
 
void setAttachedPitch (double theta)
 
void setAttachedRoll (double phi)
 
void setLocalModelScalingEnabled (bool enabled)
 Sets whether local model scaling is enabled for attached entities in space attach mode. More...
 
void setLocalModelScalingAmount (float amount)
 Sets the amount of local model scaling to apply to attached entities when in space attach mode. More...
 
void setOrbitSpeedGain (int gain, bool forwardToObserverModeManager=true)
 Set the orbit speed gain. More...
 
int orbitSpeedGain () const
 Get the orbit speed gain. More...
 
int orbitSpeedGainFromSpeed (double speed) const
 Calculate the gain for a given speed. More...
 
void setRotationSpeedGain (int gain, bool forwardToObserverModeManager=true)
 
int rotationSpeedGain () const
 
void setLinearSpeedGain (int gain)
 Set scaled or unscaled gain based on current speed scaling state. More...
 
int linearSpeedGain () const
 
void setLinearScaledSpeedGain (int gain, bool forwardToObserverModeManager=true)
 
int linearScaledSpeedGain () const
 
void setLinearUnscaledSpeedGain (int gain, bool forwardToObserverModeManager=true)
 
int linearUnscaledSpeedGain () const
 
void setGainPrecision (int amt, bool forwardToObserverModeManager=true)
 
int gainPrecision () const
 
void setModelScaleFactor (double modelScaleFactor, bool forwardToObserverModeManager=true)
 
double modelScaleFactor () const
 
void setModelScaleType (const std::string &modelScaleType, bool forwardToObserverModeManager=true)
 
const std::string & modelScaleType () const
 
void setMaxModelScaleFactor (double maxModelScaleFactor, bool forwardToObserverModeManager=true)
 
double maxModelScaleFactor () const
 
void setSpeedScalingMode (DtObserverObject::SpeedScalingMode mode, bool forwardToObserverModeManager=true)
 
DtObserverObject::SpeedScalingMode speedScalingMode () const
 
void setLodScaleCenterEnabled (bool enabled, bool forwardToObserverModeManager=true)
 
bool lodScaleCenterEnabled () const
 
void setLodScaleCenterMagMinLimit (double limit, bool forwardToObserverModeManager=true)
 
double lodScaleCenterMagMinLimit () const
 
void setNorthType (DtObserverObject::NorthType northType, bool forwardToObserverModeManager=true)
 Sets the current north type. More...
 
DtObserverObject::NorthType northType () const
 Gets the current north type. More...
 
void setSpeedScalingMslModeOffset (double offset, bool forwardToObserverModeManager=true)
 
double speedScalingMslModeOffset () const
 
void setOrbitSpeed (double speed)
 
double orbitSpeed () const
 
void setRotationSpeed (double speed)
 
double rotationSpeed () const
 
void setLinearSpeed (double speed)
 
double linearSpeed () const
 
virtual void setSensor (const std::string &sensorName)
 Set the sensor to use on channels rendering with this observer. More...
 
virtual std::string findSensor ()
 Get the name of the current sensor; returns "" if there is none. More...
 
virtual void disableSensor ()
 Disables the current sensor. More...
 
virtual void slot_sensorRemoved (DtSensor *sensor)
 Called when a sensor is removed or deleted from the sensor manager. More...
 
void getCameraFromParentOffsetVector (double &x, double &y, double &z) const
 These are the difference between the observer's camera and the object that the observer is attached to. More...
 
void getCameraFromParentRotationOffset (double &x, double &y, double &z, double &w) const
 

Public Attributes

boost::signalslib::signal
< void(const std::string
&, DtUniqueID)> 
signal_objectAttached
 Boost signal called when observer attaches to an object. More...
 
boost::signalslib::signal
< void(const std::string &)> 
signal_objectsDetached
 Boost signal called when observer detaches from all. More...
 
boost::signalslib::signal
< void(DtObserver *, int)> 
signal_observerModeChanged
 Boost signal called when observer's mode changed. More...
 
boost::signalslib::signal
< void(DtObserver *, int)> 
signal_linearScaledSpeedGainChanged
 Boost signal called when the scaled linear speed gain is changed. More...
 
boost::signalslib::signal
< void(DtObserver *, int)> 
signal_linearUnscaledSpeedGainChanged
 Boost signal called when the unscaled linear speed gain is changed. More...
 
boost::signalslib::signal
< void(DtObserver *, int)> 
signal_rotationSpeedGainChanged
 Boost signal called when the rotation speed gain is changed. More...
 
boost::signalslib::signal
< void(DtObserver *, int)> 
signal_orbitSpeedGainChanged
 Boost signal called when the orbit speed gain is changed. More...
 
boost::signalslib::signal
< void(DtObserver *, int)> 
signal_gainPrecisionChanged
 Boost signal called when the gain precision is changed. More...
 
boost::signalslib::signal
< void(DtObserver *, double)> 
signal_modelScaleFactorChanged
 Boost signal called when the model scale factor is changed. More...
 
boost::signalslib::signal
< void(DtObserver
*, std::string)> 
signal_modelScaleTypeChanged
 Boost signal called when the model scale type is changed. More...
 
boost::signalslib::signal
< void(DtObserver *, double)> 
signal_viewMagnificationChanged
 Boost signal called when the observer's view magnification is changed. More...
 
boost::signalslib::signal
< void(DtObserver *, double)> 
signal_lodScaleChanged
 Boost signal called when the observer's view magnification is changed. More...
 
boost::signalslib::signal
< void(DtObserver
*, std::string)> 
signal_paperMapLayerChanged
 Signal called when the observer's paper map layer is changed. More...
 
boost::signalslib::signal
< void(DtObserver
*, DtObserverObject::SpeedScalingMode
scalingMode)> 
signal_speedScalingModeChanged
 Signal emitted when an observer's speed scaling mode changes. More...
 
boost::signalslib::signal
< void(DtObserver *, double
offset)> 
signal_speedScalingMslModeOffsetChanged
 Signal emitted when an observer's speed scaling MSL mode offset changes. More...
 
boost::signalslib::signal
< void(DtObserver *, bool)> 
signal_lodScaleCenterEnabledChanged
 Boost signal called when the observer's lod scale center enabled is changed. More...
 
boost::signalslib::signal
< void(DtObserver *, double)> 
signal_lodScaleCenterMagMinLimitChanged
 Boost signal called when the observer's lod scale view magnification minimum is changed. More...
 
boost::signalslib::signal
< void(DtObserver
*, DtObserverObject::NorthType
northType)> 
signal_northTypeChanged
 Signal emitted when an observer's north type changed. More...
 
boost::signalslib::signal
< void(DtSensor *)> 
signal_sensorChanged
 Called when the observer changes which sensor it's using. More...
 
boost::signalslib::signal< void()> signal_terrainChanged
 Called when the observer sees a change in terrain which might require updates to observer settings. More...
 

Protected Member Functions

void slot_terrainCleared ()
 reset observer More...
 
void slot_oceanLayerAdded (const DtOceanLayer &)
 
void slot_oceanLayerDeleted (const std::string &)
 
void updateGlobalTerrainFlag (bool flag)
 
double calcLinearSpeed () const
 
double calcRotationSpeed () const
 
double calcOrbitSpeed () const
 
void setObserverOffsetVector (double x, double y, double z)
 
void setObserverRotationOffset (double x, double y, double z, double w)
 
void getDisplayNamesFromUniqueIds (const std::vector< DtUniqueID > &idsIn, std::set< std::string > &displayNamesOut) const
 
bool getUniqueIdsFromDisplayNames (const std::set< std::string > &displayNamesIn, std::vector< DtUniqueID > &idsOut) const
 
makArchives::DtObserverSettingsRecord::AttachType convertObserverAttachType (DtObserverObject::AttachType type) const
 
DtObserverObject::AttachType convertObserverSettingsAttachType (makArchives::DtObserverSettingsRecord::AttachType type) const
 
void connectToElementDataSignals ()
 
void disconnectFromElementDataSignals ()
 
void setModeSpecificObserverObjectData ()
 
virtual void slot_onElementsAdded (const DtElementData::ElementList &elements)
 Called by signal whenever elements are added. More...
 
virtual void slot_onElementAttributesChanged (const DtElementAttributeManager::EntryAttributesList &attributes)
 Called by signal whenever element attributes change. More...
 
void slot_completeAttachment ()
 preTick slot for completing an attachment for an element that changed last frame More...
 
void slot_observerModeModelSetChanged (int observerMode)
 
void slot_observerModeSensorChanged (int observerMode)
 
void slot_observerModeIs2DChanged (int observerMode)
 
void slot_observerModeKeyMapChanged (int observerMode)
 
void slot_observerModeGainPrecisionChanged (int observerMode)
 
void slot_observerModeOrbitSpeedGainChanged (int observerMode)
 
void slot_observerModeRotationSpeedGainChanged (int observerMode)
 
void slot_observerModeLinearScaledSpeedGainChanged (int observerMode)
 
void slot_observerModeLinearUnscaledSpeedGainChanged (int observerMode)
 
void slot_observerModeModelScaleFactorChanged (int observerMode)
 
void slot_observerModeModelScaleTypeChanged (int observerMode)
 
void slot_observerModeSpeedScalingModeChanged (int observerMode)
 
void slot_observerModeSpeedScalingMslModeOffsetChanged (int observerMode)
 
void slot_observerModeLodScaleCenterEnabledChanged (int observerMode)
 
void slot_observerModeLodScaleCenterMagMinLimitChanged (int observerMode)
 
void slot_observerModeNorthTypeChanged (int observerMode)
 
void slot_observerModeSettingChanged (int observerMode, int settingKey)
 
void slot_observerModeAdded (int observerMode)
 
void slot_channelModified (const DtChannelConfiguration &config)
 
void attachTo (bool afterTrue)
 Protected implementation of attach to. More...
 

Protected Attributes

DtDemyDe
 
DtSignalConnectionManager myConnections
 
DtObserverObjectAgent * myObserverObjectAgent
 
DtObserverConfigurationmyConfiguration
 
makArchives::DtObserverStateRecord myCachedObserverStateRecord
 This is used as a work-around to cache attachments for entities which have not yet been created. More...
 
int myObserverMode
 
bool myHideModelOnAttach
 
bool myAttachmentHas3DCockpit
 
DtObserverObject::AttachType myAttachType
 
std::vector< DtUniqueIDmyCurrentAttachments
 
std::vector< DtUniqueIDmySecondaryAttachments
 
DtUniqueID myLastSingleAttached
 
unsigned int myPartId
 
bool myOrientToTargetConstraint
 
bool myConstrainToCenter
 
bool myConnectedToElementDataSignals
 
bool myAllowReset
 
bool myAllowAttach
 
bool myAllowDetach
 
bool myHasInitialLocation
 
bool myFlashlightEnabled
 
double myViewMagnification
 
float myLodScale
 
DtSensormySensor
 
DtCameraShakemyCameraShake
 
bool myProjectionIs2D
 
std::string myPaperMapLayer
 

Static Protected Attributes

static const double theMoveStepSize
 

Detailed Description

A facade for a DtObserverObject.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtObserver::DtObserver ( DtDe de,
DtAgentManagerInterface sceneInterface,
const DtObserverConfiguration config 
)

CTOR.

virtual makVrv::DtObserver::~DtObserver ( )
virtual

DTOR.

Member Function Documentation

DtDe& makVrv::DtObserver::de ( )
inline

Get the observer's DtDe.

DtObserverObjectAgent& makVrv::DtObserver::agent ( )

Get the observer object agent.

const DtObserverObjectAgent& makVrv::DtObserver::agent ( ) const

Get the terrain patch object agent.

bool makVrv::DtObserver::getRecord ( makArchives::DtObserverStateRecord recOut) const

Returns true if recOut was filled with all the state of this object.

void makVrv::DtObserver::setFromRecord ( const makArchives::DtObserverStateRecord rec)

Fill out this object's state from the record.

bool makVrv::DtObserver::getRecord ( makArchives::DtObserverSettingsRecord recOut) const

Returns true if recOut was filled with all the setting of this object.

void makVrv::DtObserver::setFromRecord ( const makArchives::DtObserverSettingsRecord rec)

Fill out this object's settings from the record.

makArchives::DtObserverStateRecord makVrv::DtObserver::getCachedObserverStateRecord ( ) const

Get the original copy of the observer state record cached at creation time from myCachedObserverStateRecord.

Note that myCachedObserverStateRecord is temporary and this function will be removed in a future release.

bool makVrv::DtObserver::hasInitialLocation ( ) const

True if a setFromRecord results in a location set that should not be overriden by a subsequent reset (used in initialization only)

bool makVrv::DtObserver::projectionIs2D ( ) const

Get/set the projection type (2D or 3D) this observer will use Whether or not an observer uses a 2D or 3D view depends on the observer mode in use.

However, a saved view may reference an observer mode that doesn't exist; so we have a separate flag in the saved view (ObserverSettingsRecord portion of the ObserverStateRecord) where we keep this information available. On setFromRecord, this will be set the to projection specified by the observer mode if found, or use the value in the saved view if not. On getRecord, the field can use this value directly (since it already corresponds to the observer mode if it exists).

void makVrv::DtObserver::setProjectionIs2D ( bool  is2d)
const std::string& makVrv::DtObserver::name ( ) const

Get the configuration name.

void makVrv::DtObserver::setName ( const std::string &  name)
int makVrv::DtObserver::observerMode ( ) const

Visual mode for this observer.

The integer key corresponding to a named mode can be looked up by accessing the DtObserverMode by calling DtObserverModeManager::getObserverModeByName and then calling DtObserverMode::intKey on it. It is possible to set an observer mode int which corresponds to a sensor module that is not loaded (ex. CameraFX sensor mode when running Vantage in SensorFX mode), in that case setObserverMode will not change the observerMode and return false. If it can change to the mode it will return true.

bool makVrv::DtObserver::setObserverMode ( int  observerMode)
double makVrv::DtObserver::viewResolution ( ) const

Get the observer's resolution (2D).In meters per pixel.

void makVrv::DtObserver::setViewResolution ( double  resolution)

Set the observer's resolution (2D). In meters per pixel.

void makVrv::DtObserver::setViewResolutionFromHeightAboveTerrain ( double  hat)

Set the observer's resolution (2D). In meters per pixel.

double makVrv::DtObserver::viewMagnification ( ) const

Get this observer's view magnification.

void makVrv::DtObserver::setViewMagnification ( double  magnficationFactor)

Set this observer's view magnification.

void makVrv::DtObserver::setLodScale ( double  lodScale)

Set this observer's LOD Scale.

double makVrv::DtObserver::lodScale ( ) const

Get this observer's LOD scale.

void makVrv::DtObserver::setPaperMapLayer ( std::string  paperMapLayer)

Set the observer's paper map layer.

std::string makVrv::DtObserver::paperMapLayer ( ) const

Get this observer's paper map layer.

DtObserverConfiguration& makVrv::DtObserver::configuration ( )
const DtObserverConfiguration& makVrv::DtObserver::configuration ( ) const
bool makVrv::DtObserver::inUse ( const std::string &  channelKeyToIgnore = "") const

Returns true in this observer is found in any channel configuration.

void makVrv::DtObserver::attachToNextElement ( )

Tell the observer to attach to the next allowable object.

void makVrv::DtObserver::attachToPreviousElement ( )

Tell the observer to attach to the previous allowable object.

bool makVrv::DtObserver::isAttached ( DtElementID  ) const

Returns true if the element is attached as either a primary or secondary element.

bool makVrv::DtObserver::isPrimaryAttached ( DtElementID  ) const

Returns true if the object is attached as a primary object.

bool makVrv::DtObserver::isSecondaryAttached ( DtElementID  ) const

Returns true if the object is attached as a secondary object.

void makVrv::DtObserver::setPrimaryAttachment ( const ElementList elements)

Attach to the following elements.

If there are more than 1 element, the and the attach mode does not support multiple attachments the mode will change to AttachTypeTether

void makVrv::DtObserver::setPrimaryAttachment ( DtElementID  element)
void makVrv::DtObserver::setSecondaryAttachment ( const ElementList element)

Set secondary attachment to the following elements.

Secondary attachment is used by certain attach modes to allow tracking a secondary attachment (aka the observer orientation) while attached to a a primary attachment (aka the observer position)

void makVrv::DtObserver::setSecondaryAttachment ( DtElementID  element)
void makVrv::DtObserver::setLocationTrackAttachment ( double  x,
double  y,
double  z 
)

Set the location that will be tracked when in mimic location track or tether location track modes.

void makVrv::DtObserver::getLocationTrackAttachment ( double x,
double y,
double z 
) const

Get the location that will be tracked when in mimic location track or tether location track modes.

void makVrv::DtObserver::setPartAttachment ( int  partId)

Set the part number of the primary attachment.

Setting the partID to 0 attaches to the primary object rather than the part.

int makVrv::DtObserver::partAttachment ( ) const

Get the part ID that the observer is attached to.

void makVrv::DtObserver::detach ( )

Detach from all elements.

bool makVrv::DtObserver::attached ( ) const

Check if the observer is attached to elements.

bool makVrv::DtObserver::tracking ( ) const

Check if the observer is attached to elements.

const ElementList& makVrv::DtObserver::primaryAttachments ( ) const

Get the primary attachments.

const ElementList& makVrv::DtObserver::secondaryAttachments ( ) const

Get the secondary attachments.

void makVrv::DtObserver::setHideModelOnAttach ( bool  hide)
bool makVrv::DtObserver::hideModelOnAttach ( ) const
void makVrv::DtObserver::setAttachmentHas3DCockpit ( bool  cockpit)

The GL Studio driver uses this to tell the observer that it's going to render a 3D cockpit so the observer can take that into account when determining znear.

bool makVrv::DtObserver::attachmentHas3DCockpit ( ) const
void makVrv::DtObserver::setAttachType ( DtObserverObject::AttachType  type)
DtObserverObject::AttachType makVrv::DtObserver::attachType ( ) const
void makVrv::DtObserver::setOrientToTargetConstraint ( bool  orient)
bool makVrv::DtObserver::orientToTargetConstraint ( ) const
DtElementID makVrv::DtObserver::lastSingleAttached ( ) const

Last single id this observer attached to.

Only valid if haveLastSingleAttached() (below) is true

bool makVrv::DtObserver::haveLastSingleAttached ( ) const

Has this observer ever attached to a single entity?

void makVrv::DtObserver::reset ( )

If attached, call resetAttachment, else gotoTerrain center with first terrain patch in terrain patch list.

void makVrv::DtObserver::setAllowReset ( bool  b)

Sets whether or not resetting the observer is allowed.

Set to false in order to ignore resets and zeroing of terrain

bool makVrv::DtObserver::allowReset ( ) const

Get if reset is allowed.

void makVrv::DtObserver::setAllowAttach ( bool  b)

Sets whether or not attachment is allowed.

bool makVrv::DtObserver::allowAttach ( ) const

Get if attach is allowed.

void makVrv::DtObserver::setAllowDetach ( bool  b)

Sets whether or not detachment is allowed.

bool makVrv::DtObserver::allowDetach ( ) const

Get if detach is allowed.

void makVrv::DtObserver::centerOnTerrain ( )

rest and recenter.

void makVrv::DtObserver::centerOnTerrain ( const DtUniqueID terrainPatch)

reset and recenter to specified terrain patch

void makVrv::DtObserver::suppressConstrainToTerrain ( bool  trueFalse)

if constrain to terrain is on, suppress or end suppress if constrain to terrain is not on, do nothing

void makVrv::DtObserver::setConstrainToCenter ( bool  trueFalse)

constrain to point to center of earth (0.0.0)

void makVrv::DtObserver::toggleConstrainToCenter ( )
bool makVrv::DtObserver::constrainToCenter ( ) const
void makVrv::DtObserver::getLocation ( double x,
double y,
double z 
) const

Get the observer's position from the remote object (no observer camera offset)

DtVector makVrv::DtObserver::location ( ) const

Get the observer's position from the remote object (no observer camera offset)

DtVector makVrv::DtObserver::observerCameraPosition ( ) const

Get the position of the observer's camera.

void makVrv::DtObserver::setLocation ( double  x,
double  y,
double  z 
)

Go to this position (database coordinates)

void makVrv::DtObserver::getOrientation ( double psi,
double theta,
double phi 
) const

Get the observer's orientation from the local observer object.

void makVrv::DtObserver::getTopographicOrientation ( double psi,
double theta,
double phi 
) const

Get the observer's orientation from the local observer object in topo.

void makVrv::DtObserver::setOrientation ( double  psi,
double  theta,
double  phi 
)

Go to this orientation.

void makVrv::DtObserver::setTopographicOrientation ( double  psi,
double  theta,
double  phi 
)

Go to this topographic orientation.

void makVrv::DtObserver::getOrientation ( double x,
double y,
double z,
double w 
) const

Get the observer's orientation from the local observer object.

void makVrv::DtObserver::setOrientation ( double  x,
double  y,
double  z,
double  w 
)

Go to this orientation.

DtTaitBryan makVrv::DtObserver::observerCameraOrientation ( bool  includeShake = true) const

Get the orientation of the observer's camera.

Set includeShake to true if you want any camera shake to be included (the default), or false to exclude the shake

virtual DtVector makVrv::DtObserver::observerPlatformFront ( ) const
virtual

Get a vector representation of the observer's front axis; this is before the camera orientation is applied.

virtual DtVector makVrv::DtObserver::observerPlatformUp ( ) const
virtual

Get a vector representation of the observer's up axis; this is before the camera orientation is applied.

virtual DtVector makVrv::DtObserver::observerPlatformRight ( ) const
virtual

Get a vector representation of the observer's right axis; this is before the camera orientation is applied.

virtual DtVector makVrv::DtObserver::observerCameraFront ( bool  includeShake = true) const
virtual

Get a vector representation of the observer * camera front axis This is where the observer is actually looking.

Set includeShake to true if you want any camera shake to be included, or false to exclude the shake

virtual DtVector makVrv::DtObserver::observerCameraUp ( bool  includeShake = true) const
virtual

Get a vector representation of the observer * camera up axis.

virtual DtVector makVrv::DtObserver::observerCameraRight ( bool  includeShake = true) const
virtual

Get a vector representation of the observer * camera right axis.

void makVrv::DtObserver::moveUnit ( const DtVector direction)

Move the observer one arbitrary unit in some direction Direction is in observer coordinates.

void makVrv::DtObserver::rotateUnit ( const DtTaitBryan &  rotation)

Rotate the observer one arbitrary unit Rotation is in observer coordinates.

void makVrv::DtObserver::getLinearVelocity ( double x,
double y,
double z 
) const

Get the observer's linear velocity from the remote object.

DtVector makVrv::DtObserver::linearVelocity ( ) const
void makVrv::DtObserver::getRotationalVelocity ( double x,
double y,
double z 
) const

Get the observer's rotational velocity from the remote object.

DtVector makVrv::DtObserver::rotationalVelocity ( ) const
bool makVrv::DtObserver::observerObjectMoving ( ) const

Check to see if the observer object is moving.

double makVrv::DtObserver::observerAltitude ( ) const

Get the observer's current altitude.

void makVrv::DtObserver::setAttachedLocation ( double  x,
double  y,
double  z 
)

Go to this position relative to the attached object (if attached, otherwise ignored - also ignored in track attach mode)

void makVrv::DtObserver::setAttachedOrientation ( double  psi,
double  theta,
double  phi 
)

Go to this orientation relative to the attached object (if attached, otherwise ignored - also ignored in track attach mode)

void makVrv::DtObserver::setAttachedYaw ( double  psi)
void makVrv::DtObserver::setAttachedPitch ( double  theta)
void makVrv::DtObserver::setAttachedRoll ( double  phi)
void makVrv::DtObserver::setLocalModelScalingEnabled ( bool  enabled)

Sets whether local model scaling is enabled for attached entities in space attach mode.

void makVrv::DtObserver::setLocalModelScalingAmount ( float  amount)

Sets the amount of local model scaling to apply to attached entities when in space attach mode.

void makVrv::DtObserver::setOrbitSpeedGain ( int  gain,
bool  forwardToObserverModeManager = true 
)

Set the orbit speed gain.

int makVrv::DtObserver::orbitSpeedGain ( ) const

Get the orbit speed gain.

int makVrv::DtObserver::orbitSpeedGainFromSpeed ( double  speed) const

Calculate the gain for a given speed.

void makVrv::DtObserver::setRotationSpeedGain ( int  gain,
bool  forwardToObserverModeManager = true 
)
int makVrv::DtObserver::rotationSpeedGain ( ) const
void makVrv::DtObserver::setLinearSpeedGain ( int  gain)

Set scaled or unscaled gain based on current speed scaling state.

int makVrv::DtObserver::linearSpeedGain ( ) const
void makVrv::DtObserver::setLinearScaledSpeedGain ( int  gain,
bool  forwardToObserverModeManager = true 
)
int makVrv::DtObserver::linearScaledSpeedGain ( ) const
void makVrv::DtObserver::setLinearUnscaledSpeedGain ( int  gain,
bool  forwardToObserverModeManager = true 
)
int makVrv::DtObserver::linearUnscaledSpeedGain ( ) const
void makVrv::DtObserver::setGainPrecision ( int  amt,
bool  forwardToObserverModeManager = true 
)
int makVrv::DtObserver::gainPrecision ( ) const
void makVrv::DtObserver::setModelScaleFactor ( double  modelScaleFactor,
bool  forwardToObserverModeManager = true 
)
double makVrv::DtObserver::modelScaleFactor ( ) const
void makVrv::DtObserver::setModelScaleType ( const std::string &  modelScaleType,
bool  forwardToObserverModeManager = true 
)
const std::string& makVrv::DtObserver::modelScaleType ( ) const
void makVrv::DtObserver::setMaxModelScaleFactor ( double  maxModelScaleFactor,
bool  forwardToObserverModeManager = true 
)
double makVrv::DtObserver::maxModelScaleFactor ( ) const
void makVrv::DtObserver::setSpeedScalingMode ( DtObserverObject::SpeedScalingMode  mode,
bool  forwardToObserverModeManager = true 
)
DtObserverObject::SpeedScalingMode makVrv::DtObserver::speedScalingMode ( ) const
void makVrv::DtObserver::setLodScaleCenterEnabled ( bool  enabled,
bool  forwardToObserverModeManager = true 
)
bool makVrv::DtObserver::lodScaleCenterEnabled ( ) const
void makVrv::DtObserver::setLodScaleCenterMagMinLimit ( double  limit,
bool  forwardToObserverModeManager = true 
)
double makVrv::DtObserver::lodScaleCenterMagMinLimit ( ) const
void makVrv::DtObserver::setNorthType ( DtObserverObject::NorthType  northType,
bool  forwardToObserverModeManager = true 
)

Sets the current north type.

DtObserverObject::NorthType makVrv::DtObserver::northType ( ) const

Gets the current north type.

void makVrv::DtObserver::setSpeedScalingMslModeOffset ( double  offset,
bool  forwardToObserverModeManager = true 
)
double makVrv::DtObserver::speedScalingMslModeOffset ( ) const
void makVrv::DtObserver::setOrbitSpeed ( double  speed)
double makVrv::DtObserver::orbitSpeed ( ) const
void makVrv::DtObserver::setRotationSpeed ( double  speed)
double makVrv::DtObserver::rotationSpeed ( ) const
void makVrv::DtObserver::setLinearSpeed ( double  speed)
double makVrv::DtObserver::linearSpeed ( ) const
virtual void makVrv::DtObserver::toggleFlashlight ( )
virtual

Toggle the observer-attached flashlight on or off.

virtual DtCameraShake* makVrv::DtObserver::cameraShake ( )
virtual

Get the camera shake is on this observer.

virtual bool makVrv::DtObserver::setCameraShake ( const std::string &  shakeType)
virtual

Tell the observer what kind of camera shake to set.

virtual void makVrv::DtObserver::setCameraShakeRotation ( const DtQuat rotQuat) const
virtual

Provide a rotational offset to the camera for camera shake.

virtual void makVrv::DtObserver::setSensor ( const std::string &  sensorName)
virtual

Set the sensor to use on channels rendering with this observer.

virtual std::string makVrv::DtObserver::findSensor ( )
virtual

Get the name of the current sensor; returns "" if there is none.

virtual void makVrv::DtObserver::disableSensor ( )
virtual

Disables the current sensor.

virtual void makVrv::DtObserver::slot_sensorRemoved ( DtSensor sensor)
virtual

Called when a sensor is removed or deleted from the sensor manager.

virtual void makVrv::DtObserver::synchronize ( )
virtual
void makVrv::DtObserver::getObserverOffsetVector ( double x,
double y,
double z 
) const

Needed public for CIGI request position packets.

void makVrv::DtObserver::getObserverRotationOffset ( double x,
double y,
double z,
double w 
) const
void makVrv::DtObserver::getCameraFromParentOffsetVector ( double x,
double y,
double z 
) const

These are the difference between the observer's camera and the object that the observer is attached to.

void makVrv::DtObserver::getCameraFromParentRotationOffset ( double x,
double y,
double z,
double w 
) const
void makVrv::DtObserver::slot_terrainCleared ( )
protected

reset observer

void makVrv::DtObserver::slot_oceanLayerAdded ( const DtOceanLayer )
protected
void makVrv::DtObserver::slot_oceanLayerDeleted ( const std::string &  )
protected
void makVrv::DtObserver::updateGlobalTerrainFlag ( bool  flag)
protected
double makVrv::DtObserver::calcLinearSpeed ( ) const
protected
double makVrv::DtObserver::calcRotationSpeed ( ) const
protected
double makVrv::DtObserver::calcOrbitSpeed ( ) const
protected
void makVrv::DtObserver::setObserverOffsetVector ( double  x,
double  y,
double  z 
)
protected
void makVrv::DtObserver::setObserverRotationOffset ( double  x,
double  y,
double  z,
double  w 
)
protected
void makVrv::DtObserver::getDisplayNamesFromUniqueIds ( const std::vector< DtUniqueID > &  idsIn,
std::set< std::string > &  displayNamesOut 
) const
protected
bool makVrv::DtObserver::getUniqueIdsFromDisplayNames ( const std::set< std::string > &  displayNamesIn,
std::vector< DtUniqueID > &  idsOut 
) const
protected
makArchives::DtObserverSettingsRecord::AttachType makVrv::DtObserver::convertObserverAttachType ( DtObserverObject::AttachType  type) const
protected
DtObserverObject::AttachType makVrv::DtObserver::convertObserverSettingsAttachType ( makArchives::DtObserverSettingsRecord::AttachType  type) const
protected
void makVrv::DtObserver::connectToElementDataSignals ( )
protected
void makVrv::DtObserver::disconnectFromElementDataSignals ( )
protected
void makVrv::DtObserver::setModeSpecificObserverObjectData ( )
protected
virtual void makVrv::DtObserver::slot_onElementsAdded ( const DtElementData::ElementList elements)
protectedvirtual

Called by signal whenever elements are added.

virtual void makVrv::DtObserver::slot_onElementAttributesChanged ( const DtElementAttributeManager::EntryAttributesList attributes)
protectedvirtual

Called by signal whenever element attributes change.

void makVrv::DtObserver::slot_completeAttachment ( )
protected

preTick slot for completing an attachment for an element that changed last frame

void makVrv::DtObserver::slot_observerModeModelSetChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeSensorChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeIs2DChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeKeyMapChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeGainPrecisionChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeOrbitSpeedGainChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeRotationSpeedGainChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeLinearScaledSpeedGainChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeLinearUnscaledSpeedGainChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeModelScaleFactorChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeModelScaleTypeChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeSpeedScalingModeChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeSpeedScalingMslModeOffsetChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeLodScaleCenterEnabledChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeLodScaleCenterMagMinLimitChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeNorthTypeChanged ( int  observerMode)
protected
void makVrv::DtObserver::slot_observerModeSettingChanged ( int  observerMode,
int  settingKey 
)
protected
void makVrv::DtObserver::slot_observerModeAdded ( int  observerMode)
protected
void makVrv::DtObserver::slot_channelModified ( const DtChannelConfiguration config)
protected
void makVrv::DtObserver::attachTo ( bool  afterTrue)
protected

Protected implementation of attach to.

Member Data Documentation

boost::signalslib::signal<void(const std::string&, DtUniqueID)> makVrv::DtObserver::signal_objectAttached

Boost signal called when observer attaches to an object.

boost::signalslib::signal<void(const std::string&)> makVrv::DtObserver::signal_objectsDetached

Boost signal called when observer detaches from all.

boost::signalslib::signal<void(DtObserver*, int)> makVrv::DtObserver::signal_observerModeChanged

Boost signal called when observer's mode changed.

boost::signalslib::signal<void(DtObserver*, int)> makVrv::DtObserver::signal_linearScaledSpeedGainChanged

Boost signal called when the scaled linear speed gain is changed.

boost::signalslib::signal<void(DtObserver*, int)> makVrv::DtObserver::signal_linearUnscaledSpeedGainChanged

Boost signal called when the unscaled linear speed gain is changed.

boost::signalslib::signal<void(DtObserver*, int)> makVrv::DtObserver::signal_rotationSpeedGainChanged

Boost signal called when the rotation speed gain is changed.

boost::signalslib::signal<void(DtObserver*, int)> makVrv::DtObserver::signal_orbitSpeedGainChanged

Boost signal called when the orbit speed gain is changed.

boost::signalslib::signal<void(DtObserver*, int)> makVrv::DtObserver::signal_gainPrecisionChanged

Boost signal called when the gain precision is changed.

boost::signalslib::signal<void(DtObserver*, double)> makVrv::DtObserver::signal_modelScaleFactorChanged

Boost signal called when the model scale factor is changed.

boost::signalslib::signal<void(DtObserver*, std::string)> makVrv::DtObserver::signal_modelScaleTypeChanged

Boost signal called when the model scale type is changed.

boost::signalslib::signal<void(DtObserver*, double)> makVrv::DtObserver::signal_viewMagnificationChanged

Boost signal called when the observer's view magnification is changed.

boost::signalslib::signal<void(DtObserver*, double)> makVrv::DtObserver::signal_lodScaleChanged

Boost signal called when the observer's view magnification is changed.

boost::signalslib::signal<void(DtObserver*, std::string)> makVrv::DtObserver::signal_paperMapLayerChanged

Signal called when the observer's paper map layer is changed.

boost::signalslib::signal<void (DtObserver*, DtObserverObject::SpeedScalingMode scalingMode)> makVrv::DtObserver::signal_speedScalingModeChanged

Signal emitted when an observer's speed scaling mode changes.

boost::signalslib::signal<void (DtObserver*, double offset)> makVrv::DtObserver::signal_speedScalingMslModeOffsetChanged

Signal emitted when an observer's speed scaling MSL mode offset changes.

boost::signalslib::signal<void(DtObserver*, bool)> makVrv::DtObserver::signal_lodScaleCenterEnabledChanged

Boost signal called when the observer's lod scale center enabled is changed.

boost::signalslib::signal<void(DtObserver*, double)> makVrv::DtObserver::signal_lodScaleCenterMagMinLimitChanged

Boost signal called when the observer's lod scale view magnification minimum is changed.

boost::signalslib::signal<void(DtObserver*, DtObserverObject::NorthType northType)> makVrv::DtObserver::signal_northTypeChanged

Signal emitted when an observer's north type changed.

boost::signalslib::signal<void (DtSensor*)> makVrv::DtObserver::signal_sensorChanged

Called when the observer changes which sensor it's using.

Passes 0 when its sensor is disabled

boost::signalslib::signal<void ()> makVrv::DtObserver::signal_terrainChanged

Called when the observer sees a change in terrain which might require updates to observer settings.

const double makVrv::DtObserver::theMoveStepSize
staticprotected
DtDe& makVrv::DtObserver::myDe
protected
DtSignalConnectionManager makVrv::DtObserver::myConnections
protected
DtObserverObjectAgent* makVrv::DtObserver::myObserverObjectAgent
protected
DtObserverConfiguration* makVrv::DtObserver::myConfiguration
protected
makArchives::DtObserverStateRecord makVrv::DtObserver::myCachedObserverStateRecord
protected

This is used as a work-around to cache attachments for entities which have not yet been created.

It will eventually be removed and therefore should not be used.

int makVrv::DtObserver::myObserverMode
protected
bool makVrv::DtObserver::myHideModelOnAttach
protected
bool makVrv::DtObserver::myAttachmentHas3DCockpit
protected
DtObserverObject::AttachType makVrv::DtObserver::myAttachType
protected
std::vector<DtUniqueID> makVrv::DtObserver::myCurrentAttachments
protected
std::vector<DtUniqueID> makVrv::DtObserver::mySecondaryAttachments
protected
DtUniqueID makVrv::DtObserver::myLastSingleAttached
protected
unsigned int makVrv::DtObserver::myPartId
protected
bool makVrv::DtObserver::myOrientToTargetConstraint
protected
bool makVrv::DtObserver::myConstrainToCenter
protected
bool makVrv::DtObserver::myConnectedToElementDataSignals
protected
bool makVrv::DtObserver::myAllowReset
protected
bool makVrv::DtObserver::myAllowAttach
protected
bool makVrv::DtObserver::myAllowDetach
protected
bool makVrv::DtObserver::myHasInitialLocation
protected
bool makVrv::DtObserver::myFlashlightEnabled
protected
double makVrv::DtObserver::myViewMagnification
protected
float makVrv::DtObserver::myLodScale
protected
DtSensor* makVrv::DtObserver::mySensor
protected
DtCameraShake* makVrv::DtObserver::myCameraShake
protected
bool makVrv::DtObserver::myProjectionIs2D
protected
std::string makVrv::DtObserver::myPaperMapLayer
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)