Converted osg::notify to OSG_INFO etc.

This commit is contained in:
Robert Osfield
2010-05-28 16:09:29 +00:00
parent d187445670
commit bcbfed5c8b
11 changed files with 253 additions and 253 deletions

View File

@@ -77,7 +77,7 @@ struct DistanceHeightCalculator
_radiusList.push_back(newRadius);
_distanceList.push_back(distance);
// osg::notify(osg::NOTICE)<<" newVector = "<<newVector<<" newRadius = "<<newRadius<<" distanceIncrement="<<distanceIncrement<<std::endl;
// OSG_NOTICE<<" newVector = "<<newVector<<" newRadius = "<<newRadius<<" distanceIncrement="<<distanceIncrement<<std::endl;
prevRadius = newRadius;
}
@@ -122,7 +122,7 @@ struct DistanceHeightCalculator
distance = oldDistance;
osg::notify(osg::NOTICE)<<" new distance = "<<distance<<" old = "<<oldDistance<<" delta = "<<oldDistance-distance<<std::endl;
OSG_NOTICE<<" new distance = "<<distance<<" old = "<<oldDistance<<" delta = "<<oldDistance-distance<<std::endl;
#endif
}
@@ -199,7 +199,7 @@ struct Point : public osg::Referenced, public DistanceHeightXYZ
Point(double d, double h, const osg::Vec3d& pos):
DistanceHeightXYZ(d,h,pos)
{
//osg::notify(osg::NOTICE)<<"Point::Point distance="<<distance<<" height="<<height<<" position="<<position<<std::endl;
//OSG_NOTICE<<"Point::Point distance="<<distance<<" height="<<height<<" position="<<position<<std::endl;
}
Point(const Point& point):
@@ -224,8 +224,8 @@ struct Segment
_p2 = p1;
}
//osg::notify(osg::NOTICE).precision(12);
//osg::notify(osg::NOTICE)<<"Segment::Segment p1 = "<<(_p1->distance)<<" "<<(_p1->height)<<" p2 = "<<(_p2->distance)<<" "<<(_p2->height)<<std::endl;
//OSG_NOTICE.precision(12);
//OSG_NOTICE<<"Segment::Segment p1 = "<<(_p1->distance)<<" "<<(_p1->height)<<" p2 = "<<(_p2->distance)<<" "<<(_p2->height)<<std::endl;
}
@@ -321,7 +321,7 @@ struct Segment
double div = D*F - B*H;
if (div==0.0)
{
osg::notify(osg::NOTICE)<<"ElevationSlideUtils::Segment::createIntersectionPoint(): error Segments are parallel."<<std::endl;
OSG_NOTICE<<"ElevationSlideUtils::Segment::createIntersectionPoint(): error Segments are parallel."<<std::endl;
return _p2.get();
}
@@ -329,19 +329,19 @@ struct Segment
if (r<0.0)
{
osg::notify(osg::NOTICE)<<"ElevationSlideUtils::Segment::createIntersectionPoint(): error intersection point outwith segment, r ="<<r<<std::endl;
OSG_NOTICE<<"ElevationSlideUtils::Segment::createIntersectionPoint(): error intersection point outwith segment, r ="<<r<<std::endl;
return _p1.get();
}
if (r>1.0)
{
osg::notify(osg::NOTICE)<<"ElevationSlideUtils::Segment::createIntersectionPoint(): error intersection point outwith segment, r ="<<r<<std::endl;
OSG_NOTICE<<"ElevationSlideUtils::Segment::createIntersectionPoint(): error intersection point outwith segment, r ="<<r<<std::endl;
return _p2.get();
}
// osg::notify(osg::NOTICE)<<"ElevationSlideUtils::Segment::createIntersectionPoint(): r="<<r<<std::endl;
// osg::notify(osg::NOTICE)<<"\tp1 = "<<_p1->distance<<" "<<_p1->height<<" p2 = "<<_p2->distance<<" "<<_p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<"\trrhs.p1 = "<<rhs._p1->distance<<" "<<rhs._p1->height<<" p2 = "<<rhs._p2->distance<<" "<<rhs._p2->height<<std::endl;
// OSG_NOTICE<<"ElevationSlideUtils::Segment::createIntersectionPoint(): r="<<r<<std::endl;
// OSG_NOTICE<<"\tp1 = "<<_p1->distance<<" "<<_p1->height<<" p2 = "<<_p2->distance<<" "<<_p2->height<<std::endl;
// OSG_NOTICE<<"\trrhs.p1 = "<<rhs._p1->distance<<" "<<rhs._p1->height<<" p2 = "<<rhs._p2->distance<<" "<<rhs._p2->height<<std::endl;
return new Point(A + B*r, C + D*r, _p1->position + (_p2->position - _p1->position)*r);
}
@@ -389,14 +389,14 @@ struct LineConstructor
void report()
{
osg::notify(osg::NOTICE)<<"Number of segments = "<<_segments.size()<<std::endl;
OSG_NOTICE<<"Number of segments = "<<_segments.size()<<std::endl;
for(SegmentSet::iterator itr = _segments.begin();
itr != _segments.end();
++itr)
{
const Segment& seg = *itr;
osg::notify(osg::NOTICE)<<"p1 = "<<(seg._p1->distance)<<" "<<(seg._p1->height)<<" p2 = "<<(seg._p2->distance)<<" "<<(seg._p2->height)<<"\t";
OSG_NOTICE<<"p1 = "<<(seg._p1->distance)<<" "<<(seg._p1->height)<<" p2 = "<<(seg._p2->distance)<<" "<<(seg._p2->height)<<"\t";
SegmentSet::iterator nextItr = itr;
++nextItr;
@@ -405,21 +405,21 @@ struct LineConstructor
Segment::Classification classification = itr->compare(*nextItr);
switch(classification)
{
case(Segment::IDENTICAL): osg::notify(osg::NOTICE)<<"i"; break;
case(Segment::SEPERATE): osg::notify(osg::NOTICE)<<"s"<<std::endl; break;
case(Segment::JOINED): osg::notify(osg::NOTICE)<<"j"; break;
case(Segment::OVERLAPPING): osg::notify(osg::NOTICE)<<"o"; break;
case(Segment::ENCLOSING): osg::notify(osg::NOTICE)<<"E"; break;
case(Segment::ENCLOSED): osg::notify(osg::NOTICE)<<"e"; break;
case(Segment::UNCLASSIFIED): osg::notify(osg::NOTICE)<<"U"; break;
case(Segment::IDENTICAL): OSG_NOTICE<<"i"; break;
case(Segment::SEPERATE): OSG_NOTICE<<"s"<<std::endl; break;
case(Segment::JOINED): OSG_NOTICE<<"j"; break;
case(Segment::OVERLAPPING): OSG_NOTICE<<"o"; break;
case(Segment::ENCLOSING): OSG_NOTICE<<"E"; break;
case(Segment::ENCLOSED): OSG_NOTICE<<"e"; break;
case(Segment::UNCLASSIFIED): OSG_NOTICE<<"U"; break;
}
}
osg::notify(osg::NOTICE)<<std::endl;
OSG_NOTICE<<std::endl;
}
osg::notify(osg::NOTICE)<<std::endl;
OSG_NOTICE<<std::endl;
if (_em.valid())
{
@@ -443,7 +443,7 @@ struct LineConstructor
if (delta1>0.0 || delta2>0.0)
{
osg::notify(osg::NOTICE)<<" "<<&s<<" computed height delta ="<<delta1<<" delta2= "<<delta2<<std::endl;
OSG_NOTICE<<" "<<&s<<" computed height delta ="<<delta1<<" delta2= "<<delta2<<std::endl;
}
}
}
@@ -466,9 +466,9 @@ struct LineConstructor
++nextItr;
Segment::Classification classification = nextItr != _segments.end() ? itr->compare(*nextItr) : Segment::UNCLASSIFIED;
// if (classification>=Segment::OVERLAPPING) osg::notify(osg::NOTICE)<<std::endl;
// else osg::notify(osg::NOTICE)<<".";
// osg::notify(osg::NOTICE).precision(12);
// if (classification>=Segment::OVERLAPPING) OSG_NOTICE<<std::endl;
// else OSG_NOTICE<<".";
// OSG_NOTICE.precision(12);
while (classification>=Segment::OVERLAPPING)
{
@@ -495,7 +495,7 @@ struct LineConstructor
if (distance_between < epsilon)
{
// osg::notify(osg::NOTICE)<<"OVERLAPPING : distance_between acceptable "<<distance_between<<std::endl;
// OSG_NOTICE<<"OVERLAPPING : distance_between acceptable "<<distance_between<<std::endl;
Segment newSeg(lhs._p2.get(), rhs._p2.get());
_segments.insert(newSeg);
@@ -506,18 +506,18 @@ struct LineConstructor
}
else
{
// osg::notify(osg::NOTICE)<<"OVERLAPPING : distance_between unacceptable "<<distance_between<<std::endl;
// OSG_NOTICE<<"OVERLAPPING : distance_between unacceptable "<<distance_between<<std::endl;
double dh1 = lhs.deltaHeight(*rhs._p1);
double dh2 = -rhs.deltaHeight(*lhs._p2);
if (dh1 * dh2 < 0.0)
{
// osg::notify(osg::NOTICE)<<"OVERLAPPING : crossing "<<dh1<<" "<<dh2<<std::endl;
// osg::notify(osg::NOTICE)<<" lhs_p1 "<<lhs._p1->distance<<" "<<lhs._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" lhs_p2 "<<lhs._p2->distance<<" "<<lhs._p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<" rhs_p1 "<<rhs._p1->distance<<" "<<rhs._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" rhs_p2 "<<rhs._p2->distance<<" "<<rhs._p2->height<<std::endl;
// OSG_NOTICE<<"OVERLAPPING : crossing "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<" lhs_p1 "<<lhs._p1->distance<<" "<<lhs._p1->height<<std::endl;
// OSG_NOTICE<<" lhs_p2 "<<lhs._p2->distance<<" "<<lhs._p2->height<<std::endl;
// OSG_NOTICE<<" rhs_p1 "<<rhs._p1->distance<<" "<<rhs._p1->height<<std::endl;
// OSG_NOTICE<<" rhs_p2 "<<rhs._p2->distance<<" "<<rhs._p2->height<<std::endl;
Point* cp = lhs.createIntersectionPoint(rhs);
@@ -541,11 +541,11 @@ struct LineConstructor
}
else if (dh1 <= 0.0 && dh2 <= 0.0)
{
// osg::notify(osg::NOTICE)<<"++ OVERLAPPING : rhs below lhs "<<dh1<<" "<<dh2<<std::endl;
// osg::notify(osg::NOTICE)<<" lhs_p1 "<<lhs._p1->distance<<" "<<lhs._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" lhs_p2 "<<lhs._p2->distance<<" "<<lhs._p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<" rhs_p1 "<<rhs._p1->distance<<" "<<rhs._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" rhs_p2 "<<rhs._p2->distance<<" "<<rhs._p2->height<<std::endl;
// OSG_NOTICE<<"++ OVERLAPPING : rhs below lhs "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<" lhs_p1 "<<lhs._p1->distance<<" "<<lhs._p1->height<<std::endl;
// OSG_NOTICE<<" lhs_p2 "<<lhs._p2->distance<<" "<<lhs._p2->height<<std::endl;
// OSG_NOTICE<<" rhs_p1 "<<rhs._p1->distance<<" "<<rhs._p1->height<<std::endl;
// OSG_NOTICE<<" rhs_p2 "<<rhs._p2->distance<<" "<<rhs._p2->height<<std::endl;
Segment newSeg(rhs.createPoint(lhs._p2->distance), rhs._p2.get());
@@ -554,16 +554,16 @@ struct LineConstructor
nextItr = itr;
++nextItr;
// osg::notify(osg::NOTICE)<<" newSeg_p1 "<<newSeg._p1->distance<<" "<<newSeg._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" newSeg_p2 "<<newSeg._p2->distance<<" "<<newSeg._p2->height<<std::endl;
// OSG_NOTICE<<" newSeg_p1 "<<newSeg._p1->distance<<" "<<newSeg._p1->height<<std::endl;
// OSG_NOTICE<<" newSeg_p2 "<<newSeg._p2->distance<<" "<<newSeg._p2->height<<std::endl;
}
else if (dh1 >= 0.0 && dh2 >= 0.0)
{
// osg::notify(osg::NOTICE)<<"++ OVERLAPPING : rhs above lhs "<<dh1<<" "<<dh2<<std::endl;
// osg::notify(osg::NOTICE)<<" lhs_p1 "<<lhs._p1->distance<<" "<<lhs._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" lhs_p2 "<<lhs._p2->distance<<" "<<lhs._p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<" rhs_p1 "<<rhs._p1->distance<<" "<<rhs._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" rhs_p2 "<<rhs._p2->distance<<" "<<rhs._p2->height<<std::endl;
// OSG_NOTICE<<"++ OVERLAPPING : rhs above lhs "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<" lhs_p1 "<<lhs._p1->distance<<" "<<lhs._p1->height<<std::endl;
// OSG_NOTICE<<" lhs_p2 "<<lhs._p2->distance<<" "<<lhs._p2->height<<std::endl;
// OSG_NOTICE<<" rhs_p1 "<<rhs._p1->distance<<" "<<rhs._p1->height<<std::endl;
// OSG_NOTICE<<" rhs_p2 "<<rhs._p2->distance<<" "<<rhs._p2->height<<std::endl;
Segment newSeg(lhs._p1.get(), lhs.createPoint(rhs._p1->distance));
@@ -574,24 +574,24 @@ struct LineConstructor
nextItr = itr;
++nextItr;
// osg::notify(osg::NOTICE)<<" newSeg_p1 "<<newSeg._p1->distance<<" "<<newSeg._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" newSeg_p2 "<<newSeg._p2->distance<<" "<<newSeg._p2->height<<std::endl;
// OSG_NOTICE<<" newSeg_p1 "<<newSeg._p1->distance<<" "<<newSeg._p1->height<<std::endl;
// OSG_NOTICE<<" newSeg_p2 "<<newSeg._p2->distance<<" "<<newSeg._p2->height<<std::endl;
}
else
{
osg::notify(osg::NOTICE)<<"OVERLAPPING : unidentified "<<dh1 <<" "<<dh2<<std::endl;
osg::notify(osg::NOTICE)<<" lhs_p1 "<<lhs._p1->distance<<" "<<lhs._p1->height<<std::endl;
osg::notify(osg::NOTICE)<<" lhs_p2 "<<lhs._p2->distance<<" "<<lhs._p2->height<<std::endl;
osg::notify(osg::NOTICE)<<" rhs_p1 "<<rhs._p1->distance<<" "<<rhs._p1->height<<std::endl;
osg::notify(osg::NOTICE)<<" rhs_p2 "<<rhs._p2->distance<<" "<<rhs._p2->height<<std::endl;
OSG_NOTICE<<"OVERLAPPING : unidentified "<<dh1 <<" "<<dh2<<std::endl;
OSG_NOTICE<<" lhs_p1 "<<lhs._p1->distance<<" "<<lhs._p1->height<<std::endl;
OSG_NOTICE<<" lhs_p2 "<<lhs._p2->distance<<" "<<lhs._p2->height<<std::endl;
OSG_NOTICE<<" rhs_p1 "<<rhs._p1->distance<<" "<<rhs._p1->height<<std::endl;
OSG_NOTICE<<" rhs_p2 "<<rhs._p2->distance<<" "<<rhs._p2->height<<std::endl;
++nextItr;
}
}
}
else
{
osg::notify(osg::NOTICE)<<" OVERLAPPING problem, !rhs_p1_inside || !lhs_p2_inside - unhandled case" <<std::endl;
OSG_NOTICE<<" OVERLAPPING problem, !rhs_p1_inside || !lhs_p2_inside - unhandled case" <<std::endl;
++nextItr;
}
@@ -609,7 +609,7 @@ struct LineConstructor
if (dh1<=epsilon && dh2<=epsilon)
{
// osg::notify(osg::NOTICE)<<"+++ ENCLOSING: ENCLOSING is above enclosed "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<"+++ ENCLOSING: ENCLOSING is above enclosed "<<dh1<<" "<<dh2<<std::endl;
_segments.erase(nextItr);
@@ -626,7 +626,7 @@ struct LineConstructor
if (d_left < epsilon && d_right < epsilon)
{
// treat ENCLOSED as ENCLOSING.
// osg::notify(osg::NOTICE)<<" Treat enclosed above as enclosing "<<std::endl;
// OSG_NOTICE<<" Treat enclosed above as enclosing "<<std::endl;
nextItr = itr;
++nextItr;
@@ -639,14 +639,14 @@ struct LineConstructor
}
else if (d_left < epsilon)
{
// osg::notify(osg::NOTICE)<<"ENCLOSING: ENCLOSING is below enclosed "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<"ENCLOSING: ENCLOSING is below enclosed "<<dh1<<" "<<dh2<<std::endl;
//
// osg::notify(osg::NOTICE)<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
// OSG_NOTICE<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// OSG_NOTICE<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// OSG_NOTICE<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// OSG_NOTICE<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
//
// osg::notify(osg::NOTICE)<<" Replace enclosing with right section"<<std::endl;
// OSG_NOTICE<<" Replace enclosing with right section"<<std::endl;
Segment newSeg(enclosing.createPoint(enclosed._p2->distance), enclosing._p2.get());
nextItr = itr;
@@ -658,19 +658,19 @@ struct LineConstructor
itr = nextItr;
++nextItr;
// osg::notify(osg::NOTICE)<<" newSeg_p1 "<<newSeg._p1->distance<<" "<<newSeg._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" newSeg_p2 "<<newSeg._p2->distance<<" "<<newSeg._p2->height<<std::endl;
// OSG_NOTICE<<" newSeg_p1 "<<newSeg._p1->distance<<" "<<newSeg._p1->height<<std::endl;
// OSG_NOTICE<<" newSeg_p2 "<<newSeg._p2->distance<<" "<<newSeg._p2->height<<std::endl;
}
else if (d_right < epsilon)
{
// osg::notify(osg::NOTICE)<<"ENCLOSING: ENCLOSING is below enclosed "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<"ENCLOSING: ENCLOSING is below enclosed "<<dh1<<" "<<dh2<<std::endl;
//
// osg::notify(osg::NOTICE)<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
// OSG_NOTICE<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// OSG_NOTICE<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// OSG_NOTICE<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// OSG_NOTICE<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
//
// osg::notify(osg::NOTICE)<<" Replace enclosing with left section"<<std::endl;
// OSG_NOTICE<<" Replace enclosing with left section"<<std::endl;
Segment newSeg(enclosing._p1.get(), enclosing.createPoint(enclosed._p1->distance) );
@@ -681,19 +681,19 @@ struct LineConstructor
nextItr = itr;
++nextItr;
// osg::notify(osg::NOTICE)<<" newSeg_p1 "<<newSeg._p1->distance<<" "<<newSeg._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" newSeg_p2 "<<newSeg._p2->distance<<" "<<newSeg._p2->height<<std::endl;
// OSG_NOTICE<<" newSeg_p1 "<<newSeg._p1->distance<<" "<<newSeg._p1->height<<std::endl;
// OSG_NOTICE<<" newSeg_p2 "<<newSeg._p2->distance<<" "<<newSeg._p2->height<<std::endl;
}
else
{
// osg::notify(osg::NOTICE)<<"ENCLOSING: ENCLOSING is below enclosed "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<"ENCLOSING: ENCLOSING is below enclosed "<<dh1<<" "<<dh2<<std::endl;
//
// osg::notify(osg::NOTICE)<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
// OSG_NOTICE<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// OSG_NOTICE<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// OSG_NOTICE<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// OSG_NOTICE<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
//
// osg::notify(osg::NOTICE)<<" Replace enclosing with left and right sections"<<std::endl;
// OSG_NOTICE<<" Replace enclosing with left and right sections"<<std::endl;
Segment newSegLeft(enclosing._p1.get(), enclosing.createPoint(enclosed._p1->distance) );
@@ -707,22 +707,22 @@ struct LineConstructor
nextItr = itr;
++nextItr;
// osg::notify(osg::NOTICE)<<" newSegLeft_p1 "<<newSegLeft._p1->distance<<" "<<newSegLeft._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" newSegLeft_p2 "<<newSegLeft._p2->distance<<" "<<newSegLeft._p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<" newSegRight_p1 "<<newSegRight._p1->distance<<" "<<newSegRight._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" newSegRight_p2 "<<newSegRight._p2->distance<<" "<<newSegRight._p2->height<<std::endl;
// OSG_NOTICE<<" newSegLeft_p1 "<<newSegLeft._p1->distance<<" "<<newSegLeft._p1->height<<std::endl;
// OSG_NOTICE<<" newSegLeft_p2 "<<newSegLeft._p2->distance<<" "<<newSegLeft._p2->height<<std::endl;
// OSG_NOTICE<<" newSegRight_p1 "<<newSegRight._p1->distance<<" "<<newSegRight._p1->height<<std::endl;
// OSG_NOTICE<<" newSegRight_p2 "<<newSegRight._p2->distance<<" "<<newSegRight._p2->height<<std::endl;
}
}
else if (dh1 * dh2 < 0.0)
{
// osg::notify(osg::NOTICE)<<"ENCLOSING: ENCLOSING is crossing enclosed "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<"ENCLOSING: ENCLOSING is crossing enclosed "<<dh1<<" "<<dh2<<std::endl;
//
// osg::notify(osg::NOTICE)<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
// OSG_NOTICE<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// OSG_NOTICE<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// OSG_NOTICE<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// OSG_NOTICE<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
double d_left = enclosed._p1->distance - enclosing._p1->distance;
double d_right = enclosing._p2->distance - enclosed._p2->distance;
@@ -732,7 +732,7 @@ struct LineConstructor
// treat ENCLOSED as ENCLOSING.
if (dh1 < 0.0)
{
// osg::notify(osg::NOTICE)<<" >> enclosing left side is above enclosed left side"<<std::endl;
// OSG_NOTICE<<" >> enclosing left side is above enclosed left side"<<std::endl;
Point* cp = enclosing.createIntersectionPoint(enclosed);
Segment newSegLeft(enclosing._p1.get(), cp);
@@ -750,7 +750,7 @@ struct LineConstructor
}
else
{
// osg::notify(osg::NOTICE)<<" >> enclosing left side is above enclosed left side"<<std::endl;
// OSG_NOTICE<<" >> enclosing left side is above enclosed left side"<<std::endl;
Point* cp = enclosing.createIntersectionPoint(enclosed);
Segment newSegLeft(enclosed._p1.get(), cp);
@@ -770,11 +770,11 @@ struct LineConstructor
}
else if (d_left < epsilon)
{
// osg::notify(osg::NOTICE)<<" >> Replace enclosing with right section"<<std::endl;
// OSG_NOTICE<<" >> Replace enclosing with right section"<<std::endl;
if (dh1 < 0.0)
{
// osg::notify(osg::NOTICE)<<" >> enclosing left side is above enclosed left side"<<std::endl;
// OSG_NOTICE<<" >> enclosing left side is above enclosed left side"<<std::endl;
Point* cp = enclosing.createIntersectionPoint(enclosed);
Segment newSegLeft(enclosing._p1.get(), cp);
@@ -794,7 +794,7 @@ struct LineConstructor
}
else
{
// osg::notify(osg::NOTICE)<<" >> enclosing left side is above enclosed left side"<<std::endl;
// OSG_NOTICE<<" >> enclosing left side is above enclosed left side"<<std::endl;
Point* cp = enclosing.createIntersectionPoint(enclosed);
Segment newSegLeft(enclosed._p1.get(), cp);
@@ -813,11 +813,11 @@ struct LineConstructor
}
else if (d_right < epsilon)
{
// osg::notify(osg::NOTICE)<<" >> Replace enclosing with left section"<<std::endl;
// OSG_NOTICE<<" >> Replace enclosing with left section"<<std::endl;
if (dh1 < 0.0)
{
// osg::notify(osg::NOTICE)<<" >> enclosing left side is above enclosed left side"<<std::endl;
// OSG_NOTICE<<" >> enclosing left side is above enclosed left side"<<std::endl;
Point* cp = enclosing.createIntersectionPoint(enclosed);
Segment newSegLeft(enclosing._p1.get(), cp);
@@ -835,7 +835,7 @@ struct LineConstructor
}
else
{
// osg::notify(osg::NOTICE)<<" >> enclosing left side is above enclosed left side"<<std::endl;
// OSG_NOTICE<<" >> enclosing left side is above enclosed left side"<<std::endl;
Point* cp = enclosing.createIntersectionPoint(enclosed);
Segment newSegLeft(enclosing._p1.get(), enclosing.createPoint(enclosed._p1->distance));
@@ -856,12 +856,12 @@ struct LineConstructor
}
else
{
// osg::notify(osg::NOTICE)<<" >> Replace enclosing with left and right sections"<<std::endl;
// OSG_NOTICE<<" >> Replace enclosing with left and right sections"<<std::endl;
if (dh1 < 0.0)
{
// osg::notify(osg::NOTICE)<<" >> enclosing left side is above enclosed left side"<<std::endl;
// OSG_NOTICE<<" >> enclosing left side is above enclosed left side"<<std::endl;
Point* cp = enclosing.createIntersectionPoint(enclosed);
Segment newSegLeft(enclosing._p1.get(), cp);
@@ -881,7 +881,7 @@ struct LineConstructor
}
else
{
// osg::notify(osg::NOTICE)<<" >> enclosing left side is above enclosed left side"<<std::endl;
// OSG_NOTICE<<" >> enclosing left side is above enclosed left side"<<std::endl;
Point* cp = enclosing.createIntersectionPoint(enclosed);
Segment newSegLeft(enclosing._p1.get(), enclosing.createPoint(enclosed._p1->distance));
@@ -904,12 +904,12 @@ struct LineConstructor
}
else
{
osg::notify(osg::NOTICE)<<"ENCLOSING: ENCLOSING - error case "<<dh1<<" "<<dh2<<std::endl;
OSG_NOTICE<<"ENCLOSING: ENCLOSING - error case "<<dh1<<" "<<dh2<<std::endl;
osg::notify(osg::NOTICE)<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
osg::notify(osg::NOTICE)<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
osg::notify(osg::NOTICE)<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
osg::notify(osg::NOTICE)<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
OSG_NOTICE<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
OSG_NOTICE<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
OSG_NOTICE<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
OSG_NOTICE<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
++nextItr;
}
@@ -931,7 +931,7 @@ struct LineConstructor
if (dh1<=epsilon && dh2<=epsilon)
{
// osg::notify(osg::NOTICE)<<"+++ ENCLOSED: ENCLOSING is above enclosed "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<"+++ ENCLOSED: ENCLOSING is above enclosed "<<dh1<<" "<<dh2<<std::endl;
_segments.erase(itr);
itr = nextItr;
@@ -939,12 +939,12 @@ struct LineConstructor
}
else if (dh1>=0.0 && dh2>=0.0)
{
// osg::notify(osg::NOTICE)<<"ENCLOSED: ENCLOSING is below enclosed "<<dh1<<" "<<dh2<<std::endl;
// osg::notify(osg::NOTICE)<<" d_left "<<d_left<<" d_right="<<d_right<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
// OSG_NOTICE<<"ENCLOSED: ENCLOSING is below enclosed "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<" d_left "<<d_left<<" d_right="<<d_right<<std::endl;
// OSG_NOTICE<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// OSG_NOTICE<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// OSG_NOTICE<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// OSG_NOTICE<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
_segments.insert(Segment(enclosing.createPoint(enclosed._p2->distance), enclosed._p2.get()));
_segments.erase(nextItr);
@@ -954,11 +954,11 @@ struct LineConstructor
}
else if (dh1 * dh2 < 0.0)
{
// osg::notify(osg::NOTICE)<<"ENCLOSED: ENCLOSING is crossing enclosed "<<dh1<<" "<<dh2<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// osg::notify(osg::NOTICE)<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
// OSG_NOTICE<<"ENCLOSED: ENCLOSING is crossing enclosed "<<dh1<<" "<<dh2<<std::endl;
// OSG_NOTICE<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
// OSG_NOTICE<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
// OSG_NOTICE<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
// OSG_NOTICE<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
if (d_right<=epsilon)
{
@@ -1037,23 +1037,23 @@ struct LineConstructor
}
else
{
osg::notify(osg::NOTICE)<<"ENCLOSED: ENCLOSING - error case "<<dh1<<" "<<dh2<<std::endl;
osg::notify(osg::NOTICE)<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
osg::notify(osg::NOTICE)<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
osg::notify(osg::NOTICE)<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
osg::notify(osg::NOTICE)<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
OSG_NOTICE<<"ENCLOSED: ENCLOSING - error case "<<dh1<<" "<<dh2<<std::endl;
OSG_NOTICE<<" enclosing_p1 "<<enclosing._p1->distance<<" "<<enclosing._p1->height<<std::endl;
OSG_NOTICE<<" enclosing_p2 "<<enclosing._p2->distance<<" "<<enclosing._p2->height<<std::endl;
OSG_NOTICE<<" enclosed_p1 "<<enclosed._p1->distance<<" "<<enclosed._p1->height<<std::endl;
OSG_NOTICE<<" enclosed_p2 "<<enclosed._p2->distance<<" "<<enclosed._p2->height<<std::endl;
++nextItr;
}
}
else
{
osg::notify(osg::NOTICE)<<"*** ENCLOSED: is not coincendet with left handside of ENCLOSING, case not handled, advancing."<<std::endl;
OSG_NOTICE<<"*** ENCLOSED: is not coincendet with left handside of ENCLOSING, case not handled, advancing."<<std::endl;
}
break;
}
default:
osg::notify(osg::NOTICE)<<"** Not handled, advancing"<<std::endl;
OSG_NOTICE<<"** Not handled, advancing"<<std::endl;
++nextItr;
break;
}
@@ -1181,13 +1181,13 @@ void ElevationSlice::computeIntersections(osg::Node* scene, osg::Node::NodeMask
em->convertXYZToLatLongHeight(_startPoint.x(), _startPoint.y(), _startPoint.z(),
start_latitude, start_longitude, start_height);
osg::notify(osg::NOTICE)<<"start_lat = "<<start_latitude<<" start_longitude = "<<start_longitude<<" start_height = "<<start_height<<std::endl;
OSG_NOTICE<<"start_lat = "<<start_latitude<<" start_longitude = "<<start_longitude<<" start_height = "<<start_height<<std::endl;
double end_latitude, end_longitude, end_height;
em->convertXYZToLatLongHeight(_endPoint.x(), _endPoint.y(), _endPoint.z(),
end_latitude, end_longitude, end_height);
osg::notify(osg::NOTICE)<<"end_lat = "<<end_latitude<<" end_longitude = "<<end_longitude<<" end_height = "<<end_height<<std::endl;
OSG_NOTICE<<"end_lat = "<<end_latitude<<" end_longitude = "<<end_longitude<<" end_height = "<<end_height<<std::endl;
// set up the main intersection plane
osg::Vec3d planeNormal = (_endPoint - _startPoint) ^ start_upVector;
@@ -1253,7 +1253,7 @@ void ElevationSlice::computeIntersections(osg::Node* scene, osg::Node::NodeMask
if (intersection.matrix.valid())
{
// osg::notify(osg::NOTICE)<<" transforming "<<std::endl;
// OSG_NOTICE<<" transforming "<<std::endl;
// transform points on polyline
for(Polyline::iterator pitr = intersection.polyline.begin();
pitr != intersection.polyline.end();
@@ -1330,7 +1330,7 @@ void ElevationSlice::computeIntersections(osg::Node* scene, osg::Node::NodeMask
double pi_height = *aitr;
// osg::notify(osg::NOTICE)<<"computed height = "<<height<<" PI height = "<<pi_height<<std::endl;
// OSG_NOTICE<<"computed height = "<<height<<" PI height = "<<pi_height<<std::endl;
constructor.add( distance, pi_height, v);
@@ -1416,7 +1416,7 @@ void ElevationSlice::computeIntersections(osg::Node* scene, osg::Node::NodeMask
}
else
{
osg::notify(osg::NOTICE)<<"No intersections found."<<std::endl;
OSG_NOTICE<<"No intersections found."<<std::endl;
}
}

View File

@@ -61,7 +61,7 @@ void HeightAboveTerrain::computeIntersections(osg::Node* scene, osg::Node::NodeM
itr->_hat = height;
osg::notify(osg::NOTICE)<<"lat = "<<latitude<<" longitude = "<<longitude<<" height = "<<height<<std::endl;
OSG_NOTICE<<"lat = "<<latitude<<" longitude = "<<longitude<<" height = "<<height<<std::endl;
osg::ref_ptr<osgUtil::LineSegmentIntersector> intersector = new osgUtil::LineSegmentIntersector(start, end);
intersectorGroup->addIntersector( intersector.get() );

View File

@@ -226,7 +226,7 @@ ImpostorSprite* Impostor::createImpostorSprite(osgUtil::CullVisitor* cv)
if (!bs.valid())
{
osg::notify(osg::WARN) << "bb invalid"<<std::endl;
OSG_WARN << "bb invalid"<<std::endl;
return NULL;
}
@@ -306,7 +306,7 @@ ImpostorSprite* Impostor::createImpostorSprite(osgUtil::CullVisitor* cv)
if (impostorSprite==NULL)
{
osg::notify(osg::WARN)<<"Warning: unable to create required impostor sprite."<<std::endl;
OSG_WARN<<"Warning: unable to create required impostor sprite."<<std::endl;
return NULL;
}

View File

@@ -114,7 +114,7 @@ osg::BoundingBox ImpostorSprite::computeBound() const
if (!bbox.valid())
{
osg::notify(osg::WARN) << "******* ImpostorSprite::computeBound() problem"<<std::endl;
OSG_WARN << "******* ImpostorSprite::computeBound() problem"<<std::endl;
}
return bbox;

View File

@@ -169,7 +169,7 @@ void LightPointDrawable::drawImplementation(osg::RenderInfo& renderInfo) const
// restore the state afterwards.
state.apply();
#else
osg::notify(osg::NOTICE)<<"Warning: LightPointDrawable not supported."<<std::endl;
OSG_NOTICE<<"Warning: LightPointDrawable not supported."<<std::endl;
#endif
}

View File

@@ -185,7 +185,7 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
else
{
// will need to replace UserData.
osg::notify(osg::WARN) << "Warning: Replacing osgUtil::StateGraph::_userData to support osgSim::LightPointNode, may have undefined results."<<std::endl;
OSG_WARN << "Warning: Replacing osgUtil::StateGraph::_userData to support osgSim::LightPointNode, may have undefined results."<<std::endl;
}
}

View File

@@ -126,7 +126,7 @@ void LightPointSpriteDrawable::drawImplementation(osg::RenderInfo& renderInfo) c
// restore the state afterwards.
state.apply();
#else
osg::notify(osg::NOTICE)<<"Warning: LightPointDrawable not supported."<<std::endl;
OSG_NOTICE<<"Warning: LightPointDrawable not supported."<<std::endl;
#endif
}

View File

@@ -43,7 +43,7 @@ osg::Node* DatabaseCacheReadCallback::readNodeFile(const std::string& filename)
FileNameSceneMap::iterator itr = _filenameSceneMap.find(filename);
if (itr != _filenameSceneMap.end())
{
osg::notify(osg::INFO)<<"Getting from cache "<<filename<<std::endl;
OSG_INFO<<"Getting from cache "<<filename<<std::endl;
return itr->second.get();
}
@@ -59,7 +59,7 @@ osg::Node* DatabaseCacheReadCallback::readNodeFile(const std::string& filename)
if (_filenameSceneMap.size() < _maxNumFilesToCache)
{
osg::notify(osg::INFO)<<"Inserting into cache "<<filename<<std::endl;
OSG_INFO<<"Inserting into cache "<<filename<<std::endl;
_filenameSceneMap[filename] = node;
}
@@ -72,14 +72,14 @@ osg::Node* DatabaseCacheReadCallback::readNodeFile(const std::string& filename)
{
if (itr->second->referenceCount()==1)
{
osg::notify(osg::NOTICE)<<"Erasing "<<itr->first<<std::endl;
OSG_NOTICE<<"Erasing "<<itr->first<<std::endl;
// found a node which is only referenced in the cache so we can discard it
// and know that the actual memory will be released.
_filenameSceneMap.erase(itr);
break;
}
}
osg::notify(osg::INFO)<<"And the replacing with "<<filename<<std::endl;
OSG_INFO<<"And the replacing with "<<filename<<std::endl;
_filenameSceneMap[filename] = node;
}
}

View File

@@ -135,9 +135,9 @@ public:
void setToBoundingBox(const osg::BoundingBox& bb)
{
#if 0
osg::notify(osg::NOTICE)<<"setToBoundingBox xrange "<<bb.xMin()<<" "<<bb.xMax()<<std::endl;
osg::notify(osg::NOTICE)<<" "<<bb.yMin()<<" "<<bb.yMax()<<std::endl;
osg::notify(osg::NOTICE)<<" "<<bb.zMin()<<" "<<bb.zMax()<<std::endl;
OSG_NOTICE<<"setToBoundingBox xrange "<<bb.xMin()<<" "<<bb.xMax()<<std::endl;
OSG_NOTICE<<" "<<bb.yMin()<<" "<<bb.yMax()<<std::endl;
OSG_NOTICE<<" "<<bb.zMin()<<" "<<bb.zMax()<<std::endl;
#endif
const osg::Vec3d v000(bb.xMin(),bb.yMin(), bb.zMin());
const osg::Vec3d v010(bb.xMin(),bb.yMax(), bb.zMin());
@@ -237,7 +237,7 @@ public:
void insertVertex(const osg::Vec3d& vertex, osg::EllipsoidModel* em=0, double minHeight=0.0)
{
// osg::notify(osg::NOTICE)<<"Inserting vertex "<<vertex<<std::endl;
// OSG_NOTICE<<"Inserting vertex "<<vertex<<std::endl;
Faces removedFaces;
@@ -296,7 +296,7 @@ public:
{
if (eitr->second==1)
{
// osg::notify(osg::NOTICE)<<" edge Ok"<<std::endl;
// OSG_NOTICE<<" edge Ok"<<std::endl;
const Edge& edge = eitr->first;
Face face;
face.name = "baseSide";
@@ -352,13 +352,13 @@ public:
}
// osg::notify(osg::NOTICE)<<" Removed faces "<<removedFaces.size()<<std::endl;
// OSG_NOTICE<<" Removed faces "<<removedFaces.size()<<std::endl;
}
void projectDowntoBase(const osg::Vec3d& control, const osg::Vec3d& normal)
{
// osg::notify(osg::NOTICE)<<"CustomPolytope::projectDowntoBase not implementated yet."<<std::endl;
// OSG_NOTICE<<"CustomPolytope::projectDowntoBase not implementated yet."<<std::endl;
Faces removedFaces;
@@ -417,7 +417,7 @@ public:
{
if (eitr->second==1)
{
// osg::notify(osg::NOTICE)<<" edge Ok"<<std::endl;
// OSG_NOTICE<<" edge Ok"<<std::endl;
const Edge& edge = eitr->first;
double h_first = (edge.first-control) * normal;
@@ -515,7 +515,7 @@ public:
const EdgeFaces& edgeFaces = eitr->second;
if (edgeFaces.size()==1)
{
// osg::notify(osg::NOTICE)<<"Open edge found "<<edgeFaces.front()->name<<std::endl;
// OSG_NOTICE<<"Open edge found "<<edgeFaces.front()->name<<std::endl;
}
else if (edgeFaces.size()==2)
{
@@ -524,19 +524,19 @@ public:
double dotProduct1 = edgeFaces[1]->plane.getNormal() * normal;
if (dotProduct0 * dotProduct1 <0.0)
{
// osg::notify(osg::NOTICE)<<" Silhoette edge found "<<edgeFaces[0]->name<<" "<<edgeFaces[1]->name<<std::endl;
// OSG_NOTICE<<" Silhoette edge found "<<edgeFaces[0]->name<<" "<<edgeFaces[1]->name<<std::endl;
uniqueVertices.insert(edge.first);
uniqueVertices.insert(edge.second);
}
else
{
// osg::notify(osg::NOTICE)<<" Non silhoette edge found "<<edgeFaces[0]->name<<" "<<edgeFaces[1]->name<<std::endl;
// OSG_NOTICE<<" Non silhoette edge found "<<edgeFaces[0]->name<<" "<<edgeFaces[1]->name<<std::endl;
}
}
else
{
// osg::notify(osg::NOTICE)<<"Confused edge found "<<edgeFaces.size()<<std::endl;
// OSG_NOTICE<<"Confused edge found "<<edgeFaces.size()<<std::endl;
}
}
@@ -590,7 +590,7 @@ public:
void cut(const osg::Polytope& polytope)
{
// osg::notify(osg::NOTICE)<<"Cutting with polytope "<<std::endl;
// OSG_NOTICE<<"Cutting with polytope "<<std::endl;
for(osg::Polytope::PlaneList::const_iterator itr = polytope.getPlaneList().begin();
itr != polytope.getPlaneList().end();
++itr)
@@ -601,7 +601,7 @@ public:
void cut(const CustomPolytope& polytope)
{
// osg::notify(osg::NOTICE)<<"Cutting with polytope "<<std::endl;
// OSG_NOTICE<<"Cutting with polytope "<<std::endl;
for(Faces::const_iterator itr = polytope._faces.begin();
itr != polytope._faces.end();
++itr)
@@ -612,7 +612,7 @@ public:
void cut(const osg::Plane& plane, const std::string& name=std::string())
{
// osg::notify(osg::NOTICE)<<" Cutting plane "<<plane<<std::endl;
// OSG_NOTICE<<" Cutting plane "<<plane<<std::endl;
Face newFace;
typedef std::vector<double> Distances;
Distances distances;
@@ -626,12 +626,12 @@ public:
int intersect = plane.intersect(face.vertices);
if (intersect==1)
{
// osg::notify(osg::NOTICE)<<" Face inside"<<std::endl;
// OSG_NOTICE<<" Face inside"<<std::endl;
++itr;
}
else if (intersect==0)
{
// osg::notify(osg::NOTICE)<<" Face intersecting - before "<<face.vertices.size()<<std::endl;
// OSG_NOTICE<<" Face intersecting - before "<<face.vertices.size()<<std::endl;
Vertices& vertices = face.vertices;
newVertices.clear();
@@ -666,26 +666,26 @@ public:
newVertices.push_back(intersection);
newFace.vertices.push_back(intersection);
// osg::notify(osg::NOTICE)<<" intersection distance "<<plane.distance(intersection)<<std::endl;
// OSG_NOTICE<<" intersection distance "<<plane.distance(intersection)<<std::endl;
}
}
vertices.swap(newVertices);
// osg::notify(osg::NOTICE)<<" intersecting - after "<<face.vertices.size()<<std::endl;
// OSG_NOTICE<<" intersecting - after "<<face.vertices.size()<<std::endl;
++itr;
}
else if (intersect==-1)
{
// osg::notify(osg::NOTICE)<<" Face outside"<<_faces.size()<<std::endl;
// OSG_NOTICE<<" Face outside"<<_faces.size()<<std::endl;
itr = _faces.erase(itr);
}
}
if (!newFace.vertices.empty())
{
// osg::notify(osg::NOTICE)<<" inserting newFace intersecting "<<newFace.vertices.size()<<std::endl;
// OSG_NOTICE<<" inserting newFace intersecting "<<newFace.vertices.size()<<std::endl;
newFace.name = name;
newFace.plane = plane;
@@ -735,7 +735,7 @@ public:
newVertices.swap(vertices);
// osg::notify(osg::NOTICE)<<" after angle sort "<<newFace.vertices.size()<<std::endl;
// OSG_NOTICE<<" after angle sort "<<newFace.vertices.size()<<std::endl;
_faces.push_back(newFace);
}
@@ -961,7 +961,7 @@ OverlayNode::OverlayData* OverlayNode::getOverlayData(osgUtil::CullVisitor* cv)
if (!overlayData->_texture)
{
// osg::notify(osg::NOTICE)<<" setting up texture"<<std::endl;
// OSG_NOTICE<<" setting up texture"<<std::endl;
osg::Texture2D* texture = new osg::Texture2D;
texture->setTextureSize(tex_width, tex_height);
@@ -981,7 +981,7 @@ OverlayNode::OverlayData* OverlayNode::getOverlayData(osgUtil::CullVisitor* cv)
// set up the render to texture camera.
if (!overlayData->_camera || overlayData->_camera->getRenderTargetImplementation() != _renderTargetImpl)
{
// osg::notify(osg::NOTICE)<<" setting up camera"<<std::endl;
// OSG_NOTICE<<" setting up camera"<<std::endl;
// create the camera
overlayData->_camera = new osg::Camera;
@@ -1198,7 +1198,7 @@ void OverlayNode::init()
void OverlayNode::init_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY()
{
osg::notify(osg::INFO)<<"OverlayNode::init() - OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY"<<std::endl;
OSG_INFO<<"OverlayNode::init() - OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY"<<std::endl;
// force initialization of _overlayDataMap for the key 0 (or NULL)
getOverlayData(0);
@@ -1206,12 +1206,12 @@ void OverlayNode::init_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY()
void OverlayNode::init_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY()
{
osg::notify(osg::INFO)<<"OverlayNode::init() - VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY"<<std::endl;
OSG_INFO<<"OverlayNode::init() - VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY"<<std::endl;
}
void OverlayNode::init_VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY()
{
osg::notify(osg::INFO)<<"OverlayNode::init() - VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY"<<std::endl;
OSG_INFO<<"OverlayNode::init() - VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY"<<std::endl;
}
void OverlayNode::traverse(osg::NodeVisitor& nv)
@@ -1375,7 +1375,7 @@ void OverlayNode::traverse_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeV
void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVisitor& nv)
{
// osg::notify(osg::NOTICE)<<"OverlayNode::traverse() - VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY"<<std::endl;
// OSG_NOTICE<<"OverlayNode::traverse() - VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY"<<std::endl;
if (nv.getVisitorType() != osg::NodeVisitor::CULL_VISITOR)
@@ -1429,20 +1429,20 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
double znear = cv->getCalculatedNearPlane();
double zfar = cv->getCalculatedFarPlane();
// osg::notify(osg::NOTICE)<<" before znear ="<<znear<<"\t zfar ="<<zfar<<std::endl;
// OSG_NOTICE<<" before znear ="<<znear<<"\t zfar ="<<zfar<<std::endl;
cv->computeNearPlane();
znear = cv->getCalculatedNearPlane();
zfar = cv->getCalculatedFarPlane();
// osg::notify(osg::NOTICE)<<" after znear ="<<znear<<"\t zfar ="<<zfar<<std::endl;
// OSG_NOTICE<<" after znear ="<<znear<<"\t zfar ="<<zfar<<std::endl;
// osg::notify(osg::NOTICE)<<" before clamp pm="<<pm<<std::endl;
// OSG_NOTICE<<" before clamp pm="<<pm<<std::endl;
cv->clampProjectionMatrixImplementation(pm, znear,zfar);
// osg::notify(osg::NOTICE)<<" after clamp pm="<<pm<<std::endl;
// OSG_NOTICE<<" after clamp pm="<<pm<<std::endl;
osg::Matrix MVP = *(cv->getModelViewMatrix()) * pm;
osg::Matrix inverseMVP;
@@ -1491,7 +1491,7 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
// osg::notify(osg::NOTICE)<<"AFTER CUT corners = "<<corners.size()<<std::endl;
// OSG_NOTICE<<"AFTER CUT corners = "<<corners.size()<<std::endl;
osg::Vec3d center = _overlaySubgraph->getBound().center();
@@ -1541,7 +1541,7 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
}
// osg::notify(osg::NOTICE)<<" lookVector ="<<lookVector<<std::endl;
// OSG_NOTICE<<" lookVector ="<<lookVector<<std::endl;
double min_side = DBL_MAX;
double max_side = -DBL_MAX;
@@ -1590,7 +1590,7 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
if (usePerspectiveShaders)
{
// osg::notify(osg::NOTICE)<<"ratio = "<<ratio<<std::endl;
// OSG_NOTICE<<"ratio = "<<ratio<<std::endl;
// double original_width = max_side-min_side;
double minRatio = 0.02;
@@ -1629,8 +1629,8 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
double frustumDiagonal = osg::RadiansToDegrees(acos(edgeBottomLeft * edgeBottomRight));
//osg::notify(osg::NOTICE)<<" width ratio = "<<new_width/original_width<<std::endl;
//osg::notify(osg::NOTICE)<<" near ratio = "<<ratio * new_width/original_width<<std::endl;
//OSG_NOTICE<<" width ratio = "<<new_width/original_width<<std::endl;
//OSG_NOTICE<<" near ratio = "<<ratio * new_width/original_width<<std::endl;
double angle = 2.0*osg::RadiansToDegrees(atan(max_side_over_up));
@@ -1656,7 +1656,7 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
double new_ratio = (min_up-lowest_up)/(max_up-lowest_up);
//osg::notify(osg::NOTICE)<<" originalRatio = "<<ratio<<" new_ratio="<<new_ratio<<std::endl;
//OSG_NOTICE<<" originalRatio = "<<ratio<<" new_ratio="<<new_ratio<<std::endl;
if (new_ratio > ratio) ratio = new_ratio;
@@ -1675,7 +1675,7 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
overlayData._y0->set(static_cast<float>(y0));
// osg::notify(osg::NOTICE)<<"y0 = "<<y0<<std::endl;
// OSG_NOTICE<<"y0 = "<<y0<<std::endl;
overlayData._mainSubgraphStateSet->setAttribute(overlayData._mainSubgraphProgram.get());
@@ -1697,12 +1697,12 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
double height = max_up-min_up;
double area = width*height;
osg::notify(osg::NOTICE)<<"width = "<<width<<"\t height = "<<height<<"\t area = "<<area<<std::endl;
OSG_NOTICE<<"width = "<<width<<"\t height = "<<height<<"\t area = "<<area<<std::endl;
osg::notify(osg::NOTICE)<<"a min_side = "<<min_side<<std::endl;
osg::notify(osg::NOTICE)<<"a max_side = "<<max_side<<std::endl;
osg::notify(osg::NOTICE)<<"a min_up = "<<min_up<<std::endl;
osg::notify(osg::NOTICE)<<"a max_up = "<<max_up<<std::endl;
OSG_NOTICE<<"a min_side = "<<min_side<<std::endl;
OSG_NOTICE<<"a max_side = "<<max_side<<std::endl;
OSG_NOTICE<<"a min_up = "<<min_up<<std::endl;
OSG_NOTICE<<"a max_up = "<<max_up<<std::endl;
#endif
if (em)
@@ -1730,7 +1730,7 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
overlayData._textureFrustum.setToUnitFrustum(false,false);
overlayData._textureFrustum.transformProvidingInverse(MVP);
// osg::notify(osg::NOTICE)<<std::endl;
// OSG_NOTICE<<std::endl;
unsigned int contextID = cv->getState()!=0 ? cv->getState()->getContextID() : 0;
@@ -1793,7 +1793,7 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
Group::traverse(nv);
}
// osg::notify(osg::NOTICE)<<" "<<&overlayData<<std::endl;
// OSG_NOTICE<<" "<<&overlayData<<std::endl;
}
void OverlayNode::traverse_VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY(osg::NodeVisitor& nv)
@@ -1865,7 +1865,7 @@ void OverlayNode::setOverlayTextureSizeHint(unsigned int size)
void OverlayNode::updateMainSubgraphStateSet()
{
osg::notify(osg::INFO)<<"OverlayNode::updateMainSubgraphStateSet()"<<std::endl;
OSG_INFO<<"OverlayNode::updateMainSubgraphStateSet()"<<std::endl;
for(OverlayDataMap::iterator itr = _overlayDataMap.begin();
itr != _overlayDataMap.end();

View File

@@ -41,13 +41,13 @@ public:
Surface():_ss(0)
{
osg::notify(osg::WARN)<<
OSG_WARN<<
"Warning: unexpected call to osgSim::SphereSegment::Surface() default constructor"<<std::endl;
}
Surface(const Surface& rhs, const osg::CopyOp& co=osg::CopyOp::SHALLOW_COPY):osg::Drawable(rhs,co), _ss(0)
{
osg::notify(osg::WARN)<<
OSG_WARN<<
"Warning: unexpected call to osgSim::SphereSegment::Surface() copy constructor"<<std::endl;
}
@@ -89,13 +89,13 @@ public:
EdgeLine():_ss(0)
{
init();
osg::notify(osg::WARN)<<
OSG_WARN<<
"Warning: unexpected call to osgSim::SphereSegment::EdgeLine() default constructor"<<std::endl;
}
EdgeLine(const EdgeLine& rhs, const osg::CopyOp& co=osg::CopyOp::SHALLOW_COPY):osg::Drawable(rhs,co), _ss(0)
{
osg::notify(osg::WARN)<<
OSG_WARN<<
"Warning: unexpected call to osgSim::SphereSegment::EdgeLine() copy constructor"<<std::endl;
}
@@ -147,13 +147,13 @@ public:
Side():_ss(0)
{
osg::notify(osg::WARN)<<
OSG_WARN<<
"Warning: unexpected call to osgSim::SphereSegment::Side() default constructor"<<std::endl;
}
Side(const Side& rhs, const osg::CopyOp& co=osg:: CopyOp::SHALLOW_COPY): osg::Drawable(rhs,co), _ss(0)
{
osg::notify(osg::WARN)<<
OSG_WARN<<
"Warning: unexpected call to osgSim::SphereSegment::Side() copy constructor"<<std::endl;
}
@@ -198,13 +198,13 @@ public:
Spoke():_ss(0)
{
init();
osg::notify(osg::WARN)<<
OSG_WARN<<
"Warning: unexpected call to osgSim::SphereSegment::Spoke() default constructor"<<std::endl;
}
Spoke(const Spoke& rhs, const osg::CopyOp& co=osg:: CopyOp::SHALLOW_COPY): osg::Drawable(rhs,co), _ss(0)
{
osg::notify(osg::WARN)<<
OSG_WARN<<
"Warning: unexpected call to osgSim::SphereSegment::Spoke() copy constructor"<<std::endl;
}
@@ -1067,7 +1067,7 @@ class PolytopeVisitor : public osg::NodeVisitor
SphereSegment::LineList SphereSegment::computeIntersection(const osg::Matrixd& transform, osg::Node* subgraph)
{
osg::notify(osg::INFO)<<"Creating line intersection between sphere segment and subgraph."<<std::endl;
OSG_INFO<<"Creating line intersection between sphere segment and subgraph."<<std::endl;
osg::BoundingBox bb = getBoundingBox();
@@ -1087,7 +1087,7 @@ SphereSegment::LineList SphereSegment::computeIntersection(const osg::Matrixd& t
if (polytopeVisitor.getHits().empty())
{
osg::notify(osg::INFO)<<"No hits found."<<std::endl;
OSG_INFO<<"No hits found."<<std::endl;
return LineList();
}
@@ -1095,7 +1095,7 @@ SphereSegment::LineList SphereSegment::computeIntersection(const osg::Matrixd& t
LineList all_lines;
// compute the line intersections with each of the hit drawables
osg::notify(osg::INFO)<<"Hits found. "<<polytopeVisitor.getHits().size()<<std::endl;
OSG_INFO<<"Hits found. "<<polytopeVisitor.getHits().size()<<std::endl;
PolytopeVisitor::HitList& hits = polytopeVisitor.getHits();
for(PolytopeVisitor::HitList::iterator itr = hits.begin();
itr != hits.end();
@@ -1112,7 +1112,7 @@ SphereSegment::LineList SphereSegment::computeIntersection(const osg::Matrixd& t
osg::Node* SphereSegment::computeIntersectionSubgraph(const osg::Matrixd& transform, osg::Node* subgraph)
{
osg::notify(osg::INFO)<<"Creating line intersection between sphere segment and subgraph."<<std::endl;
OSG_INFO<<"Creating line intersection between sphere segment and subgraph."<<std::endl;
osg::BoundingBox bb = getBoundingBox();
@@ -1132,7 +1132,7 @@ osg::Node* SphereSegment::computeIntersectionSubgraph(const osg::Matrixd& transf
if (polytopeVisitor.getHits().empty())
{
osg::notify(osg::INFO)<<"No hits found."<<std::endl;
OSG_INFO<<"No hits found."<<std::endl;
return 0;
}
@@ -1140,7 +1140,7 @@ osg::Node* SphereSegment::computeIntersectionSubgraph(const osg::Matrixd& transf
osg::Group* group = new osg::Group;
// compute the line intersections with each of the hit drawables
osg::notify(osg::INFO)<<"Hits found. "<<polytopeVisitor.getHits().size()<<std::endl;
OSG_INFO<<"Hits found. "<<polytopeVisitor.getHits().size()<<std::endl;
PolytopeVisitor::HitList& hits = polytopeVisitor.getHits();
for(PolytopeVisitor::HitList::iterator itr = hits.begin();
itr != hits.end();
@@ -1322,7 +1322,7 @@ namespace SphereSegmentIntersector
{
if (edge!=_e1 && edge!=_e2 && edge!=_e3)
{
osg::notify(osg::INFO)<<"Edge problem"<<std::endl;
OSG_INFO<<"Edge problem"<<std::endl;
return 0;
}
@@ -1641,7 +1641,7 @@ namespace SphereSegmentIntersector
void removeDuplicateVertices()
{
osg::notify(osg::INFO)<<"Removing duplicates : num vertices in "<<_candidateVertexIndices.size()<<std::endl;
OSG_INFO<<"Removing duplicates : num vertices in "<<_candidateVertexIndices.size()<<std::endl;
if (_candidateVertexIndices.size()<2) return;
@@ -1659,10 +1659,10 @@ namespace SphereSegmentIntersector
for(; itr != _candidateVertexIndices.end(); ++itr)
{
//unsigned int i = *itr;
// osg::notify(osg::INFO)<<" i="<<i<<" lastUniqueIndex="<<lastUniqueIndex<<std::endl;
// OSG_INFO<<" i="<<i<<" lastUniqueIndex="<<lastUniqueIndex<<std::endl;
if (_originalVertices[*itr]==_originalVertices[lastUniqueIndex])
{
osg::notify(osg::INFO)<<"Combining vertex "<<*itr<<" with "<<lastUniqueIndex<<std::endl;
OSG_INFO<<"Combining vertex "<<*itr<<" with "<<lastUniqueIndex<<std::endl;
_remapIndices[*itr] = lastUniqueIndex;
verticesRemapped = true;
}
@@ -1674,7 +1674,7 @@ namespace SphereSegmentIntersector
if (verticesRemapped)
{
osg::notify(osg::INFO)<<"Remapping triangle vertices "<<std::endl;
OSG_INFO<<"Remapping triangle vertices "<<std::endl;
for(TriangleArray::iterator titr = _triangles.begin();
titr != _triangles.end();
++titr)
@@ -1689,7 +1689,7 @@ namespace SphereSegmentIntersector
void removeDuplicateTriangles()
{
osg::notify(osg::INFO)<<"Removing duplicate triangles : num triangles in "<<_triangles.size()<<std::endl;
OSG_INFO<<"Removing duplicate triangles : num triangles in "<<_triangles.size()<<std::endl;
if (_triangles.size()<2) return;
@@ -1717,8 +1717,8 @@ namespace SphereSegmentIntersector
_triangles.erase(_triangles.begin()+lastUniqueTriangle+1, _triangles.end());
}
osg::notify(osg::INFO)<<"Removed duplicate triangles : num duplicates found "<<numDuplicates<<std::endl;
osg::notify(osg::INFO)<<"Removed duplicate triangles : num triangles out "<<_triangles.size()<<std::endl;
OSG_INFO<<"Removed duplicate triangles : num duplicates found "<<numDuplicates<<std::endl;
OSG_INFO<<"Removed duplicate triangles : num triangles out "<<_triangles.size()<<std::endl;
}
void buildEdges(Triangle* tri)
@@ -1749,13 +1749,13 @@ namespace SphereSegmentIntersector
}
}
osg::notify(osg::INFO)<<"Number of edges "<<_edges.size()<<std::endl;
OSG_INFO<<"Number of edges "<<_edges.size()<<std::endl;
unsigned int numZeroConnections = 0;
unsigned int numSingleConnections = 0;
unsigned int numDoubleConnections = 0;
unsigned int numMultiConnections = 0;
osg::notify(osg::INFO)<<"Number of edges "<<_edges.size()<<std::endl;
OSG_INFO<<"Number of edges "<<_edges.size()<<std::endl;
for(EdgeSet::iterator eitr = _edges.begin();
eitr != _edges.end();
++eitr)
@@ -1768,10 +1768,10 @@ namespace SphereSegmentIntersector
else ++numMultiConnections;
}
osg::notify(osg::INFO)<<"Number of numZeroConnections "<<numZeroConnections<<std::endl;
osg::notify(osg::INFO)<<"Number of numSingleConnections "<<numSingleConnections<<std::endl;
osg::notify(osg::INFO)<<"Number of numDoubleConnections "<<numDoubleConnections<<std::endl;
osg::notify(osg::INFO)<<"Number of numMultiConnections "<<numMultiConnections<<std::endl;
OSG_INFO<<"Number of numZeroConnections "<<numZeroConnections<<std::endl;
OSG_INFO<<"Number of numSingleConnections "<<numSingleConnections<<std::endl;
OSG_INFO<<"Number of numDoubleConnections "<<numDoubleConnections<<std::endl;
OSG_INFO<<"Number of numMultiConnections "<<numMultiConnections<<std::endl;
}
Edge* addEdge(unsigned int p1, unsigned int p2, Triangle* tri)
@@ -1797,7 +1797,7 @@ namespace SphereSegmentIntersector
{
SphereSegment::LineList lineList;
osg::notify(osg::INFO)<<"Number of edge intersections "<<hitEdges.size()<<std::endl;
OSG_INFO<<"Number of edge intersections "<<hitEdges.size()<<std::endl;
if (hitEdges.empty()) return lineList;
@@ -1810,7 +1810,7 @@ namespace SphereSegmentIntersector
{
Edge* edge = hitr->get();
edge->_toTraverse.clear();
//osg::notify(osg::INFO)<<"edge= "<<edge<<std::endl;
//OSG_INFO<<"edge= "<<edge<<std::endl;
for(Edge::TriangleList::iterator titr = edge->_triangles.begin();
titr != edge->_triangles.end();
++titr)
@@ -1831,11 +1831,11 @@ namespace SphereSegmentIntersector
// if we have one or more then add it into the edges to traverse list
if (numActiveEdges>1)
{
//osg::notify(osg::INFO)<<" adding tri="<<tri<<std::endl;
//OSG_INFO<<" adding tri="<<tri<<std::endl;
edge->_toTraverse.push_back(tri);
}
// osg::notify(osg::INFO)<<"Number active edges "<<numActiveEdges<<" num original edges "<<numEdges<<std::endl;
// OSG_INFO<<"Number active edges "<<numActiveEdges<<" num original edges "<<numEdges<<std::endl;
}
}
@@ -1855,7 +1855,7 @@ namespace SphereSegmentIntersector
hitr = hitEdges.begin();
}
// osg::notify(osg::INFO)<<"New line "<<std::endl;
// OSG_INFO<<"New line "<<std::endl;
osg::Vec3Array* newLine = new osg::Vec3Array;
@@ -1864,7 +1864,7 @@ namespace SphereSegmentIntersector
Edge* edge = hitr->get();
while (edge)
{
// osg::notify(osg::INFO)<<" vertex "<<edge->_intersectionVertex<<std::endl;
// OSG_INFO<<" vertex "<<edge->_intersectionVertex<<std::endl;
newLine->push_back(edge->_intersectionVertex+_centre/*+osg::Vec3(0.0f,0.0f,200.0f)*/);
Edge* newEdge = 0;
@@ -1878,11 +1878,11 @@ namespace SphereSegmentIntersector
edge->removeFromToTraverseList(tri);
newEdge->removeFromToTraverseList(tri);
// osg::notify(osg::INFO)<<" tri="<<tri<<" edge="<<edge<<" newEdge="<<newEdge<<std::endl;
// OSG_INFO<<" tri="<<tri<<" edge="<<edge<<" newEdge="<<newEdge<<std::endl;
if (edge==newEdge)
{
osg::notify(osg::INFO)<<" edge returned to itself problem "<<std::endl;
OSG_INFO<<" edge returned to itself problem "<<std::endl;
}
}
else
@@ -1931,7 +1931,7 @@ namespace SphereSegmentIntersector
{
if (sourceLine->empty()) return;
// osg::notify(osg::INFO)<<"Testing line of "<<sourceLine->size()<<std::endl;
// OSG_INFO<<"Testing line of "<<sourceLine->size()<<std::endl;
unsigned int first=0;
while (first<sourceLine->size())
@@ -1944,7 +1944,7 @@ namespace SphereSegmentIntersector
if (first==sourceLine->size())
{
// osg::notify(osg::INFO)<<"No valid points found"<<std::endl;
// OSG_INFO<<"No valid points found"<<std::endl;
return;
}
@@ -1957,12 +1957,12 @@ namespace SphereSegmentIntersector
if (first==0 && last==sourceLine->size())
{
// osg::notify(osg::INFO)<<"Copying complete line"<<std::endl;
// OSG_INFO<<"Copying complete line"<<std::endl;
lineList.push_back(sourceLine);
}
else
{
// osg::notify(osg::INFO)<<"Copying partial line line"<<first<<" "<<last<<std::endl;
// OSG_INFO<<"Copying partial line line"<<first<<" "<<last<<std::endl;
osg::Vec3Array* newLine = new osg::Vec3Array;
@@ -1995,7 +1995,7 @@ namespace SphereSegmentIntersector
{
if (sourceLine->empty()) return;
// osg::notify(osg::INFO)<<"Testing line of "<<sourceLine->size()<<std::endl;
// OSG_INFO<<"Testing line of "<<sourceLine->size()<<std::endl;
unsigned int first=0;
while (first<sourceLine->size())
@@ -2009,7 +2009,7 @@ namespace SphereSegmentIntersector
if (first==sourceLine->size())
{
// osg::notify(osg::INFO)<<"No valid points found"<<std::endl;
// OSG_INFO<<"No valid points found"<<std::endl;
return;
}
@@ -2023,12 +2023,12 @@ namespace SphereSegmentIntersector
if (first==0 && last==sourceLine->size())
{
// osg::notify(osg::INFO)<<"Copying complete line"<<std::endl;
// OSG_INFO<<"Copying complete line"<<std::endl;
lineList.push_back(sourceLine);
}
else
{
osg::notify(osg::INFO)<<"Copying partial line line"<<first<<" "<<last<<std::endl;
OSG_INFO<<"Copying partial line line"<<first<<" "<<last<<std::endl;
osg::Vec3Array* newLine = new osg::Vec3Array;
@@ -2064,13 +2064,13 @@ namespace SphereSegmentIntersector
// choose intersection which is nearest the end point.
if (r1<r2)
{
osg::notify(osg::INFO)<<"start point, 1 near to end than 2"<<r1<<" "<<r2<<std::endl;
OSG_INFO<<"start point, 1 near to end than 2"<<r1<<" "<<r2<<std::endl;
possible1 = true;
possible2 = false;
}
else
{
osg::notify(osg::INFO)<<"start point, 2 near to end than 1"<<std::endl;
OSG_INFO<<"start point, 2 near to end than 1"<<std::endl;
possible1 = false;
possible2 = true;
}
@@ -2127,13 +2127,13 @@ namespace SphereSegmentIntersector
// choose intersection which is nearest the end point.
if (r1>r2)
{
osg::notify(osg::INFO)<<"end point, 1 near to end than 2"<<r1<<" "<<r2<<std::endl;
OSG_INFO<<"end point, 1 near to end than 2"<<r1<<" "<<r2<<std::endl;
possible1 = true;
possible2 = false;
}
else
{
osg::notify(osg::INFO)<<"end point, 2 near to end than 1"<<std::endl;
OSG_INFO<<"end point, 2 near to end than 1"<<std::endl;
possible1 = false;
possible2 = true;
}
@@ -2346,7 +2346,7 @@ namespace SphereSegmentIntersector
if (linePairs.empty())
{
osg::notify(osg::INFO)<<"Line Pairs empty"<<std::endl;
OSG_INFO<<"Line Pairs empty"<<std::endl;
break;
}
@@ -2354,19 +2354,19 @@ namespace SphereSegmentIntersector
itr != linePairs.end();
++itr)
{
osg::notify(osg::INFO)<<"Line "<<itr->_line.get()<<" "<<itr->_lineEnd<<" neighbour "<<itr->_neighbourLine.get()<<" "<<itr->_neighbourLineEnd<<" distance="<<itr->_distance<<std::endl;
OSG_INFO<<"Line "<<itr->_line.get()<<" "<<itr->_lineEnd<<" neighbour "<<itr->_neighbourLine.get()<<" "<<itr->_neighbourLineEnd<<" distance="<<itr->_distance<<std::endl;
}
LinePair linePair = *linePairs.begin();
if (linePair._distance > fuseDistance)
{
osg::notify(osg::INFO)<<"Completed work, shortest distance left is "<<linePair._distance<<std::endl;
OSG_INFO<<"Completed work, shortest distance left is "<<linePair._distance<<std::endl;
break;
}
if (linePair._line == linePair._neighbourLine)
{
osg::notify(osg::INFO)<<"Fusing line to itself"<<std::endl;
OSG_INFO<<"Fusing line to itself"<<std::endl;
osg::Vec3Array* line = linePair._line.get();
osg::Vec3 average = ((*line)[0]+(*line)[line->size()-1])*0.5f;
@@ -2390,7 +2390,7 @@ namespace SphereSegmentIntersector
}
else
{
osg::notify(osg::INFO)<<"Error couldn't find line in unfused list, exiting fusing loop."<<std::endl;
OSG_INFO<<"Error couldn't find line in unfused list, exiting fusing loop."<<std::endl;
break;
}
}
@@ -2455,7 +2455,7 @@ namespace SphereSegmentIntersector
// add the newline into the unfused for further processing.
unfusedLines.push_back(newline);
osg::notify(osg::INFO)<<"Fusing two separate lines "<<newline<<std::endl;
OSG_INFO<<"Fusing two separate lines "<<newline<<std::endl;
}
_generatedLines = fusedLines;
@@ -2559,7 +2559,7 @@ namespace SphereSegmentIntersector
return false;
}
// osg::notify(osg::INFO)<<"r = "<<r<<std::endl;
// OSG_INFO<<"r = "<<r<<std::endl;
double one_minus_r = 1.0-r;
@@ -2675,7 +2675,7 @@ namespace SphereSegmentIntersector
}
else
{
osg::notify(osg::INFO)<<"neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
OSG_INFO<<"neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
edge->_intersectionType = TriangleIntersectOperator::Edge::NO_INTERSECTION;
return false;
@@ -2704,7 +2704,7 @@ namespace SphereSegmentIntersector
double s1, s2;
if (!computeQuadraticSolution(a,b,c,s1,s2))
{
osg::notify(osg::INFO)<<"Warning::neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
OSG_INFO<<"Warning::neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
return v1;
}
double r = 0.0;
@@ -2718,7 +2718,7 @@ namespace SphereSegmentIntersector
}
else
{
osg::notify(osg::INFO)<<"Warning::neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
OSG_INFO<<"Warning::neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
return v1;
}
@@ -2807,7 +2807,7 @@ namespace SphereSegmentIntersector
}
else
{
osg::notify(osg::INFO)<<"neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
OSG_INFO<<"neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
edge->_intersectionType = TriangleIntersectOperator::Edge::NO_INTERSECTION;
return false;
@@ -2835,7 +2835,7 @@ namespace SphereSegmentIntersector
double s1, s2;
if (!computeQuadraticSolution(a,b,c,s1,s2))
{
osg::notify(osg::INFO)<<"Warning: neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
OSG_INFO<<"Warning: neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
return v1;
}
double r = 0.0;
@@ -2849,7 +2849,7 @@ namespace SphereSegmentIntersector
}
else
{
osg::notify(osg::INFO)<<"Warning: neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
OSG_INFO<<"Warning: neither segment intersects s1="<<s1<<" s2="<<s2<<std::endl;
return v1;
}
@@ -2899,9 +2899,9 @@ SphereSegment::LineList SphereSegment::computeIntersection(const osg::Matrixd& m
// traverse the triangles in the Geometry dedicating intersections
geometry->accept(tif);
osg::notify(osg::INFO)<<"_numOutside = "<<tif._numOutside<<std::endl;
osg::notify(osg::INFO)<<"_numInside = "<<tif._numInside<<std::endl;
osg::notify(osg::INFO)<<"_numIntersecting = "<<tif._numIntersecting<<std::endl;
OSG_INFO<<"_numOutside = "<<tif._numOutside<<std::endl;
OSG_INFO<<"_numInside = "<<tif._numInside<<std::endl;
OSG_INFO<<"_numIntersecting = "<<tif._numIntersecting<<std::endl;
tif.removeDuplicateVertices();
tif.removeDuplicateTriangles();
@@ -2984,19 +2984,19 @@ SphereSegment::LineList SphereSegment::computeIntersection(const osg::Matrixd& m
tif._generatedLines.insert(tif._generatedLines.end(), elevMinLines.begin(), elevMinLines.end());
tif._generatedLines.insert(tif._generatedLines.end(), elevMaxLines.begin(), elevMaxLines.end());
osg::notify(osg::INFO)<<"number of separate lines = "<<tif._generatedLines.size()<<std::endl;
OSG_INFO<<"number of separate lines = "<<tif._generatedLines.size()<<std::endl;
float fuseDistance = 1.0;
tif.joinEnds(fuseDistance, true, true);
osg::notify(osg::INFO)<<"number of separate lines after fuse = "<<tif._generatedLines.size()<<std::endl;
OSG_INFO<<"number of separate lines after fuse = "<<tif._generatedLines.size()<<std::endl;
float joinDistance = 1e8;
tif.joinEnds(joinDistance, false, false);
osg::notify(osg::INFO)<<"number of separate lines after join = "<<tif._generatedLines.size()<<std::endl;
OSG_INFO<<"number of separate lines after join = "<<tif._generatedLines.size()<<std::endl;
tif.joinEnds(joinDistance, false, true);
osg::notify(osg::INFO)<<"number of separate lines after second join = "<<tif._generatedLines.size()<<std::endl;
OSG_INFO<<"number of separate lines after second join = "<<tif._generatedLines.size()<<std::endl;
return tif._generatedLines;
}

View File

@@ -70,7 +70,7 @@ void VisibilityGroup::traverse(osg::NodeVisitor& nv)
osgUtil::IntersectVisitor::HitList& hitList = iv.getHitList(lineseg.get());
if(!hitList.empty()) // we actually hit something
{
// notify(INFO) << "Hit obstruction"<< std::endl;
// OSG_INFO << "Hit obstruction"<< std::endl;
osg::Vec3 normal = hitList.front().getWorldIntersectNormal();
if((normal*seg) > 0.f ) // we are inside
Group::traverse(nv);