CanvasScenegraph
Jump to navigation
Jump to search
This article is a stub. You can help the wiki by expanding it. |
Objective
Come up with a new Canvas Element for dealing with scene graphs, for example:
- 3D models
- slaved scenery views
- osgEarth (moving map)
- non-slaved views (CompositeViewer)
Motivation
Background
See also Howto:CameraGroup talks.
Approach
- We will be modifying CameraGroup.cxx to come up with a simplified version of buildCamera() that renders a pre-configured view to a texture (RTT/FBO) and stores it in the STL container named _textureTargets.
- Next, we will be editing CameraGroup.hxx to provide an accessor/getter function taking a std::string& to return an osg::Texture2D from the _textureTargets STL map
- the FGCanvasSystemAdapter needs to be extended accordingly (in both, simgear and flightgear)
- Then, we will come up with a new Canvas::Element inheriting from Canvas::Image to look up said texture and use that texture by adding it to the Canvas
- the next step will involve moving the camera setup to the new Canvas element itself, i.e. out of CameraGroup.cxx
- also, we will want to use live properties to change things like view, viewport, width/height etc (see README.multiscreen)
- support viewmgr properties
Roadmap
- Come up with a simplified version of the CanvasModel element, to use the new CanvasSceneGraph element as its base class
Experiments
References
References
|