Show
Ignore:
Timestamp:
11/28/14 17:27:16 (5 hours ago)
Author:
robert
Message:

Added simple test script for osgUI's TabWidget?

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/branches/OpenSceneGraph-3.2/src/osgPlugins/3ds/WriterCompareTriangle.cpp

    r13041 r14038  
    2929 
    3030void 
    31 WriterCompareTriangle::setMaxMin(unsigned int & nbVerticesX, 
    32                                  unsigned int & nbVerticesY, 
    33                                  unsigned int & nbVerticesZ) const 
     31WriterCompareTriangle::setMaxMin(int & nbVerticesX, 
     32                                 int & nbVerticesY, 
     33                                 int & nbVerticesZ) const 
    3434{ 
    35     static const unsigned int min = 1; 
    36     static const unsigned int max = 5;        // Number of blocks used to divide the scene (arbitrary but seems ok) 
    37     nbVerticesX = osg::clampBetween<unsigned int>(nbVerticesX, min, max); 
    38     nbVerticesY = osg::clampBetween<unsigned int>(nbVerticesY, min, max); 
    39     nbVerticesZ = osg::clampBetween<unsigned int>(nbVerticesZ, min, max); 
     35    static const int min = 1; 
     36    static const int max = 5;        // Number of blocks used to divide the scene (arbitrary but seems ok) 
     37    nbVerticesX = osg::clampBetween<int>(nbVerticesX, min, max); 
     38    nbVerticesY = osg::clampBetween<int>(nbVerticesY, min, max); 
     39    nbVerticesZ = osg::clampBetween<int>(nbVerticesZ, min, max); 
    4040} 
    4141 
     
    4646    static const float k = 1.3f;        // Arbitrary constant multiplier for density computation ("simulates" non-uniform point distributions) 
    4747    // Computes "density" of points, and thus the number of blocks to divide the mesh into 
    48     unsigned int nbVerticesX = static_cast<unsigned int>( (nbVertices * k) / (length.z() * length.y()) ); 
    49     unsigned int nbVerticesY = static_cast<unsigned int>( (nbVertices * k) / (length.z() * length.x()) ); 
    50     unsigned int nbVerticesZ = static_cast<unsigned int>( (nbVertices * k) / (length.x() * length.y()) ); 
     48    int nbVerticesX = static_cast<int>( (nbVertices * k) / (length.z() * length.y()) ); 
     49    int nbVerticesY = static_cast<int>( (nbVertices * k) / (length.z() * length.x()) ); 
     50    int nbVerticesZ = static_cast<int>( (nbVertices * k) / (length.x() * length.y()) ); 
    5151 
    5252    setMaxMin (nbVerticesX, nbVerticesY, nbVerticesZ); // This function prevent from cutting the scene in too many blocs 
     
    6464    short yinc = 1; 
    6565    short xinc = 1; 
    66     unsigned int y = 0; 
    67     unsigned int x = 0; 
    68     for (unsigned int z = 0; z < nbVerticesZ; ++z) 
     66    int y = 0; 
     67    int x = 0; 
     68    for (int z = 0; z < nbVerticesZ; ++z) 
    6969    { 
    7070        while (x < nbVerticesX && x >= 0)