VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrf::DtVrfObserverViewsManager Class Reference

Override of DtObserverViewsManager to handle VRF Scenario observer views. More...

Inheritance diagram for makVrf::DtVrfObserverViewsManager:
Inheritance graph
[legend]

Public Member Functions

 DtVrfObserverViewsManager (makVrv::DtDe &)
virtual ~DtVrfObserverViewsManager ()
virtual bool renameObserverRecord (const std::string &newName, const std::string &oldName, ViewProjection mode)
 Handles the logic to rename an observer view record.
virtual void setScenarioObserverViews (const makArchives::DtObserverStateRecordsList &views)
 This will take all the current terrain associated records and merge in the scenario views.
virtual
makArchives::DtObserverStateRecordsList 
scenarioObserverViews () const
 This will return all records that are not associated with the terrain, unless it is the default scenario view and it is associated with the terrain.
virtual
makArchives::DtObserverStateRecordsList 
terrainObserverViews () const
 Only views associated with the terrain.
virtual bool removeObserverViewRecord (const std::string &observerViewName, ViewProjection projection)
 finds an observer view record by name and removes it from the list
virtual void captureAndAddObserverView ()
 captures the observer view record of the current observer given by the input driver and
virtual void setTerrainDefaultObserverView ()
 Override to not load if loading a scenario. Will get called if there is no default view for the scenario.
virtual std::string observerViewProjectionMode (const makArchives::DtObserverStateRecord &record) const
virtual bool isScenarioViewsRecord (const std::string &observerViewName, bool is2D) const
virtual void saveObserverViewsFile (const makVrv::DtUnicode &filename)
 If a scenario is loaded only save views that were not removed from this scenario.
virtual void loadObserverViewsFile (const makVrv::DtUnicode &pathToFile)
 If scenario is loaded deals only with scenario views, does not touch terrain views.
virtual void loadTerrainObserverViewsFile (const makVrv::DtUnicode &pathToFile, bool reload)
 If scenario is loaded remove any terrain ones that are already in the scenario.
virtual void clearObserverViewList ()
 Will remove the records individually rather than simply clearing out so can be removed from scenario, not terrain.
- Public Member Functions inherited from makVrv::DtObserverViewsManager
virtual ~DtObserverViewsManager ()
virtual std::string generateUniqueNameForObserverViewRecord (const makArchives::DtObserverStateRecord &) const
 Generates a unique name based on the supplied observer record and what is already in the list.
virtual void addObserverViewRecordToList (const makArchives::DtObserverStateRecord &observerStateRecord)
 Adds an observer view record to the current observer view list.
virtual void setObserverViewByName (const std::string &observerViewName, bool animate=false)
 finds the observer view record by name in the view list and calls findObserverToUse() to determine the observer to apply the view to.
virtual void setObserverViewByNameAndMode (const std::string &observerViewName, ViewProjection projection, bool animate=false)
 finds the observer view record by name in the view list and calls findObserverToUse() to determine the observer to apply the view to.
virtual void associateObserverViewsToTerrain (bool associate)
 Associates all the observer view records in the current list to the current loaded terrain.
virtual const std::string & observerView3DDefaultRecordName () const
 returns the name of the default 3D observer view
virtual void setObserverView3DDefaultRecordName (const std::string &val)
 sets the name of the default 3D observer view
virtual const std::string & observerView2DDefaultRecordName () const
 returns the name of the default 2D observer view
virtual void setObserverView2DDefaultRecordName (const std::string &val)
 sets the name of the default 2D observer view
virtual bool getTerrainDefaultObserverView (std::string &defaultView, ViewProjection &projection)
 setTerrainDefaultObserverView calls this to determine which saved view record, if any, should be used as the default view.
virtual const
makArchives::DtObserverStateRecordsList
observerViewList ()
 returns the current observer view list
virtual void setObserverViewList (const makArchives::DtObserverStateRecordsList &val)
 set the current observer view list
virtual void saveObserverViewFile (const DtUnicode &filename, const std::string &observerViewName, ViewProjection projection)
 save a single observer view into a file
virtual void setDefaultObserverViewRecord (const std::string &recordName, ViewProjection projection)
 Handles the logic to set an observer view record as default.
virtual void unSetDefaultObserverViewRecord (const std::string &recordName, ViewProjection projection)
 Handles the logic to un set an observer view record as default.
bool isRecordAssociatedToTerrain (const std::string &recordDisplayName)
 finds an observer view record by name and returns if is associated to the opened terrain in scene
virtual void setIsDefaultObserverViewRecord (const std::string &newName, bool isDefault)
 Set the observer record as a default view.
virtual void setIsDefaultObserverViewRecord (const makArchives::DtObserverStateRecord &record, bool isDefault)
 Set the observer record as a default view.
virtual bool setAssociateObserverViewRecord (const std::string &, bool associate)
 Returns true if there is a record with the specified name.
