- Timestamp:
- 02/11/10 12:56:43 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/3ds/WriterCompareTriangle.cpp
r10853 r11056 33 33 { 34 34 static const unsigned int min = 1; 35 static const unsigned int max = 5; // Number of blocks used to divide the scene (arbitrary but seems ok)36 nbVerticesX = osg::clampBetween<unsigned int>(nbVerticesX, min, max);37 nbVerticesY = osg::clampBetween<unsigned int>(nbVerticesY, min, max);38 nbVerticesZ = osg::clampBetween<unsigned int>(nbVerticesZ, min, max);35 static const unsigned int max = 5; // Number of blocks used to divide the scene (arbitrary but seems ok) 36 nbVerticesX = osg::clampBetween<unsigned int>(nbVerticesX, min, max); 37 nbVerticesY = osg::clampBetween<unsigned int>(nbVerticesY, min, max); 38 nbVerticesZ = osg::clampBetween<unsigned int>(nbVerticesZ, min, max); 39 39 } 40 40 … … 43 43 osg::BoundingBox::vec_type length = sceneBox._max - sceneBox._min; 44 44 45 static const float k = 1.3f; // Arbitrary constant multiplier for density computation ("simulates" non-uniform point distributions)46 // Computes "density" of points, and thus the number of blocks to divide the mesh into45 static const float k = 1.3f; // Arbitrary constant multiplier for density computation ("simulates" non-uniform point distributions) 46 // Computes "density" of points, and thus the number of blocks to divide the mesh into 47 47 unsigned int nbVerticesX = static_cast<unsigned int>( (nbVertices * k) / (length.z() * length.y()) ); 48 48 unsigned int nbVerticesY = static_cast<unsigned int>( (nbVertices * k) / (length.z() * length.x()) ); … … 132 132 133 133 int WriterCompareTriangle::inWhichBox(const osg::BoundingBox::vec_type & point) const { 134 return inWhichBox(point.x(), point.y(), point.z());134 return inWhichBox(point.x(), point.y(), point.z()); 135 135 }
