Hi,

I have created a triangle with, where a,b and c are the (x,y,z) coordinates of 
the 3 vertices

osg::ref_ptr<osg::Geometry> geom = new osg::Geometry;
osg::ref_ptr<osg::Vec3Array> v = new osg::Vec3Array;
geom->setVertexArray( v.get() );
v->push_back(a);
v->push_back(b);
v->push_back(c);
geom->addPrimitiveSet(new osg::DrawArrays( osg::PrimitiveSet::TRIANGLES, 0, 3 ) 
);      
osg::ref_ptr<osg::Geode> geode = new osg::Geode;
geode->addDrawable( geom.get() );
root->addChild(geode.get());

Could you tell me how i can color fill the inside of the triangle so it will be 
a green triangle.


Thank you!

Cheers,
Jody

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21986#21986





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to