VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrf::DtVrfOsgObserverObject Class Reference
Inheritance diagram for makVrf::DtVrfOsgObserverObject:
Inheritance graph
[legend]

Public Member Functions

 DtVrfOsgObserverObject (makVrv::DtDe &de, makVrv::DtUniqueID id, const std::string &name="")
virtual ~DtVrfOsgObserverObject ()
virtual void tick (double simTime)
 Update the observer object, calculates position of by sim Time.
- Public Member Functions inherited from makVrv::DtOsgObserverObject
 DtOsgObserverObject (DtDe &de, DtUniqueID id, const std::string &name="")
 CTOR.
virtual ~DtOsgObserverObject ()
 DTOR.
virtual void tickAttachment ()
 Update the observer per its attachments.
virtual void setModelSet (int modelSet)
 Set the model set for this observer.
virtual double altitude () const
 Get the observer's altitude.
virtual void setNameAndRegister (const std::string &name)
 Set the observer object name Set the observer object name, and register this observer object with the observer object manager.
virtual void getCameraPositionAndOrientation (osg::Vec3d &position, osg::Quat &rotation) const
virtual void rotateLevelYawLeft (double rads)
 yaw left (level observer coordinates) yaw left movement (rotate left about the level observer-Z axis)
virtual void rotateLevelYawRight (double rads)
 yaw right (level observer coordinates) yaw right movement (rotate right about the level observer-Z axis) axis)
virtual void startLookLeft ()
 Camera Control.
virtual void stopLookLeft ()
 Camera Control.
virtual void lookLeft (double rads)
 Camera Control.
virtual void startLookRight ()
 rotate camera right (observer coordinates) Look right, wrt the observer
virtual void stopLookRight ()
 rotate camera right (observer coordinates) Look right, wrt the observer
virtual void lookRight (double rads)
 rotate camera right (observer coordinates) Look right, wrt the observer
virtual void startLookUp ()
 rotate camera up (observer coordinates) Look up, wrt the observer
virtual void stopLookUp ()
 rotate camera up (observer coordinates) Look up, wrt the observer
virtual void lookUp (double rads)
 rotate camera up (observer coordinates) Look up, wrt the observer
virtual void startLookDown ()
 rotate camera down (observer coordinates) Look down, wrt the observer
virtual void stopLookDown ()
 rotate camera down (observer coordinates) Look down, wrt the observer
virtual void lookDown (double rads)
 rotate camera down (observer coordinates) Look down, wrt the observer
virtual void startLookTiltRight ()
 roll the camera right (observer coordinates) Roll look right, wrt the observer
virtual void stopLookTiltRight ()
 roll the camera right (observer coordinates) Roll look right, wrt the observer
virtual void lookTiltRight (double rads)
 roll the camera right (observer coordinates) Roll look right, wrt the observer
virtual void startLookTiltLeft ()
 roll the camera left (observer coordinates) Roll look left, wrt the observer
virtual void stopLookTiltLeft ()
 roll the camera left (observer coordinates) Roll look left, wrt the observer
virtual void lookTiltLeft (double rads)
 roll the camera left (observer coordinates) Roll look left, wrt the observer
virtual void setLocation (double x, double y, double z)
 jump to x, y, z
virtual void setAttachedLocation (double x, double y, double z)
 jump to x, y, z in attached entity coords.
virtual void setOrientation (double psi, double theta, double phi)
 turn to psi, theta, phi
virtual void setOrientation (double x, double y, double z, double w)
 turn to quat(x,y,z,w)
virtual void setAttachedOrientation (double psi, double theta, double phi)
 turn to psi, theta, phi in attached entity coords
virtual void setAttachedOrientation (double x, double y, double z, double w)
 turn to quat(x,y,z,w) in attached entity coords
void setLocalModelScalingEnabled (bool enabled)
 Sets whether local model scaling is enabled for attached entities in space attach mode.
void setLocalModelScalingAmount (float amount)
 Sets the amount of local model scaling to apply to attached entities when in space attach mode.
virtual void jumpTo (double x, double y, double z)
 jump to x, y, z and then the observer is 'backed off' the location
virtual void jumpTo (DtUniqueID elementID)
 jump to object specfied by ID
virtual void orientTo (double x, double y, double z)
virtual void dragTerrain (double lastX, double lastY, double lastZ, double currX, double currY, double currZ)
 drag the database point 'last' to the point 'curr'
virtual void dragTerrain2 (double myStartDragX, double myStartDragY, double myStartDragZ, int deltaMouseX, int deltaMouseY)
virtual void dragGravityUp (double windowUnits)
virtual void dragGravityDown (double windowUnits)
virtual void dragGravityLeft (double windowUnits)
virtual void dragGravityRight (double windowUnits)
virtual void scrollObserverForward (int wheelUnits)
virtual void scrollObserverBack (int wheelUnits)
virtual void scrollLevelObserverForward (int wheelUnits)
virtual void scrollLevelObserverBack (int wheelUnits)
virtual void startIncreasingViewResolution ()
 Zoom handling. Works in 2D view mode only.
virtual void stopIncreasingViewResolution ()
 Sets level of zoom (where 1 is default level, < 1 is zoom out > 1 is zoom in)
virtual void increaseViewResolution ()
 Sets level of zoom (where 1 is default level, < 1 is zoom out > 1 is zoom in)
virtual void startDecreasingViewResolution ()
 Sets level of zoom (where 1 is default level, < 1 is zoom out > 1 is zoom in)
virtual void stopDecreasingViewResolution ()
 Sets level of zoom (where 1 is default level, < 1 is zoom out > 1 is zoom in)
virtual void decreaseViewResolution ()
 Sets level of zoom (where 1 is default level, < 1 is zoom out > 1 is zoom in)
virtual void setViewResolution (double resolution)
 Sets level of zoom (where 1 is default level, < 1 is zoom out > 1 is zoom in)