virtual unsigned int countAssociatedViews () const
 return the number of view records associated to the current terrain on scene
const std::string & rightClickedObserverViewName () const
 returns the name of the observer view where the gui called the right click event
void setRightClickedObserverViewName (const std::string &val)
 set the name of the observer view where the gui called the right click event
ViewProjection rightClickedObserverViewProjection () const
 returns the mode of the observer view where the gui called the right click event
void setRightClickedObserverViewProjection (ViewProjection projection)
 set the mode of the observer view where the gui called the right click event
bool rightClickedObserverViewIsAttached () const
 returns if the observer view where the gui called the right click event is attached to an entity
void setRightClickedObserverViewIsAttached (bool val)
 set if the observer view where the gui called the right click event is attached to an entity
void setRightClickedObserverViewIsAttached (const std::string &recordName)
 finds an observer view by name and returns if the observer view is attached to an entity
bool rightClickedObserverViewIsAssociated () const
 returns if the observer view where the gui called the right click event is associated to the terrain opened in the scene
void setRightClickedObserverViewIsAssociated (bool val)
 set if the observer view where the gui called the right click event is associated to the terrain opened in the scene
void setRightClickedObserverViewIsAssociated (const std::string &recordName)
 finds an observer view by name and returns if the observer view is associated to the terrain opened in the scene
const std::string & observerViewsFile () const
 returns an name of the observer view file associate to the current terrain opened in the scene
void setObserverViewsFile (const std::string &val)
 set an name of the observer view file associate to the current terrain opened in the scene
bool isDirty () const
 returns if the list has changes that needs to be saved or (re)associated
void setDirty (bool val)
 sets if the list has changes that needs to be saved
bool areDefaultsDirty () const
 returns if default views need to be (re)associated
void setDefaultsDirty (bool val)
 sets if default views need to be (re)associated
const std::string & terrainObserverViewRecordsFileName () const
 returns the file name of the observer view file associated to the terrain opened in scene
void setTerrainObserverViewRecordsFileName (const std::string &val)
 sets the file name of the observer view file associated to the terrain opened in scene
void setObserverViewRecordsFromIntializer ()
 read observer view records send through command line using bdnx file
bool findObserverViewByNameAndMode (const std::string &observerName, ViewProjection projection, makArchives::DtObserverStateRecord &record)
 find observer view by name and mode.
void setObserverViewByrecord (makArchives::DtObserverStateRecord &record, bool animate=false)
 sets the observer with the data in the given record

Public Attributes

boost::signal< void(const
std::string &, bool hide)> 
signal_hideObserverView
boost::signal< void()> signal_scenarioClosed

Protected Member Functions

virtual void extractUniqueRecords (const makArchives::DtObserverStateRecordsList &sourceList, const makArchives::DtObserverStateRecordsList &matchList, makArchives::DtObserverStateRecordsList &finalList, bool takeAllMatch=false) const
virtual void slot_terrainCleared (bool reload)
 on terrain clear, clean up the observer view list, unless reload is true; then nothing needs to be done
virtual void scenarioClosed ()
- Protected Member Functions inherited from makVrv::DtObserverViewsManager
 DtObserverViewsManager ()
 default CTOR
 DtObserverViewsManager (DtDe &myDe)
 CTOR.
virtual bool readObserverViewListFromFile (const DtUnicode &fileName, makArchives::DtObserverStateRecordsList &recordList)
 Reads and converts observer view records from a file to a DtObserverStateRecordsList.
virtual void slot_onApplicationQuit ()
 on terrain clear, clean up the observer view list
virtual void slot_closeConfirmationMessageToBeDisplayed ()
 slot receiving the signal before the close confirmation window pops up
virtual void processObserverViewRecordsList (makArchives::DtObserverStateRecordsList &incomingList, bool associated)
 process the incoming observer view list to be added to the application observer view list sets a unique name for every record and sets if they are associated to a terrain
virtual DtObserverfindObserverToUse ()
 Determine which observer to apply a saved view to.

Protected Attributes

bool myIgnoreTerrainSet
bool myClearingTerrain
- Protected Attributes inherited from makVrv::DtObserverViewsManager
DtDemyDe
std::string myObserverView3DDefaultRecordName
 name of 3D default observer view record
std::string myObserverView2DDefaultRecordName
 name of 2D default observer view record
makArchives::DtObserverStateRecordsList myObserverViewList
 Observer Views List.
std::string myTerrainObserverViewRecordsFileName
 terrain osrx file name
std::string myRightClickedObserverViewName
ViewProjection myRightClickedObserverViewProjection
bool myRightClickedObserverViewIsAttached
bool myRightClickedObserverViewIsAssociated
std::string myObserverViewsFile
DtSignalConnectionManager myConnections
bool myHasSetupObserverRecords
bool myIsDirty
 tracks if any change in the saved view list needs to be saved
