16 std::string mode =
"";
18 ReaderWriter::getStringValue(mode, pParametersNode,
"Mode");
23 y = ReaderWriter::getFloatValue(pParametersNode,
"YValue");
30 height = ReaderWriter::getFloatValue(pParametersNode,
"Height");
37 width = ReaderWriter::getFloatValue(pParametersNode,
"Width");
47 virtual void init(osgUtil::LineSegmentIntersector::Intersection* intersection,
52 std::vector<osg::ref_ptr<WG_Wall> >* walls,
53 std::vector<osg::ref_ptr<WG_Point> >* points,
54 osg::Geode* pOSGGeode,
55 osg::Vec3Array* pOSGVertexArray) {
57 if (curWall != NULL) {
58 osg::Vec2 iPoint = osg::Vec2(intersection->getLocalIntersectPoint().x(), intersection->getLocalIntersectPoint().z());
67 float candPosition = Q_cross.length();
72 #define MIN_DISTANCE_FROM_EDGE 3.0
80 for (
unsigned int i=0; i<curWall->
getHoles()->size();i++) {
81 if (candPosition < curWall->getHoles()->at(i).getPosition()) {
82 if ((candPosition + width/2) > (curWall->
getHoles()->at(i).getPosition() - curWall->
getHoles()->at(i).getWidth()/2 - 1.0)) {
88 if ((candPosition - width/2) < (curWall->
getHoles()->at(i).getPosition() + curWall->
getHoles()->at(i).getWidth()/2 + 1.0)) {
98 WG_Hole hole(candPosition, y, height, width, htype);
100 while(i < (
int)curWall->
getHoles()->size()) {
101 if ((*curWall->
getHoles())[i].getPosition() > candPosition)