vsTASKER 7 User Manual
×
Menu
Index

OpenSceneGraph

 
OpenSceneGraph (OSG) viewer facilitates the integration of vsTASKER simulation engine with OSG 3D viewer. 
The Viewer will combine OSG library and output visual with runtime engine, outputting a unique (and possibly standalone) application.
You can get OSG onto www.openscengraph.com website.
 
This viewer can also be used with vsVIEWER and Qt, as both can support an OSG thread.
 
Out of the box, vsTASKER is distributed with the version 3.4.0 of OSG.
OSG DLL are located in /bin/vc[100/140]/osgPlugins.
OSG libraries are located in /lib/vc[100/140]/osg.
 
 The OSG setting is done in the user modifiable /src/OSG/osg_setup.cpp
 This file is compiled with the project when needed.
 
Make sure that the %path% contains a link to OSG dll directory to make the executable run correctly (sim engine will not run otherwise).
 
OpenSceneGraph
1

Main Files

1. Main Files
Wrapper main files (header and source) embedding the simulation engine and managing the OSG main window and loop.
/runtime/osg/vt_runtime_osg.h/cpp are the default wrapper files.
 
2

Master

2. Master
By default, the simulation engine will get the same terrain database (file) as defined in Terrain::3D Editor::OpenSceneGraph window. But often, the terrain that should be displayed on vsTASKER GUI 3D view does not need all the details of the rendered scene. In such case, the GUI and SIM database are different in size and details but should keep the same scale, origin and projection definitions.
 
3

Default

3. Default
Clear the overwriting terrain database file and revert to default one (defined in Terrain::3D Editor::OpenSceneGraph)
 
4

Enabled

4. Enabled
One viewer must be at least enabled for the simulation to compile. Enabling one viewer disable all the other one.
When unchecked, all specific viewer code (and third party software API) are not generated and do not impact the makefile.
 
5

Code Wizard

5. Code Wizard
When this option is checked, the source code of vsTASKER will be processed by the wizard in order to include all the necessary OSG code to make entities displayed automatically on the OSG terrain view. The specific code will be added between special tags that shall not be removed. Once inserted, it will no more be changed and user can amend it.
If unchecked, the wizard will remove all wizard added code, including whatever user has inserted between the tags!
 
Using the wizard has now been deprecated since version 7.1. It can still work but we strongly suggest to use the Model Components, as explained in the Tutorial.
Note that both methods cannot be mixed! To convert a database to use Model Components, first, uncheck the Code Wizard, generate the code then proceed as indicated in the Tutorial.

Wizard only runs at code generation. To add or remove it, check or uncheck then generate the code.
6

HUD

6. HUD
When checked, display some textual data on 2D projection.
The object used is /src/osg/osg_hud.cpp
The function called at each frame is drawImplementation().
Either the 2D OpenGL code is entered here, either it is put into the HUD panel of the HMI property window (in such case, do not disable the HMI to allow code generation).
 
7

Source

7. Source
Header and Source code can be modified into this window or directly from Visual Studio from the solution (or any other text editor).
If code is modified, it will be automatically saved when OK button is depressed.
It is a good idea to save the modified code under another file to keep the original one unchanged. Use button for that.
Refer to "Understanding Runtime" in the Tutorial document of vsTASKER.
 
Do not forget that all provided source code in vsTASKER environment is subject to change from one revision to one another. So, it is a good practice to change the name of any cpp wrapper if any change must be applied on it.
8

Modules

8. Modules
Add here all user defined modules needed for the OSG viewer to compile and link.
All the built-in modules provided in runtime/OSG/src are already included into the makefile by vsTASKER, so no need to include them here.
Add only new OSG modules that expand the viewer capabilities.
 
9

Help

9. Help
Put here all text explanations or documentation content needed to maintain this Viewer.
The Help content is saved but is not inserted into the generated code.
It will be used for the automatic document generation (see Make Documents)