Show
Ignore:
Timestamp:
02/11/10 12:56:43 (3 years ago)
Author:
robert
Message:

From Sukender, "- Added support for extended filenames (=not 8.3) for images: reads without crashing, optionnally write extended filenames (correctly truncate names if option is OFF). Write option is OFF by default.
- Improved identifiers generation in duplicate name handling (was limited to 1000 name collisions, which can be very short for some usages).
- Set all read/write operations use a custom log function that will redirect lib3DS log to osg::notify() (was only used for streams)
- Removed custom code (now uses osgDB::getFilePath())
- Added missing supportsOption() calls
- Cleaned a few minor things"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/3ds/WriterCompareTriangle.cpp

    r10853 r11056  
    3333{ 
    3434    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); 
    3939} 
    4040 
     
    4343    osg::BoundingBox::vec_type length = sceneBox._max - sceneBox._min; 
    4444 
    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 into 
     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 into 
    4747    unsigned int nbVerticesX = static_cast<unsigned int>( (nbVertices * k) / (length.z() * length.y()) ); 
    4848    unsigned int nbVerticesY = static_cast<unsigned int>( (nbVertices * k) / (length.z() * length.x()) ); 
     
    132132 
    133133int 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()); 
    135135}