~ubuntu-branches/debian/experimental/openscenegraph/experimental

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgUtil/EdgeCollector.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Luaces
  • Date: 2011-01-29 11:36:29 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110129113629-qisrm2kdqlurc7t3
Tags: 2.9.11-1
* Removed bug-555869-ftbfs_with_binutils_gold.dpatch since upstream has
  already taken care of the issue.
* Removed bug-528229.dpatch since the pkgconfig files are now also split
  in upstream.
* Removed explicit dependency on GLU.
* Upstream no longer includes osgIntrospection (Closes: #592420).
* Disabled zip plugin as its implementation stores an embedded copy of
  zlib.
* Enabled Qt support. Thanks James Goppert.
* Enabled SVG and PDF plugins. Thanks James Goppert.

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
    
158
158
EdgeCollector::Triangle* EdgeCollector::addTriangle(unsigned int p1, unsigned int p2, unsigned int p3)
159
159
{
160
 
    //osg::notify(osg::NOTICE)<<"addTriangle("<<p1<<","<<p2<<","<<p3<<")"<<std::endl;
 
160
    //OSG_NOTICE<<"addTriangle("<<p1<<","<<p2<<","<<p3<<")"<<std::endl;
161
161
 
162
162
    // detect if triangle is degenerate.
163
163
    if (p1==p2 || p2==p3 || p1==p3) return 0;
180
180
 
181
181
EdgeCollector::Triangle* EdgeCollector::addTriangle(Point* p1, Point* p2, Point* p3)
182
182
{
183
 
    // osg::notify(osg::NOTICE)<<"      addTriangle("<<p1<<","<<p2<<","<<p3<<")"<<std::endl;
 
183
    // OSG_NOTICE<<"      addTriangle("<<p1<<","<<p2<<","<<p3<<")"<<std::endl;
184
184
 
185
185
    // detect if triangle is degenerate.
186
186
    if (p1==p2 || p2==p3 || p1==p3) return 0;
204
204
   
205
205
EdgeCollector::Edge* EdgeCollector::addEdge(Triangle* triangle, Point* p1, Point* p2)
206
206
{
207
 
        // osg::notify(osg::NOTICE)<<"        addEdge("<<p1<<","<<p2<<")"<<std::endl;
 
207
        // OSG_NOTICE<<"        addEdge("<<p1<<","<<p2<<")"<<std::endl;
208
208
    osg::ref_ptr<Edge> edge = new Edge;
209
209
    edge->setOrderedPoints(p1,p2);
210
210
    
211
211
    EdgeSet::iterator itr = _edgeSet.find(edge);
212
212
    if (itr==_edgeSet.end())
213
213
    {
214
 
        // osg::notify(osg::NOTICE)<<"          addEdge("<<edge.get()<<") edge->_p1="<<edge->_p1.get()<<" _p2="<<edge->_p2.get()<<std::endl;
 
214
        // OSG_NOTICE<<"          addEdge("<<edge.get()<<") edge->_p1="<<edge->_p1.get()<<" _p2="<<edge->_p2.get()<<std::endl;
215
215
        _edgeSet.insert(edge);
216
216
    }
217
217
    else
218
218
    {
219
 
        // osg::notify(osg::NOTICE)<<"          reuseEdge("<<edge.get()<<") edge->_p1="<<edge->_p1.get()<<" _p2="<<edge->_p2.get()<<std::endl;
 
219
        // OSG_NOTICE<<"          reuseEdge("<<edge.get()<<") edge->_p1="<<edge->_p1.get()<<" _p2="<<edge->_p2.get()<<std::endl;
220
220
        edge = *itr;
221
221
    }
222
222
    
234
234
    PointSet::iterator itr = _pointSet.find(point);
235
235
    if (itr==_pointSet.end())
236
236
    {
237
 
        //osg::notify(osg::NOTICE)<<"  addPoint("<<point.get()<<")"<<std::endl;
 
237
        //OSG_NOTICE<<"  addPoint("<<point.get()<<")"<<std::endl;
238
238
        _pointSet.insert(point);
239
239
    }
240
240
    else
241
241
    {
242
242
        point = const_cast<Point*>(itr->get());
243
 
        //osg::notify(osg::NOTICE)<<"  reusePoint("<<point.get()<<")"<<std::endl;
 
243
        //OSG_NOTICE<<"  reusePoint("<<point.get()<<")"<<std::endl;
244
244
    }
245
245
 
246
246
    point->_triangles.insert(triangle);
288
288
        
289
289
        if (!found)
290
290
        {
291
 
            osg::notify(osg::WARN) << "extractBoundaryEdgeloop : unable to close edge loop" << std::endl;
 
291
            OSG_WARN << "extractBoundaryEdgeloop : unable to close edge loop" << std::endl;
292
292
            return false;
293
293
        }
294
294
        else
452
452
    if (_geometry->suitableForOptimization())
453
453
    {
454
454
        // removing coord indices
455
 
        osg::notify(osg::INFO)<<"EdgeCollector::setGeometry(..): Removing attribute indices"<<std::endl;
 
455
        OSG_INFO<<"EdgeCollector::setGeometry(..): Removing attribute indices"<<std::endl;
456
456
        _geometry->copyToAndOptimize(*_geometry);
457
457
    }
458
458
 
482
482
    EdgeloopList edgeloopList;
483
483
    if (extractBoundaryEdgeloopList(edgeList, edgeloopList) == false)
484
484
    {
485
 
        osg::notify(osg::WARN) << "EdgeCollector: fail to collect Edgeloop.\n\n\n" << std::endl;
 
485
        OSG_WARN << "EdgeCollector: fail to collect Edgeloop.\n\n\n" << std::endl;
486
486
        return;
487
487
    }
488
488