virtual double viewResolution () const
 Zoom factor. Used to scale terrain and objects.
virtual void setViewMagnification (double mag)
 Set the observer's current view magnification.
virtual double viewMagnification () const
 Get the observer's current view magnification.
virtual void setOrbitSpeed (double speed)
 Speed mutators.
virtual void setLinearSpeed (double speed)
 Set the speed used for forward/backleft/right/up/down movement (observer and camera)
virtual void setRotationSpeed (double speed)
 Set the speed used for rotation (observer and camera)
virtual void setMinLinearSpeed (double minSpeed)
 Set the minimum linear speed (used for speed scaling)
virtual void setLinearScaledSpeedGain (double gain)
 Set the linear gain as a % of max gain (precision)
virtual void gotoTerrainCenter (DtUniqueID terrainPatch, bool retry)
 Go to the terrain patch's center Go to the center of the specified terrain path, offset by the scene offsets specified in the observer's configuration.
virtual void resetAttachment ()
 reset orientation and position offsets
virtual void resetOrientation ()
 Reset observer and camera orientation Set observer orientation to North and level, and set the camera aligned with the observer.
virtual void resetCamera ()
 set camera to face the same direction as the observer
virtual void level ()
 Make the observer level Set the observer's pitch and roll angles normal to the gravity vector.
virtual void stopAll ()
 Stop all current motion.
virtual void attachToObjects (const std::vector< DtUniqueID > &elementIds)
virtual void setSecondaryAttachment (const std::vector< DtUniqueID > &elementIds)
virtual void attachToPart (int partId)
virtual void detach ()
virtual void setAttachType (DtObserverObject::AttachType type)
virtual void setHideModelOnAttach (bool hide)
virtual void scaleCurrentAttachments (bool scaled)
virtual void setOrientToTargetConstraint (bool orient)
virtual void setOrbiting (bool orbit)
virtual void setOrientCameraToTargetConstraint (bool orient)
virtual void setConstrainToTerrain (bool trueFalse)
 constrain by terrain
virtual void setConstrainToCenter (bool trueFalse)
virtual void suppressConstrainToTerrain (bool trueFalse)
 if constrain to terrain is on, suppress or end suppress if constrain to terrain is not on, do nothing
virtual void setSpeedScaling (bool trueFalse)
 scale speed based on distance from object of interest
virtual void setSpeedScaledSpeed (double speed)
 Used for reset when there is no terrain.
virtual void getLocation (double &x, double &y, double &z) const
virtual void getOrientation (double &psi, double &theta, double &phi) const
virtual void getOrientation (double &x, double &y, double &z, double &w) const
virtual double fixed2DAltitude ()
 For 2D display mode, calculates the altitude to use to set camera position Note that if the terrain is global, this is the distance from 0,0,0, so the earth radius needs to be subtracted from it.
virtual double heightAboveTerrainFromCurrentZoom ()
 calculate an (approximate) height above terrain that will correspond, when in 3D, to the same perceived HAT when in 2D
virtual double topographicHeading () const
 Get the observer's topographic heading, regardless of coordinate system currently in use.
virtual void getLinearVelocity (double &x, double &y, double &z) const
 Get the observer's linear velocity.
virtual void getRotationalVelocity (double &x, double &y, double &z) const
 Get the observer's rotational velocity.
virtual void setModeSetting (int setting, bool value)
 Override base class; since a mode setting may require attention during tick, this calls down to DtObserverObject::setModeSetting() and then sets myChanged to true.
virtual std::vector< DtUniqueIDcurrentAttachments () const
 Return a vector of element ids that this observer is currently attached to.
