void set(const LineSegment& seg,float ratio=FLT_MAX) { _seg=new LineSegment(seg); _hit=false; _index = 0; _ratio = ratio; _s = _seg->start(); _d = _seg->end()-_seg->start(); _length = _d.length(); _d /= _length; }
void appendLineStrip(osg::Vec3Array* src) { int size = _array->size(); _array->insert(_array->end(), src->begin(), src->end()); _geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINE_STRIP, size, src->size())); }