VR-Vantage API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
5.1 - The Display Engine

Table of Contents

A VR-Vantage applicationcan be defined as any application that has a display engine in it.

A display engine contains almost all of the major systems and subsystems that are described in this manual. Among the systems that the display engine owns are:

5.1.1 Channels, Windows, and Displays

A display (DtDisplay) owns and manages windows. A display can own zero or more windows. Windows can own zero or more channels.

To see a rendered scene, you need a display configured with at least one channel inside a window. A channel is a area on the screen onto which a camera's view of the scene is rendered. Channels live inside windows. VR-Vantage has the following types of windows:

5.1.1.1 Creating a Display Configuration

You specify the number and organization of displays, windows and channels in a display engine by creating a display configuration. You can create a display configuration programmatically and then have it created by a display engine.

Display configurations must have unique names. The display engine will not implement configurations with duplicate names. For an example of creating a display configuration programmatically, please see the exampleConfiguration example.

5.1.2 Channel Keywords

Channel keyword objects are objects that are created due to the presence of a keyword in a channel's configuration. Possible types of channel keyword objects might include compasses, logos, cockpit displays, message logs, and so on. When a channel gets created, any objects specified by the associated keywords get created, such as a compass, or can be created, such as a cockpit display. If the keyword is removed from a channel by a user, the object gets removed from the scene.

Channel keyword objects are managed by the DtChannelKeywordObject, DtChannelKeywordObjectFactory, and DtChannelKeywordObjectManager classes.

5.1.2.1 DtChannelKeywordObject

DtChannelKeywordObject is an abstract class that provides a common interface for channel keyword objects.

DtChannelKeywordObjects are created in a factory using DtChannelKeywordObjectCreators. DtChannelKeywordObjectCreator has a create() method that takes the same arguments as DtChannelKeywordObject, except for the keyword parameter. The creator class itself provides a keyword to the DtChannelKeywordObject constructor via a static keyword() method. In this way, the keywords are tied to the creator objects, rather than just being "magic strings" that appear in the system. For details about this class's methods, please see DtChannelKeywordObjectCreator.

5.1.2.2 DtChannelKeywordObjectFactory

The DtChannelKeywordObjectFactory is a singleton class that allows you to register channel keyword object creators, and which is used by the DtChannelKeywordObjectManager to create channel keyword objects. For details about this class's methods, please see DtChannelKeywordObjectFactory.

5.1.2.3 DtChannelKeywordObjectManager

The DtChannelKeywordObjectManager is a singleton object with an instance() accessor. The instance() accessor uses a registered creator to create the manager (registered in vrvCore.cxx). DtDe instantiates the class after initialization (and before postInitialize) so that it exists before any channels are realized.

Note
The manager assumes it will exist by the time the first channel is created - it does not search for existing channels when it is constructed.

The DtChannelKeywordObjectManager listens to the display engine's signal_channelConfigurationModified, signal_channelToBeDestroyed, and signal_windowConfigurationModified as well as the DtChannelManagerSignaler's signal_channelCreated signals to manage the display of channel keyword objects within VR-Vantage.

When a channel is added, DtChannelKeywordObjectManager looks for keywords in the configuration for which there are entries in the DtChannelKeywordObjectFactory and if they exist, creates a channel keyword object for that channel.

When a channel configuration is modified, DtChannelKeywordObjectManager determines if the channel needs a channel keyword object added or removed. If channel keyword objects already exist for that channel, the objects will be notified via their channelConfigurationModified() methods. If an object is to be removed, DtChannelKeywordObjectManager calls the object's objectToBeDestroyed() method and then deletes or removes it. Additionally, it checks to see if the channel name has changed. If it has, it adjusts the manager's maps for looking up the channel keyword objects on a channel by display/window/channel name.

When a channel is destroyed, DtChannelKeywordObjectManager determines if it has any channel keyword objects for that for that channel and if so, destroy them.

When a window configuration changes, DtChannelKeywordObjectManager notifies any channel keyword objects in that window by calling their windowConfigurationChanged() methods. It also checks to see if the window's name has changed. If it has, it adjusts the manager's maps for looking up the channel keyword objects on a channel by display/window/channel name.

DtChannelKeywordObjectManager maintains an std::map of channelName :: windowName :: displayName to keyword / DtChannelKeywordObject pairs for each channel keyword object created. Given a channelName :: windowName :: displayName, the map provides a list of DtChannelKeywordObjects, one for each keyword that exists. It will also maintain a map of displayName::windowName to a list of channelName :: windowName :: displayName strings. This map makes it possible to get all the channel keys for channels that have channel keyword objects on them, given a window key.

[Home] [Top of Page] [Distributed Rendering >>]



Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)