virtual
DtObserverObject::AttachType 
attachType3D () const
 Returns the current 3D attach type (if not attached, this is the attach type that will be used by default the next time the observer does attach.
virtual
DtObserverObject::AttachType 
attachType2D () const
 Returns the current 3D attach type (if not attached, this is the attach type that will be used by default the next time the observer does attach.
virtual bool attachedObjectHidden () const
 Returns whether objects are hidden on attach.
virtual osg::Vec3d attachedOffsetVector () const
 When attached, returns the vector from the observer to the (first) attached-to object.
virtual double attachedNearClipOffset () const
 When attached, returns the bounding volume radius plus any center offset of the (first) attached-to object for use in calculating the largest near clip distance that won't cut off the entity.
virtual double heightAboveTerrain () const
 Get the cached height above terrain.
virtual void startMoveObserverRight ()
 Observer Control.
virtual void stopMoveObserverRight ()
 Observer Control.
virtual void moveObserverRight (double meters)
 Observer Control.
virtual void startMoveObserverForward ()
 move forward (body coordinates) Observer forward movement (along the positive body Y-axis)
virtual void stopMoveObserverForward ()
 Observer Control.
virtual void moveObserverForward (double meters)
 Observer Control.
virtual void startMoveObserverUp ()
 move up (body coordinates) Observer up movement (along the positive body Z-axis)
virtual void stopMoveObserverUp ()
 move up (body coordinates) Observer up movement (along the positive body Z-axis)
virtual void moveObserverUp (double meters)
 move up (body coordinates) Observer up movement (along the positive body Z-axis)
virtual void startMoveObserverLeft ()
 move left (body coordinates) Observer left movement (along the negative body X-axis)
virtual void stopMoveObserverLeft ()
 move left (body coordinates) Observer left movement (along the negative body X-axis)
virtual void moveObserverLeft (double meters)
 move left (body coordinates) Observer left movement (along the negative body X-axis)
virtual void startMoveObserverBack ()
 move back (body coordinates) Observer back movement (along the negative body Y-axis)
virtual void stopMoveObserverBack ()
 move back (body coordinates) Observer back movement (along the negative body Y-axis)
virtual void moveObserverBack (double meters)
 move back (body coordinates) Observer back movement (along the negative body Y-axis)
virtual void startMoveObserverDown ()
 move down (body coordinates) Observer down movement (along the negative body Z-axis)
virtual void stopMoveObserverDown ()
 move down (body coordinates) Observer down movement (along the negative body Z-axis)
virtual void moveObserverDown (double meters)
 move down (body coordinates) Observer down movement (along the negative body Z-axis)
virtual void startMoveLevelObserverRight ()
 move right ('gravity' coordinates) gravity right movement (to the right of the current heading vector, projected onto the plane normal to gravity)
virtual void stopMoveLevelObserverRight ()
 move right ('gravity' coordinates) gravity right movement (to the right of the current heading vector, projected onto the plane normal to gravity)
virtual void moveLevelObserverRight (double meters)
 move right ('gravity' coordinates) gravity right movement (to the right of the current heading vector, projected onto the plane normal to gravity)
virtual void startMoveLevelObserverForward ()
 move forward ('gravity' coordinates) gravity forward movement (in the direction of the current heading vector, projected onto the plane normal to gravity)
virtual void stopMoveLevelObserverForward ()
 move forward ('gravity' coordinates) gravity forward movement (in the direction of the current heading vector, projected onto the plane normal to gravity)
virtual void moveLevelObserverForward (double meters)
 move forward ('gravity' coordinates) gravity forward movement (in the direction of the current heading vector, projected onto the plane normal to gravity)
virtual void startMoveLevelObserverUp ()
 move up ('gravity' coordinates) gravity up movement (in the opposite direction of the gravity vector)
virtual void stopMoveLevelObserverUp ()
 move up ('gravity' coordinates) gravity up movement (in the opposite direction of the gravity vector)
virtual void moveLevelObserverUp (double meters)
 move up ('gravity' coordinates) gravity up movement (in the opposite direction of the gravity vector)
virtual void startMoveLevelObserverLeft ()
 move left ('gravity' coordinates) gravity left movement (to the left of the current heading vector, projected onto the plane normal to gravity)
virtual void stopMoveLevelObserverLeft ()
 move left ('gravity' coordinates) gravity left movement (to the left of the current heading vector, projected onto the plane normal to gravity)
virtual void moveLevelObserverLeft (double meters)
 move left ('gravity' coordinates) gravity left movement (to the left of the current heading vector, projected onto the plane normal to gravity)
virtual void startMoveLevelObserverBack ()
 move back ('gravity' coordinates) gravity back movement (in the opposite direction of the current heading vector, projected onto the plane normal to gravity)
virtual void stopMoveLevelObserverBack ()
 move back ('gravity' coordinates) gravity back movement (in the opposite direction of the current heading vector, projected onto the plane normal to gravity)
virtual void moveLevelObserverBack (double meters)
 move back ('gravity' coordinates) gravity back movement (in the opposite direction of the current heading vector, projected onto the plane normal to gravity)
virtual void startMoveLevelObserverDown ()
 move down ('gravity' coordinates) gravity down movement (in the direction of the gravity vector)
virtual void stopMoveLevelObserverDown ()
 move down ('gravity' coordinates) gravity down movement (in the direction of the gravity vector)
virtual void moveLevelObserverDown (double meters)
 move down ('gravity' coordinates) gravity down movement (in the direction of the gravity vector)
virtual void startMoveAttachedRight ()
 move right (body coordinates) Attached right movement (along the positive body X-axis)
virtual void stopMoveAttachedRight ()
 move right (body coordinates) Attached right movement (along the positive body X-axis)
virtual void moveAttachedRight (double meters)
 move right (body coordinates) Attached right movement (along the positive body X-axis)
virtual void startMoveAttachedForward ()
 move forward (body coordinates) Attached forward movement (along the positive body Y-axis)
virtual void stopMoveAttachedForward ()
 move right (body coordinates) Attached right movement (along the positive body X-axis)
virtual void moveAttachedForward (double meters)
 move right (body coordinates) Attached right movement (along the positive body X-axis)
virtual void startMoveAttachedUp ()
 move up (body coordinates) Attached up movement (along the positive body Z-axis)
virtual void stopMoveAttachedUp ()
 move up (body coordinates) Attached up movement (along the positive body Z-axis)
virtual void moveAttachedUp (double meters)
 move up (body coordinates) Attached up movement (along the positive body Z-axis)
virtual void startMoveAttachedLeft ()
 move left (body coordinates) Attached left movement (along the negative body X-axis)
virtual void stopMoveAttachedLeft ()
 move left (body coordinates) Attached left movement (along the negative body X-axis)
virtual void moveAttachedLeft (double meters)
 move left (body coordinates) Attached left movement (along the negative body X-axis)
virtual void startMoveAttachedBack ()
 move back (body coordinates) Attached back movement (along the negative body Y-axis)
virtual void stopMoveAttachedBack ()
 move back (body coordinates) Attached back movement (along the negative body Y-axis)
virtual void moveAttachedBack (double meters)
 move back (body coordinates) Attached back movement (along the negative body Y-axis)
virtual void startMoveAttachedDown ()
 move down (body coordinates) Attached down movement (along the negative body Z-axis)
virtual void stopMoveAttachedDown ()
 move down (body coordinates) Attached down movement (along the negative body Z-axis)
virtual void moveAttachedDown (double meters)
 move down (body coordinates) Attached down movement (along the negative body Z-axis)
virtual void startMoveLevelAttachedRight ()
 move right ('gravity' coordinates) gravity right movement (to the right of the current heading vector, projected onto the plane normal to gravity)
virtual void stopMoveLevelAttachedRight ()
 move right ('gravity' coordinates) gravity right movement (to the right of the current heading vector, projected onto the plane normal to gravity)
virtual void moveLevelAttachedRight (double meters)
 move right ('gravity' coordinates) gravity right movement (to the right of the current heading vector, projected onto the plane normal to gravity)
virtual void startMoveLevelAttachedForward ()
 move forward ('gravity' coordinates) gravity forward movement (in the direction of the current heading vector, projected onto the plane normal to gravity)
virtual void stopMoveLevelAttachedForward ()
 move forward ('gravity' coordinates) gravity forward movement (in the direction of the current heading vector, projected onto the plane normal to gravity)
virtual void moveLevelAttachedForward (double meters)
 move forward ('gravity' coordinates) gravity forward movement (in the direction of the current heading vector, projected onto the plane normal to gravity)
virtual void startMoveLevelAttachedUp ()
 move up ('gravity' coordinates) gravity up movement (in the opposite direction of the gravity vector)
virtual void stopMoveLevelAttachedUp ()
 move up ('gravity' coordinates) gravity up movement (in the opposite direction of the gravity vector)
virtual void moveLevelAttachedUp (double meters)
 move up ('gravity' coordinates) gravity up movement (in the opposite direction of the gravity vector)
virtual void startMoveLevelAttachedLeft ()
 move left ('gravity' coordinates) gravity left movement (to the left of the current heading vector, projected onto the plane normal to gravity)
virtual void stopMoveLevelAttachedLeft ()
 move left ('gravity' coordinates) gravity left movement (to the left of the current heading vector, projected onto the plane normal to gravity)
virtual void moveLevelAttachedLeft (double meters)
 move left ('gravity' coordinates) gravity left movement (to the left of the current heading vector, projected onto the plane normal to gravity)
virtual void startMoveLevelAttachedBack ()
 move back ('gravity' coordinates) gravity back movement (in the opposite direction of the current heading vector, projected onto the plane normal to gravity)
virtual void stopMoveLevelAttachedBack ()
 move back ('gravity' coordinates) gravity back movement (in the opposite direction of the current heading vector, projected onto the plane normal to gravity)
virtual void moveLevelAttachedBack (double meters)
 move back ('gravity' coordinates) gravity back movement (in the opposite direction of the current heading vector, projected onto the plane normal to gravity)
virtual void startMoveLevelAttachedDown ()
 move down ('gravity' coordinates) gravity down movement (in the direction of the gravity vector)
virtual void stopMoveLevelAttachedDown ()
 move down ('gravity' coordinates) gravity down movement (in the direction of the gravity vector)
virtual void moveLevelAttachedDown (double meters)
 move down ('gravity' coordinates) gravity down movement (in the direction of the gravity vector)
virtual void startMoveAttachedContextRight ()
 move right ('attached' coordinates) attached right movement (depends on attach mode)
virtual void stopMoveAttachedContextRight ()
 move right ('attached' coordinates) attached right movement (depends on attach mode)
virtual void moveAttachedContextRight (double meters)
 move right ('attached' coordinates) attached right movement (depends on attach mode)
virtual void startMoveAttachedContextForward ()
 move forward ('attached' coordinates) attached forward movement (depends on attach mode)
virtual void stopMoveAttachedContextForward ()
 move forward ('attached' coordinates) attached forward movement (depends on attach mode)
virtual void moveAttachedContextForward (double meters)
 move forward ('attached' coordinates) attached forward movement (depends on attach mode)
virtual void startMoveAttachedContextUp ()
 move up ('attached' coordinates) attached up movement (depends on attach mode)
virtual void stopMoveAttachedContextUp ()
 move up ('attached' coordinates) attached up movement (depends on attach mode)
virtual void moveAttachedContextUp (double meters)
 move up ('attached' coordinates) attached up movement (depends on attach mode)
virtual void startMoveAttachedContextLeft ()
 move left ('attached' coordinates) attached left movement (depends on attach mode)
virtual void stopMoveAttachedContextLeft ()
 move left ('attached' coordinates) attached left movement (depends on attach mode)
virtual void moveAttachedContextLeft (double meters)
 move left ('attached' coordinates) attached left movement (depends on attach mode)
virtual void startMoveAttachedContextBack ()
 move back ('attached' coordinates) attached back movement (depends on attach mode)
virtual void stopMoveAttachedContextBack ()
 move back ('attached' coordinates) attached back movement (depends on attach mode)
virtual void moveAttachedContextBack (double meters)
 move back ('attached' coordinates) attached back movement (depends on attach mode)
virtual void startMoveAttachedContextDown ()
 move down (depends on attach mode)
virtual void stopMoveAttachedContextDown ()
 move down (depends on attach mode)
virtual void moveAttachedContextDown (double meters)
 move down (depends on attach mode)
virtual void startYawLeft ()
 yaw left (observer coordinates) yaw left movement (rotate left about the observer-Z axis)
virtual void stopYawLeft ()
 yaw left (observer coordinates) yaw left movement (rotate left about the observer-Z axis)
virtual void startYawRight ()
 yaw right (observer coordinates) yaw right movement (rotate right about the observer-Z axis) axis)
virtual void stopYawRight ()
 yaw right (observer coordinates) yaw right movement (rotate right about the observer-Z axis) axis)