bool myDefaultsDirty
 Tracks changes to defaults, which mean we should enable re-association but not enough to nag / enable for 'save' if we have an imported file.
bool myApplicationIsClosing

Additional Inherited Members

- Public Types inherited from makVrv::DtObserverViewsManager
enum  ViewProjection { Projection2D, Projection3D }

Detailed Description

Override of DtObserverViewsManager to handle VRF Scenario observer views.

Constructor & Destructor Documentation

makVrf::DtVrfObserverViewsManager::DtVrfObserverViewsManager ( makVrv::DtDe )
virtual makVrf::DtVrfObserverViewsManager::~DtVrfObserverViewsManager ( )
virtual

Member Function Documentation

virtual bool makVrf::DtVrfObserverViewsManager::renameObserverRecord ( const std::string &  newName,
const std::string &  oldName,
ViewProjection  projection 
)
virtual

Handles the logic to rename an observer view record.

Reimplemented from makVrv::DtObserverViewsManager.

virtual void makVrf::DtVrfObserverViewsManager::setScenarioObserverViews ( const makArchives::DtObserverStateRecordsList views)
virtual

This will take all the current terrain associated records and merge in the scenario views.

virtual makArchives::DtObserverStateRecordsList makVrf::DtVrfObserverViewsManager::scenarioObserverViews ( ) const
virtual

This will return all records that are not associated with the terrain, unless it is the default scenario view and it is associated with the terrain.

virtual makArchives::DtObserverStateRecordsList makVrf::DtVrfObserverViewsManager::terrainObserverViews ( ) const
virtual

Only views associated with the terrain.

virtual bool makVrf::DtVrfObserverViewsManager::removeObserverViewRecord ( const std::string &  observerViewName,
ViewProjection  projection 
)
virtual

finds an observer view record by name and removes it from the list

Reimplemented from makVrv::DtObserverViewsManager.

virtual void makVrf::DtVrfObserverViewsManager::captureAndAddObserverView ( )
virtual

captures the observer view record of the current observer given by the input driver and

Reimplemented from makVrv::DtObserverViewsManager.

virtual void makVrf::DtVrfObserverViewsManager::setTerrainDefaultObserverView ( )
virtual

Override to not load if loading a scenario. Will get called if there is no default view for the scenario.

Reimplemented from makVrv::DtObserverViewsManager.

virtual std::string makVrf::DtVrfObserverViewsManager::observerViewProjectionMode ( const makArchives::DtObserverStateRecord record) const
virtual
virtual bool makVrf::DtVrfObserverViewsManager::isScenarioViewsRecord ( const std::string &  observerViewName,
bool  is2D 
) const
virtual
virtual void makVrf::DtVrfObserverViewsManager::saveObserverViewsFile ( const makVrv::DtUnicode filename)
virtual

If a scenario is loaded only save views that were not removed from this scenario.

Reimplemented from makVrv::DtObserverViewsManager.

virtual void makVrf::DtVrfObserverViewsManager::loadObserverViewsFile ( const makVrv::DtUnicode pathToFile)
virtual

If scenario is loaded deals only with scenario views, does not touch terrain views.

Reimplemented from makVrv::DtObserverViewsManager.

virtual void makVrf::DtVrfObserverViewsManager::loadTerrainObserverViewsFile ( const makVrv::DtUnicode pathToFile,
bool  reload 
)
virtual

If scenario is loaded remove any terrain ones that are already in the scenario.

Reimplemented from makVrv::DtObserverViewsManager.

virtual void makVrf::DtVrfObserverViewsManager::clearObserverViewList ( )
virtual

Will remove the records individually rather than simply clearing out so can be removed from scenario, not terrain.

Reimplemented from makVrv::DtObserverViewsManager.

virtual void makVrf::DtVrfObserverViewsManager::extractUniqueRecords ( const makArchives::DtObserverStateRecordsList sourceList,
const makArchives::DtObserverStateRecordsList matchList,
makArchives::DtObserverStateRecordsList finalList,
bool  takeAllMatch = false 
) const
protectedvirtual
virtual void makVrf::DtVrfObserverViewsManager::slot_terrainCleared ( bool  reload)
protectedvirtual

on terrain clear, clean up the observer view list, unless reload is true; then nothing needs to be done

Reimplemented from makVrv::DtObserverViewsManager.

virtual void makVrf::DtVrfObserverViewsManager::scenarioClosed ( )
protectedvirtual

Member Data Documentation

boost::signal<void(const std::string&, bool hide)> makVrf::DtVrfObserverViewsManager::signal_hideObserverView
boost::signal<void ()> makVrf::DtVrfObserverViewsManager::signal_scenarioClosed
bool makVrf::DtVrfObserverViewsManager::myIgnoreTerrainSet
protected
bool makVrf::DtVrfObserverViewsManager::myClearingTerrain
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)