I am looking to figure out how to give thickness to line segments. I am
creating them as follows
Code:
osg::ref_ptr<osg::Geometry> geom = new osg::Geometry;
osg::ref_ptr<osg::DrawArrays> drawArrayLines = new
osg::DrawArrays(osg::PrimitiveSet::LINE_STRIP);
osg::ref_ptr<osg::Vec3Array> vertexData = new osg::Vec3Array;
geom->addPrimitiveSet(drawArrayLines);
geom->setVertexArray(vertexData);
//loop through points
vertexData->push_back(osg::Vec3d(point.X,point.Y,point.Z));
//
drawArrayLines->setFirst(0);
drawArrayLines->setCount(vertexData->size());
// Add the Geometry (Drawable) to a Geode and return the Geode.
osg::ref_ptr<osg::Geode> geode = new osg::Geode;
geode->addDrawable( geom.get() );
How can I give these line segments thickness and color? Also, is this the best
way to plot line segments?
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=40542#40542
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org