virtual void startPitchUp ()
 pitch up (observer coordinates) pitch up movement (rotate up around the current observer X-axis)
virtual void stopPitchUp ()
 pitch up (observer coordinates) pitch up movement (rotate up around the current observer X-axis)
virtual void rotatePitchUp (double rads)
 pitch up (observer coordinates) pitch up movement (rotate up around the current observer X-axis)
virtual void startPitchDown ()
 pitch down (observer coordinates) pitch down movement (rotate down around the current observer X-axis)
virtual void stopPitchDown ()
 pitch down (observer coordinates) pitch down movement (rotate down around the current observer X-axis)
virtual void rotatePitchDown (double rads)
 pitch down (observer coordinates) pitch down movement (rotate down around the current observer X-axis)
virtual void startRollLeft ()
 roll left (observer coordinates) roll left movement (rotate left around the current observer Y-axis)
virtual void stopRollLeft ()
 roll left (observer coordinates) roll left movement (rotate left around the current observer Y-axis)
virtual void startRollRight ()
 roll right (observer coordinates) roll right movement (rotate right around the current observer Y-axis)
virtual void stopRollRight ()
 roll right (observer coordinates) roll right movement (rotate right around the current observer Y-axis)
virtual void startLevelYawLeft ()
 yaw left (level observer coordinates) yaw left movement (rotate left about the level observer-Z axis)
