![]() |
VR-Forces 4.8 Class Documentation
|
Prototypes of utility functions for exampleMultipleChannelText. More...
Go to the source code of this file.
Namespaces | |
| makVrv | |
| Declare & export the plugin initialization function (bool initDeModule(DtDe* de)) | |
Functions | |
| void | createCustomOverlay (makVrv::DtDe &de, makVrv::DtChannel *channel, makVrv::DtOverlayManager::DefaultOverlays layerId) |
| Create a custom overlay on the specified channel. More... | |
| void | createCustomMultiChannelOverlay (makVrv::DtDe &de, makVrv::DtChannelManager::ChannelMap &channels, makVrv::DtOverlayManager::DefaultOverlays layerId) |
| Create a custom overlay that will be displayed on all channels. More... | |
| void | putTextOnOverlay (makVrv::DtDe &de, makVrv::DtOverlayRenderer &renderer, const std::string &text, const DtVector &position, makVrv::DtFontSP font) |
| Place a 2D graphic (in this case text) onto an overlay. More... | |
| void | create2dOverlays (makVrv::DtDe &de) |
| Helper function to call createCustomOverlay() and createCustomMultiChannelOverlay(). More... | |
| void | populate2dOverlays (makVrv::DtDe &de) |
| Populate the 2D Overlays with different text for different overlays. More... | |
| makVrv::DtChannelConfiguration | makeChannelConfiguration (makVrv::DtDe &de, double left=0, double right=100, double bottom=0, double top=100) |
| The remainder of these functions here are unrelated to overlays; they are used to create the windows, channels, and place an object into the scene. More... | |
| makVrv::DtWindowConfiguration | makeWindowConfiguration (makVrv::DtDe &de, int x=100, int y=100) |
| Helper function creates a window-configuration with a default name. More... | |
| makVrv::DtDisplayConfiguration | makeDisplayConfiguration (makVrv::DtDe &de, const std::string &name="My Display Configuration") |
| Helper function creates a display-configuration. More... | |
| std::string | registerModelDefinition (makVrv::DtDe &de, const std::string &dataFile) |
| Helper function populates a makVrv::DtModelDefinitionManager with a model- description for later use. More... | |
| void | addModelToTheScene (makVrv::DtDe &de, const std::string &modelName) |
| Helper function to load a geometry file and add it to the scene. More... | |
| void | loadTheScene (makVrv::DtDe &de) |
| Helper function to load all the models into the scene. More... | |
Prototypes of utility functions for exampleMultipleChannelText.
| void createCustomOverlay | ( | makVrv::DtDe & | de, |
| makVrv::DtChannel * | channel, | ||
| makVrv::DtOverlayManager::DefaultOverlays | layerId | ||
| ) |
Create a custom overlay on the specified channel.
| void createCustomMultiChannelOverlay | ( | makVrv::DtDe & | de, |
| makVrv::DtChannelManager::ChannelMap & | channels, | ||
| makVrv::DtOverlayManager::DefaultOverlays | layerId | ||
| ) |
Create a custom overlay that will be displayed on all channels.
| void putTextOnOverlay | ( | makVrv::DtDe & | de, |
| makVrv::DtOverlayRenderer & | renderer, | ||
| const std::string & | text, | ||
| const DtVector & | position, | ||
| makVrv::DtFontSP | font | ||
| ) |
Place a 2D graphic (in this case text) onto an overlay.
| void create2dOverlays | ( | makVrv::DtDe & | de | ) |
Helper function to call createCustomOverlay() and createCustomMultiChannelOverlay().
| void populate2dOverlays | ( | makVrv::DtDe & | de | ) |
Populate the 2D Overlays with different text for different overlays.
This function shows how to retrieve a default channel-specific overlay (using the channel ptr) and custom overlays (using the custom overlays' layer ids). It calls putTextOnOverlay() for each of the overlay types outlined in this example
| makVrv::DtChannelConfiguration makeChannelConfiguration | ( | makVrv::DtDe & | de, |
| double | left = 0, |
||
| double | right = 100, |
||
| double | bottom = 0, |
||
| double | top = 100 |
||
| ) |
The remainder of these functions here are unrelated to overlays; they are used to create the windows, channels, and place an object into the scene.
They do provide useful examples of how these can be done through the API. Helper function creates a channel-configuration with a default name. Channel parameter values are percentages of the windows dimensions. This example creates a separate observer for each channel because the observer identifies the model-set to be rendered. Without creating separate observers, each channel would render exactly the same scene.
| makVrv::DtWindowConfiguration makeWindowConfiguration | ( | makVrv::DtDe & | de, |
| int | x = 100, |
||
| int | y = 100 |
||
| ) |
Helper function creates a window-configuration with a default name.
The windows position must be specified, the number of channels is optional. These windows can be configured with one, two, three or four channels.
| makVrv::DtDisplayConfiguration makeDisplayConfiguration | ( | makVrv::DtDe & | de, |
| const std::string & | name = "My Display Configuration" |
||
| ) |
Helper function creates a display-configuration.
This configuration creates one window each with two channels.
| std::string registerModelDefinition | ( | makVrv::DtDe & | de, |
| const std::string & | dataFile | ||
| ) |
Helper function populates a makVrv::DtModelDefinitionManager with a model- description for later use.
Generally, the manager loads all the model-descriptions from the disk, however, this example demonstrates how it is populated through code. This function returns the unique name generated for the model definition.
| void addModelToTheScene | ( | makVrv::DtDe & | de, |
| const std::string & | modelName | ||
| ) |
Helper function to load a geometry file and add it to the scene.
This function creates a makVrv::DtSceneObject which is used to position and move models around the scene. A makVrv::DtOsgSimpleModel is created to manage the model geometry. The makVrv::DtOsgSimpleModel is added to the makVrv::DtSceneObject to place the model geometry in to the scene.
| void loadTheScene | ( | makVrv::DtDe & | de | ) |
Helper function to load all the models into the scene.
For each model filename, this function creates a model-definition, then creates a scene-object to load that definition into the scene.