Version 4 (modified by 14 years ago) (diff) | ,
---|
TracNav
Documentation
- Getting Started
BuildEnvironment...
- Terrain Data
- Architecture
Modules...
osgVisual Configuration via XML
- SerializationNotes
- ExecuterNotes
- CameraControl
- Theories of Terrain Deformation
- Theories of Image Distortion
- Home
About...
- Screenshots
- Downloads
Projection Designer...
- Wiki Edit
- Website Credits/Impressum
<< Back to XML configuration overview
XML configuration of visual_object based models
The complete XML Configuration of a visual_Object is:
<!-- Models can be loaded and placed in the scenery. - objectname: Name of the object to identify it in the scenegraph. - tracking ID: ID to manage which object should be tracked - label: text to label the model with. - dynamic: "yes" to add an standard updater to the model. - position: Position to place the model - attitude: Orientation in degree to place the model - updater [optional]: Channels to use for position, attitude and label update - cameraoffset [optional]: Rotational (in degree) and translational offset for the object mounted camera manipulator to the visual_object - Geometry [optional]: 3D model to display. Leave empty to use model without 3D model. - Geometryoffset [optional]: Rotational offset (in degree) for the loaded 3D model to the visual_object (if the 3D model has a wrong coordinate frame) - Geometryscale [optional]: Scale factors for the loaded 3D model in all three dimensions. --> <model objectname="TestObject" trackingid="1" label="TestText!" dynamic="no"> <position lat="47.8123" lon="12.94088" alt="700.0"></position> <attitude rot_x="0.0" rot_y="0.0" rot_z="0.0"></attitude> <updater> <position lat="" lon="" alt=""></position> <attitude rot_x="" rot_y="" rot_z=""></attitude> <label text=""></label> </updater> <cameraoffset> <translation trans_x="0.0" trans_y="0.0" trans_z="0.0"></translation> <rotation rot_x="0.0" rot_y="0.0" rot_z="0.0"></rotation> </cameraoffset> <geometry filename="../models/saenger1.flt"> <offset rot_x="0.0" rot_y="0.0" rot_z="0.0"></offset> <scalefactor scale_x="1.0" scale_y="1.0" scale_z="1.0"></scalefactor> </geometry> </model>
Position & Attitute
<position lat="47.8123" lon="12.94088" alt="700.0"></position> <attitude rot_x="0.0" rot_y="0.0" rot_z="0.0"></attitude>
Updater
<updater> <position lat="" lon="" alt=""></position> <attitude rot_x="" rot_y="" rot_z=""></attitude> <label text=""></label> </updater>
Camera Offset
<cameraoffset> <translation trans_x="0.0" trans_y="0.0" trans_z="0.0"></translation> <rotation rot_x="0.0" rot_y="0.0" rot_z="0.0"></rotation> </cameraoffset>
Geometry
Using a geometry as well as modifying it with offset or scalefactors is optional.
You can load and display a 3D geometry to visualize the 3D object. You have to specify the filename with an relative or absolute path. If the 3D model has the wrong orientation or wrong size, you can specify an offset rotation or scale factors.
The XML configuration of an gemoetry entry in a visual object is:
<geometry filename="../models/saenger1.flt"> <offset rot_x="0.0" rot_y="0.0" rot_z="0.0"></offset> <scalefactor scale_x="1.0" scale_y="1.0" scale_z="1.0"></scalefactor> </geometry>