virtual void stopLevelYawLeft ()
 yaw left (level observer coordinates) yaw left movement (rotate left about the level observer-Z axis)
virtual void startLevelYawRight ()
 yaw right (level observer coordinates) yaw right movement (rotate right about the level observer-Z axis) axis)
virtual void stopLevelYawRight ()
 yaw right (level observer coordinates) yaw right movement (rotate right about the level observer-Z axis) axis)
virtual void startLevelPitchUp ()
 pitch up (level observer coordinates) pitch up movement (rotate up around the current level observer X-axis)
virtual void stopLevelPitchUp ()
 pitch up (level observer coordinates) pitch up movement (rotate up around the current level observer X-axis)
virtual void startLevelPitchDown ()
 pitch down (level observer coordinates) pitch down movement (rotate down around the current level observer X-axis)
virtual void stopLevelPitchDown ()
 pitch down (level observer coordinates) pitch down movement (rotate down around the current level observer X-axis)
virtual void startLevelRollLeft ()
 roll left (level observer coordinates) roll left movement (rotate left around the current level observer Y-axis)
virtual void stopLevelRollLeft ()
 roll left (level observer coordinates) roll left movement (rotate left around the current level observer Y-axis)
virtual void startLevelRollRight ()
 roll right (level observer coordinates) roll right movement (rotate right around the current level observer Y-axis)
virtual void stopLevelRollRight ()
 roll right (level observer coordinates) roll right movement (rotate right around the current level observer Y-axis)
virtual void startOrbitingLeft ()
 orbit around current target left (observer coordinates) Orbit left, wrt the current target
virtual void stopOrbitingLeft ()
 orbit around current target left (observer coordinates) Orbit left, wrt the current target
virtual void orbitLeft (double rads)
 orbit around current target left (observer coordinates) Orbit left, wrt the current target
virtual void startOrbitingRight ()
 orbit around current target right (observer coordinates) Orbit right, wrt the current target
virtual void stopOrbitingRight ()
 orbit around current target right (observer coordinates) Orbit right, wrt the current target
virtual void orbitRight (double rads)
 orbit around current target right (observer coordinates) Orbit right, wrt the current target
virtual void startOrbitingUp ()
 orbit around current target up (observer coordinates) Orbit up, wrt the current target
virtual void stopOrbitingUp ()
 orbit around current target up (observer coordinates) Orbit up, wrt the current target
virtual void orbitUp (double rads)
 orbit around current target up (observer coordinates) Orbit up, wrt the current target
virtual void startOrbitingDown ()
 orbit around current target down (observer coordinates) Orbit down, wrt the current target
virtual void stopOrbitingDown ()
 orbit around current target down (observer coordinates) Orbit down, wrt the current target
virtual void orbitDown (double rads)
 orbit around current target down (observer coordinates) Orbit down, wrt the current target
- Public Member Functions inherited from makVrv::DtObserverObject
 DtObserverObject (DtDe &de, DtUniqueID id, const std::string &name="")
 CTOR.
virtual ~DtObserverObject ()
 DTOR.
virtual const std::string & name () const
 Get the observer object name.
virtual bool is2D () const
 Get if the observer is using 2D nav mode.
virtual bool displaySky () const
 Check if the observer draws the sky.
virtual void setDisplaySky (bool hasSky)
 Set whether the observer draws the sky.
virtual bool dynamicLights () const
 Check if the observer renders dynamic lights.
virtual void setDynamicLights (bool enabled)
 Set whether the observer renders dynamic lights.
virtual bool dynamicOcean () const
 Check if the observer renders dynamic lights.
virtual void setDynamicOcean (bool enabled)
 Set whether the observer renders dynamic lights.
virtual bool isScaling () const
 Get if the observer is scaling; convenience wrapper for modeSetting( DtObserverSettingsManager::EnableModelScaling )
virtual void setScaling (bool scale)
 Set if the observer is scaling.
virtual double scaleFactor () const
 Get the observer scale factor.
virtual void setScaleFactor (double scaleFactor)
 Set the observer scale factor.
virtual DtObserverObject::ScaleType scaleType () const
 Get the type of model scaling done (if any)
virtual void setScaleType (DtObserverObject::ScaleType scaleType)
 Set the type of model scaling to do.
virtual int modelSet () const
 Get the model set for this observer.
virtual void clearModeSettings ()
 clear the current mode settings map; typically, this is called when the osberver's observer mode changes in preparation for the settings for that mode
virtual bool modeSetting (int setting) const
 returns the value of the specified setting.
virtual const ModeSettingsMapmodeSettings () const
virtual void setTerrainIsGlobal (bool global)
 Set whether the terrain the observer object is in is global.
virtual void setMaxLinearSpeed (double maxSpeed)
 Set the msximum linear speed (used for speed scaling)
bool isGlobalTerrain () const
 Are we on a global terrain.
virtual void setSensor (const std::string &sensorName)
 Set the sensor to use on channels rendering with this observer.
virtual DtSensorfindSensor () const
 Get the current sensor; returns 0 if there is none.
virtual void disableSensor ()
 Sets current sensor to 0.
virtual void rotateYawLeft (double rads)
 yaw left (observer coordinates) yaw left movement (rotate left about the observer-Z axis)
virtual void rotateYawRight (double rads)
 yaw right (observer coordinates) yaw right movement (rotate right about the observer-Z axis) axis)
virtual void rollLeft (double rads)
 roll left (observer coordinates) roll left movement (rotate left around the current observer Y-axis)
virtual void rollRight (double rads)
 roll right (observer coordinates) roll right movement (rotate right around the current observer Y-axis)
