![]() |
VR-Forces 4.6.1 Class Documentation
|
Manager for the observer view records loaded in the application. More...

Public Types | |
| enum | ViewProjection { Projection2D, Projection3D } |
Public Member Functions | |
| virtual | ~DtObserverViewsManager () |
| virtual void | loadTerrainObserverViewsFile (const DtUnicode &pathTofile, bool reload) |
| Loads the observer view file (.osrx) associate to the terrain adds the records to the observer view list and set the terrain's default view. | |
| virtual void | loadObserverViewsFile (const DtUnicode &pathTofile) |
| loads an observer view file (.osrx) and add the records to the observer view list. | |
| 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 void | setTerrainDefaultObserverView () |
| Set up the loaded terrain default observer 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 | saveObserverViewsFile (const DtUnicode &filename) |
| save the current observer view list into a file | |
| virtual void | saveObserverViewFile (const DtUnicode &filename, const std::string &observerViewName, ViewProjection projection) |
| save a single observer view into a file | |
| virtual bool | renameObserverRecord (const std::string &newName, const std::string &oldName, ViewProjection projection) |
| Handles the logic to rename an observer view record. | |
| 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. | |
| virtual void | clearObserverViewList () |
| clear the current observer view list | |
| virtual bool | removeObserverViewRecord (const std::string &observerViewName, ViewProjection projection) |
| finds an observer view record by name and removes it from the list | |
| 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 | |
| virtual void | captureAndAddObserverView () |
| captures the observer view record of the current observer given by the input driver and | |
| 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 | |
Protected Member Functions | |
| 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_terrainCleared (bool reload) |
| on terrain clear, clean up the observer view list, unless reload is true; then nothing needs to be done | |
| 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 DtObserver * | findObserverToUse () |
| Determine which observer to apply a saved view to. | |
Protected Attributes | |
| DtDe & | myDe |
| 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 |
Friends | |
| class | DtObserverViewsManagerCreator |
Manager for the observer view records loaded in the application.
|
virtual |
|
protected |
default CTOR
|
protected |
CTOR.
|
virtual |
Loads the observer view file (.osrx) associate to the terrain adds the records to the observer view list and set the terrain's default view.
If reload is true, then this function will simply return, as we don't need to (re) load terrain associated files on a terrain reload
Reimplemented in makVrf::DtVrfObserverViewsManager.
|
virtual |
loads an observer view file (.osrx) and add the records to the observer view list.
Reimplemented in makVrf::DtVrfObserverViewsManager.
|
virtual |
Generates a unique name based on the supplied observer record and what is already in the list.
|
virtual |
Adds an observer view record to the current observer view list.
|
virtual |
finds the observer view record by name in the view list and calls findObserverToUse() to determine the observer to apply the view to.
|
virtual |
finds the observer view record by name in the view list and calls findObserverToUse() to determine the observer to apply the view to.
|
virtual |
Associates all the observer view records in the current list to the current loaded terrain.
|
virtual |
returns the name of the default 3D observer view
|
virtual |
sets the name of the default 3D observer view
|
virtual |
returns the name of the default 2D observer view
|
virtual |
sets the name of the default 2D observer view
|
virtual |
setTerrainDefaultObserverView calls this to determine which saved view record, if any, should be used as the default view.
A saved view file may contain a default view for 2D and one for 3D. If the application supports 3D, the 3D default will be used if it exists. If not, and the application supports 2D, the 2D default view will be used if it exists. Otherwise, this method returns false, and no default view should be applied.
|
virtual |
Set up the loaded terrain default observer view.
This method first calls getDefaultTerrainView() to determine which view in the file should be used. If an appropriate view exists, it calls setObserverViewByName with the name of the saved view chosen.
Reimplemented in makVrf::DtVrfObserverViewsManager.
|
virtual |
returns the current observer view list
|
virtual |
set the current observer view list
|
virtual |
save the current observer view list into a file
Reimplemented in makVrf::DtVrfObserverViewsManager.
|
virtual |
save a single observer view into a file
|
virtual |
Handles the logic to rename an observer view record.
Reimplemented in makVrf::DtVrfObserverViewsManager.
|
virtual |
Handles the logic to set an observer view record as default.
|
virtual |
Handles the logic to un set an observer view record as default.
|
virtual |
clear the current observer view list
Reimplemented in makVrf::DtVrfObserverViewsManager.
|
virtual |
finds an observer view record by name and removes it from the list
Reimplemented in makVrf::DtVrfObserverViewsManager.
| bool makVrv::DtObserverViewsManager::isRecordAssociatedToTerrain | ( | const std::string & | recordDisplayName | ) |
finds an observer view record by name and returns if is associated to the opened terrain in scene
|
virtual |
Set the observer record as a default view.
|
virtual |
Set the observer record as a default view.
|
virtual |
Returns true if there is a record with the specified name.
return the number of view records associated to the current terrain on scene
|
virtual |
captures the observer view record of the current observer given by the input driver and
Reimplemented in makVrf::DtVrfObserverViewsManager.
| const std::string& makVrv::DtObserverViewsManager::rightClickedObserverViewName | ( | ) | const |
returns the name of the observer view where the gui called the right click event
| void makVrv::DtObserverViewsManager::setRightClickedObserverViewName | ( | const std::string & | val | ) |
set the name of the observer view where the gui called the right click event
| ViewProjection makVrv::DtObserverViewsManager::rightClickedObserverViewProjection | ( | ) | const |
returns the mode of the observer view where the gui called the right click event
| void makVrv::DtObserverViewsManager::setRightClickedObserverViewProjection | ( | ViewProjection | projection | ) |
set the mode of the observer view where the gui called the right click event
| bool makVrv::DtObserverViewsManager::rightClickedObserverViewIsAttached | ( | ) | const |
returns if the observer view where the gui called the right click event is attached to an entity
| void makVrv::DtObserverViewsManager::setRightClickedObserverViewIsAttached | ( | bool | val | ) |
set if the observer view where the gui called the right click event is attached to an entity
| void makVrv::DtObserverViewsManager::setRightClickedObserverViewIsAttached | ( | const std::string & | recordName | ) |
finds an observer view by name and returns if the observer view is attached to an entity
| bool makVrv::DtObserverViewsManager::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 makVrv::DtObserverViewsManager::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 makVrv::DtObserverViewsManager::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& makVrv::DtObserverViewsManager::observerViewsFile | ( | ) | const |
returns an name of the observer view file associate to the current terrain opened in the scene
| void makVrv::DtObserverViewsManager::setObserverViewsFile | ( | const std::string & | val | ) |
set an name of the observer view file associate to the current terrain opened in the scene
| bool makVrv::DtObserverViewsManager::isDirty | ( | ) | const |
returns if the list has changes that needs to be saved or (re)associated
| void makVrv::DtObserverViewsManager::setDirty | ( | bool | val | ) |
sets if the list has changes that needs to be saved
| bool makVrv::DtObserverViewsManager::areDefaultsDirty | ( | ) | const |
returns if default views need to be (re)associated
| void makVrv::DtObserverViewsManager::setDefaultsDirty | ( | bool | val | ) |
sets if default views need to be (re)associated
| const std::string& makVrv::DtObserverViewsManager::terrainObserverViewRecordsFileName | ( | ) | const |
returns the file name of the observer view file associated to the terrain opened in scene
| void makVrv::DtObserverViewsManager::setTerrainObserverViewRecordsFileName | ( | const std::string & | val | ) |
sets the file name of the observer view file associated to the terrain opened in scene
| void makVrv::DtObserverViewsManager::setObserverViewRecordsFromIntializer | ( | ) |
read observer view records send through command line using bdnx file
| bool makVrv::DtObserverViewsManager::findObserverViewByNameAndMode | ( | const std::string & | observerName, |
| ViewProjection | projection, | ||
| makArchives::DtObserverStateRecord & | record | ||
| ) |
find observer view by name and mode.
returns true if the observer was found sets it in the state record parameter
| void makVrv::DtObserverViewsManager::setObserverViewByrecord | ( | makArchives::DtObserverStateRecord & | record, |
| bool | animate = false |
||
| ) |
sets the observer with the data in the given record
|
protectedvirtual |
Reads and converts observer view records from a file to a DtObserverStateRecordsList.
|
protectedvirtual |
on terrain clear, clean up the observer view list, unless reload is true; then nothing needs to be done
Reimplemented in makVrf::DtVrfObserverViewsManager.
|
protectedvirtual |
on terrain clear, clean up the observer view list
|
protectedvirtual |
slot receiving the signal before the close confirmation window pops up
|
protectedvirtual |
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
|
protectedvirtual |
Determine which observer to apply a saved view to.
Normally, the current observer is used (the observer with mouse/keybrd focus) but its possible that no observer may have focus yet. In this case, the observer named "Observer 1" will be used; if that doesn't exist, the first observer in the DtInputDriver's observer list is used. If that fails, the request to apply a saved view is ignored.
|
friend |
|
protected |
|
protected |
name of 3D default observer view record
|
protected |
name of 2D default observer view record
|
protected |
Observer Views List.
|
protected |
terrain osrx file name
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
tracks if any change in the saved view list needs to be saved
|
protected |
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.
|
protected |