[osg-users] how to draw a Curved Surface?
Bean Bean
beannnv5 at gmail.com
Mon Nov 23 23:58:45 PST 2015
Hi Sebastian,
I use the way about your method, but I get zero point.
I may use wrong. Here is the code:
const float x = v1.x();
const float y = v1.y();
const float look_offSet = 10.0f;
osg::ref_ptr<osgUtil::PolytopeIntersector> polyIt = new
osgUtil::PolytopeIntersector(osgUtil::Intersector::PROJECTION, x -
look_offSet , y - look_offSet, x + look_offSet, y + look_offSet );
polyIt->setDimensionMask(osgUtil::PolytopeIntersector::DimZero); // only
pick points
osgUtil::IntersectionVisitor iv(polyIt );
m_OSG->getViewer()->getCamera()->accept(iv);
osg::ref_ptr<osg::Vec3Array> v = new osg::Vec3Array;
if (polyIt->containsIntersections()) //this is "false" Why???
{
.....
}
cheers,
Bean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151124/bda587a2/attachment-0003.htm>
More information about the osg-users
mailing list