virtual void rotateLevelPitchUp (double rads)
 pitch up (level observer coordinates) pitch up movement (rotate up around the current level observer X-axis)
virtual void rotateLevelPitchDown (double rads)
 pitch down (level observer coordinates) pitch down movement (rotate down around the current level observer X-axis)
virtual void rollLevelLeft (double rads)
 roll left (level observer coordinates) roll left movement (rotate left around the current level observer Y-axis)
virtual void rollLevelRight (double rads)
 roll right (level observer coordinates) roll right movement (rotate right around the current level observer Y-axis)

Protected Member Functions

virtual void slot_backendRemoved (const DtVrfBackendState &be)
virtual void slot_selectedBackendChanged (const DtSimulationAddress &, const DtSimulationAddress &addr)
- Protected Member Functions inherited from makVrv::DtOsgObserverObject
virtual bool shouldOrientToGlobeCenter ()
 Test whether the observer should orient itself to face the center of a globe terrain.
virtual void adjustToGlobeCurvature ()
 Adjust observer movement to the curvature of a globe terrain.
virtual bool shouldRotateGlobe ()
 True if the current terrain is a globe and observer movement should adjust to its curvature.
virtual double zoomFromCurrentAltitude ()
 calculate an (approximate) zoom that will correspond, when in 2D, to the same perceived altitude when in 3D
virtual double altitudeFromCurrentZoom ()
 calculate an (approximate) altitude that will correspond, when in 3D, to the same perceived altitude when in 2D
virtual void calcObserverWorldVectors ()
virtual const osg::Vec3d & observerWorldUp () const
virtual const osg::Vec3d & observerWorldNorth () const
virtual const osg::Vec3d & observerWorldEast () const
virtual const osg::Vec3d & attachedWorldUp () const
virtual osg::Vec3d & observerUp ()
virtual osg::Vec3d & observerFront ()
virtual osg::Vec3d & observerRight ()
virtual osg::Vec3d & attachedUp ()
virtual osg::Vec3d & attachedFront ()
virtual osg::Vec3d & attachedRight ()
virtual osg::Vec3d & attachedOffsetUp ()
virtual osg::Vec3d & attachedOffsetFront ()
virtual osg::Vec3d & attachedOffsetRight ()
virtual osg::Vec3d & levelAttachedUp ()
 for follow mode
virtual osg::Vec3d & levelAttachedFront ()
virtual osg::Vec3d & levelAttachedRight ()
virtual osg::Vec3d & levelObserverMimicUp ()
 for level observer in mimic mode
virtual osg::Vec3d & levelObserverMimicFront ()
virtual osg::Vec3d & levelObserverMimicRight ()
virtual osg::Vec3d & cameraUp ()
virtual osg::Vec3d & cameraFront ()
virtual osg::Vec3d & cameraRight ()
virtual osg::Vec3d & levelObserverUp ()
virtual osg::Vec3d & levelObserverFront ()
virtual osg::Vec3d & levelObserverRight ()
virtual void advanceOrbitLeft (double rads)
virtual void advanceOrbitRight (double rads)
virtual void advanceOrbitUp (double rads)
virtual void advanceOrbitDown (double rads)
virtual void makeLevelObserverMatrix ()
virtual void calculateLevelAttachedRotation ()
 for follow mode
virtual void makeLevelObserverMimicMatrix ()
 for mimic mode
virtual osg::Vec3d calcWorldPositionChange ()
 processes observer and gravity advance and position vectors to create a single composite move.
virtual osg::Vec3d calcMimicPositionChange ()
virtual osg::Vec3d calcFollowPositionChange ()
virtual osg::Vec3d calcSpaceFollowPositionChange ()
virtual osg::Vec3d calcTetherPositionChange ()
virtual osg::Vec3d calcTetherTrackPositionChange ()
virtual osg::Vec3d calcTrackPositionChange ()
virtual osg::Quat calcTetherTrackRotation ()
virtual osg::Quat calcWorldOrientationChange ()
virtual osg::Quat calcTetherOrientationChange ()
virtual osg::Quat calcMimicOrientationChange ()
virtual osg::Quat calcFollowOrientationChange ()
virtual void setCurrentAttachmentsVisibility (bool visible)
virtual void orientTo (const osg::Vec3d &target)
 Set the current observer orientation to face the target This sets pitch and heading roll is 0 when unattached or in tether or track mode.
virtual void orientCameraTo (const osg::Vec3d &target)
 Set the current camera orientation to face the target.
virtual TerrainResult getTerrainCenter (const DtUniqueID &patchID, osg::Vec3d &center)
virtual DtCoordinateConvertercoordinateConverter ()
virtual const
DtCoordinateConverter
coordinateConverter () const
virtual void initializeAttachment ()
virtual void getScalingIntersection ()
virtual void getViewIntersection ()
virtual double linearSpeed ()
 Takes speed scaling into account.
virtual double speedScalingGain () const
 Returns the gain used to scale speed scaling.
virtual void calcTerrainConstraint (osg::Vec3d prev)
virtual bool updateAttachPositionAndOrientation ()
 if attached to a single object, that objects position; otherwise, the centroid of all the attached objects' positions if attached to a single object, that objects orientation; otherwise, the current observer's orientation Returns false if at least one attached entity can't be found
virtual bool getSecondaryAttachPosition (osg::Vec3d &position)
virtual void getObserverOffsetVector (double &x, double &y, double &z) const
virtual void setObserverOffsetVector (double x, double y, double z)
virtual void getAttachedRotationOffset (double &x, double &y, double &z, double &w) const
virtual void setAttachedRotationOffset (double x, double y, double z, double w)
virtual void getBoundingVolume (DtSceneObject &sceneObject, osg::Vec3 &bvolExtents, osg::Vec3d &bvolCenter)
virtual void getBoundingVolume (DtTerrainPatchObject &patchObject, osg::Vec3 &bvolExtents, osg::Vec3d &bvolCenter)
virtual void setLocation (const osg::Vec3d &location, bool suppress=true)
virtual bool isMoving () const
 Only called by master; indicates linear motion other than that caused by the movement of something we're attached to.
