Ignore:
Timestamp:
04/19/06 00:27:14 (18 years ago)
Author:
igarcia
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCUtil.h

    r700 r751  
    55 
    66namespace BBC { 
     7 
     8class _BBCExport Util 
     9{ 
     10public: 
     11        static Ogre::String getBaseName(Ogre::String fileName) 
     12        { 
     13                Ogre::String baseName; 
     14                size_t pos = fileName.find_last_of("."); 
     15                baseName = fileName.substr(0, pos); 
     16                return baseName; 
     17        } 
     18 
     19        static Ogre::String getExtensionName(Ogre::String fileName) 
     20        { 
     21                Ogre::String ext; 
     22                size_t pos = fileName.find_last_of("."); 
     23                ext = fileName.substr(pos+1); 
     24                return ext; 
     25        } 
     26 
     27        static unsigned int nextPowerOf2(unsigned int nPlanes) 
     28        { 
     29                unsigned int depth = 1; 
     30                while (depth < nPlanes) 
     31                { 
     32                        depth = depth << 1; 
     33                } 
     34                return depth; 
     35        } 
     36 
     37}; 
     38 
    739/* 
    840extern "C" _BBCExport double fround(double n, unsigned d) 
     
    1547      return (int)floor(x + 0.5); 
    1648} 
    17  
    18 extern "C" _BBCExport unsigned int getUpperPowerOfTwo(unsigned int powerOfTwo) 
    19 { 
    20         unsigned int icount = 0; 
    21         unsigned int depth = 1; 
    22         while (icount < powerOfTwo) 
    23         { 
    24                 depth = depth << 1; 
    25                 icount++; 
    26         } 
    27         return depth; 
    28 } 
    2949*/ 
    3050} 
Note: See TracChangeset for help on using the changeset viewer.