AppSwitcher Demo Plugin
The AppSwitcher demo runs two "apps" in the OSG Earth environment. It displays a large point-cloud model of an archaeological dig site from the ArtifactVis plugin over San Diego, and it has a small animation of four planes circling over Florida. Distance to the apps is displayed in a sub-menu of the main CalVR menu, and various features of the apps change based on the distance calculation -- for example, the point-cloud is resource intensive, so it is only rendered when the user is closer than the "near" threshold, and the plane app makes a control for the speed of the planes accessible only when the user is near the planes.
Many of the configuration options for the demo plugin have been moved into the XML config file. Here are some of the settings:
<AppSwitcher value="on"> <!-- provide paths to models used --> <cloudpath value="/path/to/KIS2.ply" /> <planepath value="/path/to/planeIcon.obj" /> <!-- parameters for the ArtifactVis dig site --> <digsite <!-- rotations for the site orientation, in radians --> rotx="1.4" roty="-0.2" rotz="-3.4" lat="32.88211" lon="-117.234271" height="10000.0" scale="500" <!-- kilometers --> threshNear="50" threshFar="500" /> <flyer lat="28.613459" lon="-82.441406" height="10000.0" threshNear = "2000" threshFar = "5000" /> </AppSwitcher>
Once the demo plugin has been loaded into CalVR with OSG Earth enabled, the AppSwitcher menu should be available as an option in the CalVR menu. The dig site and plane distances are approximated in kilometers. Also provided is an indication of what mode the app is in (near/middle/far) based on the threshNear and threshFar options under "digsite" and "flyer" configuration options. If you fly the simulation over Florida, a range selector will be added to choose the speed of the planes when you are within the "near" threshold (and this option will be removed at other times). The planes are rendered in both "near" and "middle" modes, but the dig site is only rendered in "near" mode.
- A lot of the code is exploratory, and could use some cleanup to improve readability and reusability.
- I could not get access to the database for ArtifactVis, and may have been missing some data or configuration files; future projects involving ArtifactVis will likely need this data.
- It would be nice to integrate the point cloud with the earth's terrain.