virtual bool isRotating () const
virtual double computeNearClipDistance (DtSceneObject *sceneObject)
virtual float computeLocalModelScalingAmount (DtSceneObject *sceneObject)
virtual void calcScaledSpeed ()
virtual bool getTerrainOrPropIntersection (const osg::Vec3d &startPos, const osg::Vec3d &endPos, osg::Vec3d &result) const
virtual DtSceneObjectfindSceneObjectFromElement (const DtElementID &id)
 Find a scene object by it's unique element id.
virtual DtTerrainPatchObjectfindTerrainPatchObjectFromElement (const DtElementID &id)
 Find a terrain patch object by it's unique element id (was used by freeView).
virtual void getPositionAndOrientation (DtSceneObject &sceneObject, osg::Vec3d &position, osg::Vec3d &orientToPosition, osg::Quat &orientation)
virtual void getPositionAndOrientation (DtTerrainPatchObject &patchObject, osg::Vec3d &position, osg::Vec3d &orientToPosition, osg::Quat &orientation)
virtual void getPositionFromSceneObject (DtSceneObject &sceneObject, osg::Vec3d &position) const
 Get the Position from a scene object.
virtual bool getPartPositionOriFromSceneObject (DtSceneObject &sceneObject, int partId, osg::Vec3d &position, osg::Quat &ori) const
 Get the Part position from a scene object.
virtual void force2D ()
 After all items are calculated in tick, call this routine to effect the position or rotation given the visual display mode.
virtual void dimensionChanged (bool is2D)
 Called when visual mode is set, will effect position or rotation due to mode change.
virtual void setIs2D (bool is2D)
 Set if the observer is using 2D nav mode.
virtual double calculate3DAltitude () const
 Calculate the altitude.
virtual void calculateAltitude ()
 Sets myAltitude using fixed2DAltitude() or calculate3DAltitude() depending on mode.
virtual double zoomFromAltitude (double altitude)
 calculate an (approximate) zoom that will correspond, when in 2D, to the specified 3D altitude
virtual double zoomFromHeightAboveTerrain (double hat)
 calculate an (approximate) zoom that will correspond, when in 2D, to the specified height above terrain
virtual double calcEarthRadiusAtLocalCoord (const osg::Vec3d &local) const
virtual void synchronizeLocation (double x, double y, double z)
virtual void synchronizeOrientation (double x, double y, double z, double w)
virtual void calcHeightAboveTerrain ()
std::list< DtChannel * > findChannels ()
double heightToZoomRatio ()

Protected Attributes

DtVrfSimBackendManagermyBackendManager
DtVrfBackendStatemyCurrentBackend
- Protected Attributes inherited from makVrv::DtOsgObserverObject
std::vector< DtUniqueIDmyCurrentAttachments
std::vector< DtUniqueIDmySecondaryAttachments
int myPartAttachment
bool myChanged
double myLastTickTime
osg::Vec3d myObserverPositionVector
 — Observer
osg::Vec3d myLastSpeedPositionVector
osg::Vec3d myMasterPositionVector
bool mySyncPending
bool mySyncSuppressed
osg::Vec3d myObserverLinearVelocityVector
osg::Vec3d myObserverRotationalVelocityVector
bool myLocalModelScalingEnabled
float myLocalModelScalingAmount
osg::Vec3d myObserverOffsetVector
 Current offset from an attachment, when attached.
osg::Vec3d mySavedObserverOffsetVector
 Used for switching between track mode and other attached modes.
osg::Vec3d myObserverPosition
 Change in observer position this frame.
osg::Vec3d myLevelObserverPosition
 Gravity change in observer position this frame.
osg::Vec3d myAttachedPosition
osg::Vec3d myLevelAttachedPosition
osg::Vec3d myDragMove
 Change in world position due to drag.
osg::Vec3d myOrientToPosition
osg::Vec3d myOrbitAdvance
double myCurrentObserverDistance
 largest of the distances currently in play in a given frame.
osg::Quat myAttachedRotationOffset
 My Attached rotation offset.
osg::Quat myObserverRotation
 This is our ENU observer orientation as a quaternion.
osg::Quat myMasterRotation
osg::Quat mySavedObserverRotation
 This is used for switching between track mode and other attach modes.
osg::Quat myPreviousAttachedObserverRotation
 This is here so we can be in tether attach mode, detach, then attach to another entity and have a reasonable orientation wrt the observer offset vector that will be used.
osg::Quat myAttachedRotation
osg::Quat myLevelAttachedRotation
osg::Matrixd myLevelObserverMimicRotationMatrix
osg::Matrixd myLevelObserverRotationMatrix
osg::Vec3d my2DTo3DCachedObserverOffsetVector
osg::Quat my2DTo3DCachedRotation
double myCurrentRadius
 This variable is true when the bounding radius is too big The reset view will be from far away trying to see the whole terrain like the globe.
bool myConstrainToCenter
MotionState myObserverState
MotionState myLevelObserverState
MotionState myAttachedObserverState
MotionState myLevelAttachedObserverState
MotionState myRotatingState
MotionState myRotatingLevelState
MotionState myAbsoluteRotatingState
MotionState myAbsoluteLevelRotatingState
bool myOrbitingLeft
bool myOrbitingRight
bool myOrbitingUp
bool myOrbitingDown
double myOrbitSpeed
double myLinearSpeed
double myRotationSpeed
double myMaxLinearSpeed
 Need just these, for terrain scaling.
double myMinLinearSpeed
double myLinearScaledSpeedGain
double mySpeedScaleSpeed
double mySceneCenterOffsetX
double mySceneCenterOffsetY
double mySceneCenterOffsetZ
bool myLookingRight
 -— Camera
