![]() |
VR-Forces Developer's Guide
|
Manager for the observer view records loaded in the application.

Public Types | |
| enum | ViewProjection { Projection2D, Projection3D } |
Public Member Functions | |
| virtual | ~DtObserverViewsManager () |
| virtual void | loadTerrainObserverViewsFile (const DtUnicode &pathTofile, bool reload) |
| virtual void | loadObserverViewsFile (const DtUnicode &pathTofile) |
| virtual std::string | generateUniqueNameForObserverViewRecord (const makArchives::DtObserverStateRecord &) const |
| virtual void | addObserverViewRecordToList (const makArchives::DtObserverStateRecord &observerStateRecord) |
| virtual void | setObserverViewByName (const std::string &observerViewName, bool animate=false) |
| virtual void | setObserverViewByNameAndMode (const std::string &observerViewName, ViewProjection projection, bool animate=false) |
| virtual void | associateObserverViewsToTerrain (bool associate) |
| virtual const std::string & | observerView3DDefaultRecordName () const |
| virtual void | setObserverView3DDefaultRecordName (const std::string &val) |
| virtual const std::string & | observerView2DDefaultRecordName () const |
| virtual void | setObserverView2DDefaultRecordName (const std::string &val) |
| virtual bool | getTerrainDefaultObserverView (std::string &defaultView, ViewProjection &projection) |
| virtual void | setTerrainDefaultObserverView () |
| virtual void | setSuppressDefaultView (const std::string &observerName) |
| virtual const makArchives::DtObserverStateRecordsList & | observerViewList () |
| virtual void | setObserverViewList (const makArchives::DtObserverStateRecordsList &val) |
| virtual void | saveObserverViewsFile (const DtUnicode &filename) |
| virtual void | saveObserverViewFile (const DtUnicode &filename, const std::string &observerViewName, ViewProjection projection) |
| virtual bool | renameObserverRecord (const std::string &newName, const std::string &oldName, ViewProjection projection) |
| virtual void | setDefaultObserverViewRecord (const std::string &recordName, ViewProjection projection) |
| virtual void | unSetDefaultObserverViewRecord (const std::string &recordName, ViewProjection projection) |
| virtual void | clearObserverViewList () |
| virtual bool | removeObserverViewRecord (const std::string &observerViewName, ViewProjection projection) |
| virtual bool | isRecordAssociatedToTerrain (const std::string &recordDisplayName) |
| virtual void | setIsDefaultObserverViewRecord (const std::string &newName, bool isDefault) |
| virtual void | setIsDefaultObserverViewRecord (const makArchives::DtObserverStateRecord &record, bool isDefault) |
| virtual bool | setAssociateObserverViewRecord (const std::string &, bool associate) |
| virtual unsigned int | countAssociatedViews () const |
| virtual void | captureAndAddObserverView () |
| virtual const std::string & | rightClickedObserverViewName () const |
| virtual void | setRightClickedObserverViewName (const std::string &val) |
| virtual ViewProjection | rightClickedObserverViewProjection () const |
| virtual void | setRightClickedObserverViewProjection (ViewProjection projection) |
| virtual bool | rightClickedObserverViewIsAttached () const |
| virtual void | setRightClickedObserverViewIsAttached (bool val) |
| virtual void | setRightClickedObserverViewIsAttached (const std::string &recordName) |
| virtual bool | rightClickedObserverViewIsAssociated () const |
| virtual void | setRightClickedObserverViewIsAssociated (bool val) |
| virtual void | setRightClickedObserverViewIsAssociated (const std::string &recordName) |
| virtual const std::string & | observerViewsFile () const |
| virtual void | setObserverViewsFile (const std::string &val) |
| virtual bool | isDirty () const |
| virtual void | setDirty (bool val) |
| virtual bool | areDefaultsDirty () const |
| virtual void | setDefaultsDirty (bool val) |
| virtual const std::string & | terrainObserverViewRecordsFileName () const |
| virtual void | setTerrainObserverViewRecordsFileName (const std::string &val) |
| virtual void | setObserverViewRecordsFromIntializer () |
| virtual bool | findObserverViewByNameAndMode (const std::string &observerName, ViewProjection projection, makArchives::DtObserverStateRecord &record) |
| virtual void | setObserverViewByRecord (makArchives::DtObserverStateRecord &record, bool animate=false) |
Protected Member Functions | |
| DtObserverViewsManager (DtDe &myDe) | |
| virtual bool | readObserverViewListFromFile (const DtUnicode &fileName, makArchives::DtObserverStateRecordsList &recordList) |
| virtual void | slot_terrainCleared (bool reload) |
| virtual void | slot_onApplicationQuit () |
| virtual void | slot_observerModeIs2dChanged (int mode) |
| virtual void | slot_closeConfirmationMessageToBeDisplayed () |
| virtual void | processObserverViewRecordsList (makArchives::DtObserverStateRecordsList &incomingList, bool associated) |
| virtual DtObserver * | findObserverToUse () |
| virtual bool | observerOnSuppressList (const std::string &observerName) |
Protected Attributes | |
| DtDe & | myDe |
| std::string | myObserverView3DDefaultRecordName |
| std::string | myObserverView2DDefaultRecordName |
| makArchives::DtObserverStateRecordsList | myObserverViewList |
| std::string | myTerrainObserverViewRecordsFileName |
| std::string | myRightClickedObserverViewName |
| ViewProjection | myRightClickedObserverViewProjection |
| bool | myRightClickedObserverViewIsAttached |
| bool | myRightClickedObserverViewIsAssociated |
| std::string | myObserverViewsFile |
| DtSignalConnectionManager | myConnections |
| bool | myHasSetupObserverRecords |
| bool | myIsDirty |
| bool | myDefaultsDirty |
| bool | myApplicationIsClosing |
| std::list< std::string > | myObserversSuppressDefaultView |
Private Member Functions | |
| DtObserverViewsManager () | |
Friends | |
| class | DtObserverViewsManagerCreator |
|
virtual |
|
private |
Unimplemented default CTOR.
|
protected |
CTOR - Called only by Creator method.
|
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 |
Suppress setting a default view when a terrain saved view file is loaded (by loadTerrainObserverViewsFile()) for a specific observer. This is called when the command line contains a bindObserver parameter; the list of observers is cleared when loadTerrainObserverViewsFile() exits.
|
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.
|
virtual |
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.
|
virtual |
returns the name of the observer view where the gui called the right click event
|
virtual |
set the name of the observer view where the gui called the right click event
|
virtual |
returns the mode of the observer view where the gui called the right click event
|
virtual |
set the mode of the observer view where the gui called the right click event
|
virtual |
returns if the observer view where the gui called the right click event is attached to an entity
|
virtual |
set if the observer view where the gui called the right click event is attached to an entity
|
virtual |
finds an observer view by name and returns if the observer view is attached to an entity
|
virtual |
returns if the observer view where the gui called the right click event is associated to the terrain opened in the scene
|
virtual |
set if the observer view where the gui called the right click event is associated to the terrain opened in the scene
|
virtual |
finds an observer view by name and returns if the observer view is associated to the terrain opened in the scene
|
virtual |
returns an name of the observer view file associate to the current terrain opened in the scene
|
virtual |
set an name of the observer view file associate to the current terrain opened in the scene
|
virtual |
returns if the list has changes that needs to be saved or (re)associated
|
virtual |
sets if the list has changes that needs to be saved
|
virtual |
returns if default views need to be (re)associated
|
virtual |
sets if default views need to be (re)associated
|
virtual |
returns the file name of the observer view file associated to the terrain opened in scene
|
virtual |
sets the file name of the observer view file associated to the terrain opened in scene
|
virtual |
read observer view records send through command line using bdnx file
|
virtual |
find observer view by name and mode. returns true if the observer was found sets it in the state record parameter
|
virtual |
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 |
handle observer mode projection changes
|
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.
|
protectedvirtual |
|
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 |
|
protected |