Canvas sandbox: Difference between revisions

Jump to navigation Jump to search
m
Line 65: Line 65:
osg::Geode* sphereGeode = new osg::Geode();
osg::Geode* sphereGeode = new osg::Geode();
sphereGeode->addDrawable(sphereDrawable);
sphereGeode->addDrawable(sphereDrawable);
</syntaxhighlight>


</syntaxhighlight>
Compared to SVG/OpenVG (ShivaVG) based drawing, the main benefit is that we can create and display 3D objects, using correct orientation/projection in a 3D scene.
 
The code shown above, can simple be added to the constructor of the canvas element, but we will want to render it to a texture using a PositionAttitudeTransformMatric and map those to properties in the sub-tree of the canvas element.


* http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00753.html
* http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00753.html
Line 73: Line 76:
* http://trac.openscenegraph.org/projects/osg//wiki/Support/Tutorials/BasicGeometry
* http://trac.openscenegraph.org/projects/osg//wiki/Support/Tutorials/BasicGeometry
* http://trac.openscenegraph.org/projects/osg//browser/OpenSceneGraph/trunk/examples/osgshape/osgshape.cpp
* http://trac.openscenegraph.org/projects/osg//browser/OpenSceneGraph/trunk/examples/osgshape/osgshape.cpp
{{Custom_Canvas_Element
|baseclass=Element
|elementName=Shape
|elementTitle=Canvas osg::Shape
|description=Stub for exposing OSG::shapeDrawable support as a dedicated Canvas element
}}


== CanvasShapefile ==
== CanvasShapefile ==

Navigation menu