Canvas troubleshooting: Difference between revisions

Jump to navigation Jump to search
m
Line 687: Line 687:


=== Experimenting with Osg::Simplifier  ===
=== Experimenting with Osg::Simplifier  ===
The default simplifier[http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00760.html] algorithm implemented in OSG is focused on terrain/mesh simplification and is typically invoked like this:
<syntaxhighlight lang="cpp">
osgUtil::Simplifier simplifier;
simplifier->setSampleRatio(0.7f);
simplifier->setMaximumError(3.0f);
// invoke the simplifier for the current node (Canvas element)
_transform->accept(simplifier);
</syntaxhighlight>
We can extend each Canvas element inheriting from the CanvasElement  base class to have its own osg::Simplifier sub-class implementing 2D simplification using CGAL.  
We can extend each Canvas element inheriting from the CanvasElement  base class to have its own osg::Simplifier sub-class implementing 2D simplification using CGAL.  
Such nodes (CanvasGroups) could in turn be used for procedurally creating LOD nodes for different viewer distances.
Such nodes (CanvasGroups) could in turn be used for procedurally creating LOD nodes for different viewer distances.

Navigation menu