Changeset 13041 for OpenSceneGraph/trunk/include/osgUtil/Simplifier
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osgUtil/Simplifier (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgUtil/Simplifier
r9377 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 51 51 void setSmoothing(bool on) { _smoothing = on; } 52 52 bool getSmoothing() const { return _smoothing; } 53 53 54 54 class ContinueSimplificationCallback : public osg::Referenced 55 55 { … … 60 60 return simplifier.continueSimplificationImplementation(nextError, numOriginalPrimitives, numRemainingPrimitives); 61 61 } 62 62 63 63 protected: 64 64 virtual ~ContinueSimplificationCallback() {} 65 65 }; 66 66 67 67 void setContinueSimplificationCallback(ContinueSimplificationCallback* cb) { _continueSimplificationCallback = cb; } 68 68 ContinueSimplificationCallback* getContinueSimplificationCallback() { return _continueSimplificationCallback.get(); } 69 69 const ContinueSimplificationCallback* getContinueSimplificationCallback() const { return _continueSimplificationCallback.get(); } 70 71 70 71 72 72 bool continueSimplification(float nextError, unsigned int numOriginalPrimitives, unsigned int numRemainingPrimitives) const 73 73 { … … 97 97 /** simply the geometry.*/ 98 98 void simplify(osg::Geometry& geometry); 99 99 100 100 typedef std::vector<unsigned int> IndexList; /// a list of point indices 101 101 … … 105 105 106 106 protected: 107 107 108 108 double _sampleRatio; 109 109 double _maximumError; … … 111 111 bool _triStrip; 112 112 bool _smoothing; 113 113 114 114 osg::ref_ptr<ContinueSimplificationCallback> _continueSimplificationCallback; 115 115 116 116 }; 117 117
