14 virtual void init(osgUtil::LineSegmentIntersector::Intersection* intersection,
19 std::vector<osg::ref_ptr<WG_Wall> >* walls,
20 std::vector<osg::ref_ptr<WG_Point> >* points,
21 osg::Geode* pOSGGeode,
22 osg::Vec3Array* pOSGVertexArray) {
24 if (curWall != NULL) {
26 osg::Vec2 iPoint = osg::Vec2(intersection->getLocalIntersectPoint().x(), intersection->getLocalIntersectPoint().z());
28 float length = vector.length();
30 unsigned int delIndex = curWall->
getHoles()->size();
33 for (
unsigned int i = 0; i < curWall->
getHoles()->size(); i++) {
34 curLength = abs(length - curWall->
getHoles()->at(i).getPosition());
35 if (curLength < minLength) {
36 minLength = curLength;
42 if (delIndex < curWall->getHoles()->size()) {