Re: [osg-users] how to draw a Curved Surface on the top of terrain?

2009-08-06 Thread Pan Li
Hi,

thanks for all your replies;
use overlaynode,but the projected texture is not right,
any ideas?thanks!!
attached :
yellow lines-profile of geometry 


Code:
geometry-addPrimitiveSet(new 
osg::DrawArrays(osg::PrimitiveSet::POLYGON,0,v-size())) ;
geode-addChild(geometry);
osgSim::OverlayNode::OverlayTechnique technique
= 
osgSim::OverlayNode::OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY;
osgSim::OverlayNode* overlayNode = new osgSim::OverlayNode(technique);
overlayNode-setOverlaySubgraph(geode);
overlayNode-setOverlayTextureSizeHint(1024);
overlayNode-setOverlayTextureUnit(1);

// insert the OverlayNode between the coordinate system node and its children.
for(unsigned int i=0; iroot-getNumChildren(); ++i)
{
overlayNode-addChild( root-getChild(i) );
}
root-removeChildren(0, root-getNumChildren());
root-addChild(overlayNode);



thanks for your help!

Thank you!

Cheers,
Pan

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



attachment: error.JPG___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] how to draw a Curved Surface on the top of terrain?

2009-08-04 Thread Pan Li
Hi,

1、how to draw a Curved Surface on the top of terrain? like the fig1.
2、how to compute the surface area of the Curved Surface?
any examples??
thanks a lot!!

Cheers,
lipan

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



attachment: groud.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how to draw a Curved Surface on the top of terrain?

2009-08-04 Thread Pan Li
Thanks for your reply!

I want to draw a curved surface dynamic, like the function Mesure area in 
skyline.
now i have the profile line of the curved surface,but just lines,not a polygon 
or a surface.
my issue is: 
how to display the profile line to be a  enclosed area, not lines.
use OverlayNode??

Thank you!

Cheers,
Pan

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org