bool myLookingLeft
bool myLookingUp
bool myLookingDown
bool myLookingTiltRight
bool myLookingTiltLeft
osg::Quat myFinalCameraRotation
 This is the combined camera/observer orientation; this is what the DtOsgChannel uses to orient itself.
osg::Vec3d myFinalCameraPositionVector
 This is the combined camera/observer orientation; this is what the DtOsgChannel uses to orient itself.
osg::Vec3d myCameraOffset
 This is the camera offset wrt to observer.
osg::Quat myCameraRotation
 This is the camera (wrt the observer) as a quaternion.
osg::Vec3d myObserverWorldUp
osg::Vec3d myObserverWorldNorth
osg::Vec3d myObserverWorldEast
osg::Vec3d myAttachedWorldUp
osg::Vec3d myAttachedWorldNorth
osg::Vec3d myAttachedWorldEast
osg::Vec3d myObserverUp
osg::Vec3d myObserverFront
osg::Vec3d myObserverRight
osg::Vec3d myLevelObserverUp
osg::Vec3d myLevelObserverFront
osg::Vec3d myLevelObserverRight
osg::Vec3d myAttachedUp
osg::Vec3d myAttachedFront
osg::Vec3d myAttachedRight
osg::Vec3d myLevelAttachedUp
osg::Vec3d myLevelAttachedFront
osg::Vec3d myLevelAttachedRight
osg::Vec3d myLevelObserverMimicUp
osg::Vec3d myLevelObserverMimicFront
osg::Vec3d myLevelObserverMimicRight
osg::Vec3d myAttachedOffsetUp
osg::Vec3d myAttachedOffsetFront
osg::Vec3d myAttachedOffsetRight
osg::Vec3d myCameraUp
osg::Vec3d myCameraFront
osg::Vec3d myCameraRight
DtObserverObject::AttachType myAttachType
DtObserverObject::AttachType my3DAttachType
bool myHideModelOnAttach
bool mySpeedScaling
double myHeightAboveTerrainTimer
bool myConstrainToTerrain
bool myInternalSuppressConstrainToTerrain
 suppress when jumping...
bool myExternalSuppressConstrainToTerrain
 suppress when told to
int myOrientToTargetConstraint
 This is an int rather than a bool because we increment/decrement it, much like a reference pointer.
bool myOrientCameraToTargetConstraint
bool myOrientToOnReset
bool myOrbiting
bool myForceOrientReset
bool myHaveTerrainPivot
bool myHaveViewIntersect
osg::Vec3d myViewIntersect
bool myHaveDownIntersect
osg::Vec3d myDownIntersect
osg::Vec3d myAttachPosition
double myLastAttachedBvolDiameter
double myLastAttachBvolOffset
osg::Vec3d myPreviousPositionVector
 for backing out if we hit a constraint
osg::Vec3d myPreviousOffsetVector
double myAltitude
bool myViewResolutionIncreasingState
 note, this is only calculated if myConstrainToCenter is true
bool myViewResolutionDecreasingState
double myViewResolution
double myViewMagnification
 Only used in 3D.
double myLastViewMagnification
ElementVisibilityMap myPendingVisibilityState
bool myGotoTerrainCenterPending
double myNextGotoTerrainCenterTime
double myStartGotoTerrainCenterTime
DtUniqueID myPendingTerrainPatchId
osg::Vec3d myPreviousTerrainCenter
double myHeightAboveTerrain
double mySpeedScaleHeightEquivalent
double myCurvatureAdjustment
bool myMovedSinceLastHAT
- Protected Attributes inherited from makVrv::DtObserverObject
DtDemyDe
std::string myName
bool myIs2D
double myScaleFactor
int myModelSet
ScaleType myScaleType
bool myTerrainIsGlobalFlag
ModeSettingsMap myModeSettingsMap
DtSensormySensor

Additional Inherited Members

- Public Types inherited from makVrv::DtOsgObserverObject
enum  TerrainResult { TerrainResultNoData = 0, TerrainResultNewCenter, TerrainResultComplete }
- Static Public Member Functions inherited from makVrv::DtOsgObserverObject
static void matrixdToTaitBryan (const osg::Matrixd &mat, DtTaitBryan &tb, bool isWorld2D=false)
 isWorld2D when in plan view mode, geocentric, looking at a globe size terrain
static double clampUnity (double x)
- Protected Types inherited from makVrv::DtOsgObserverObject
typedef boost::unordered_map
< DtElementID, bool
ElementVisibilityMap
- Static Protected Attributes inherited from makVrv::DtOsgObserverObject
static const double theObserverBoundingSphere
static const double theHeightAboveTerrainUpdatePeriod
static const double theMaxTerrainRetryTime
static const double theCenterConstrainHeight
static const double theMinViewResolution
static const double theMaxViewResolution

Constructor & Destructor Documentation

makVrf::DtVrfOsgObserverObject::DtVrfOsgObserverObject ( makVrv::DtDe de,
makVrv::DtUniqueID  id,
const std::string &  name = "" 
)
virtual makVrf::DtVrfOsgObserverObject::~DtVrfOsgObserverObject ( )
virtual

Member Function Documentation

virtual void makVrf::DtVrfOsgObserverObject::tick ( double  simTime)
virtual

Update the observer object, calculates position of by sim Time.

Reimplemented from makVrv::DtOsgObserverObject.

virtual void makVrf::DtVrfOsgObserverObject::slot_backendRemoved ( const DtVrfBackendState be)
protectedvirtual
virtual void makVrf::DtVrfOsgObserverObject::slot_selectedBackendChanged ( const DtSimulationAddress &  ,
const DtSimulationAddress &  addr 
)
protectedvirtual

Member Data Documentation

DtVrfSimBackendManager* makVrf::DtVrfOsgObserverObject::myBackendManager
protected
DtVrfBackendState* makVrf::DtVrfOsgObserverObject::myCurrentBackend
protected

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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)