[osg-users] different materials for a geometry and highlight
Gianni Ambrosio
g.ambrosio+osg at gmail.com
Fri Sep 16 09:02:51 PDT 2016
Code:
osg::Geometry* buildGeometry() {
osg::Geometry* geometry = new osg::Geometry;
geometry->setVertexArray(buildVertices());
geometry->setColorArray(buildColors(), osg::Array::BIND_PER_PRIMITIVE_SET);
std::vector<osg::DrawElementsUInt*> elements = buildElements();
for (std::vector<osg::DrawElementsUInt*>::iterator i = elements.begin(); i != elements.end(); ++i) {
geometry->addPrimitiveSet(*i);
}
return geometry;
}
When I pick a triangle, is there a way from the information stored into a osgUtil::LineSegmentIntersector::Intersection to get the related primitive set?
Regards,
Gianni
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68630#68630
More information about the osg-users
mailing list