void IndexMeshVisitor::addDrawElements(IndexList& data, osg::PrimitiveSet::Mode mode, osg::Geometry::PrimitiveSetList& primitives, std::string userValue) { if(!data.empty()) { osg::DrawElementsUInt* elements = new osg::DrawElementsUInt(mode, data.begin(), data.end()); if(!userValue.empty()) { elements->setUserValue(userValue, true); } primitives.push_back(elements); } }
inline void operator()(unsigned int p1, unsigned int p2, unsigned int p3) { if (_remapIndices.empty()) { _in_indices.push_back(p1); _in_indices.push_back(p2); _in_indices.push_back(p3); } else { _in_indices.push_back(_remapIndices[p1]); _in_indices.push_back(_remapIndices[p2]); _in_indices.push_back(_remapIndices[p3]); } }