wiki:visual_object

Version 5 (modified by Torben Dannhauer, 15 years ago) (diff)

--

visual_object

Introduction

All objects in the 3D scene are nodes of the scenegraph. Besides the object management via controlling all object nodes manually, osgVisual provides a module for objects with convenience function for common tasks.

The module "visual_object" allows to manage objects in the scene, with fixed or dynamic position. An visual_object can be positioned in latitude, longitude and altitude, as well in rotations along all three axis. The object itself is not visible, it only provides the functions for managing the object. By adding text labels or geometries, it is visible in the scene.

Overview Convenience Functions

visual_object provides the following convenience variables / functions for simple usage of objects in osgVisual:

  • positioning in lat, lon, alt (position)
  • rotating along all 3 object axis (attitude)
  • scaling along all 3 axis
  • loading/unloading 3D geometry
  • setting geometry rotation offset, if 3D model has wrong axis orientation
  • setting geometry translation offset, if 3D model has wrong coordinate frame origin
  • setting camera translation offset (used by node attached camera manipulator)
  • setting camera rotation offset (used by node attached camera manipulator)
  • adding/removing object_updater (see xx for further information)
  • adding/removing label (see xx for further information)

Technical Implementation

This description does not replace the dive into the sourceode, it should give you only a short overview how it works. Please read the doxygen documentation as reference for all function calls: http://www.osgvisual.org/notyetpublished

Basically, a visual_object is a simple Matrixtransform which has the geometry as childnode.

Object labels

tbd

Object updater

To allow flexible updates of visual_object or derived classes (short: object), an object_updater can be attached to a object. Update are also attachable to other updaters, so updater chains are possible to create.