Show
Ignore:
Timestamp:
07/15/05 16:41:19 (9 years ago)
Author:
robert
Message:

Renamed Byte2,3,4 and Short2,3,4 and UByte4 to use the Vec*b, Vec*s and Vec4ub form

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgforest/osgforest.cpp

    r4350 r4390  
    4444            _type(0) {} 
    4545 
    46         Tree(const osg::Vec3& position, const osg::UByte4& color, float width, float height, unsigned int type): 
     46        Tree(const osg::Vec3& position, const osg::Vec4ub& color, float width, float height, unsigned int type): 
    4747            _position(position), 
    4848            _color(color), 
     
    5252 
    5353        osg::Vec3       _position; 
    54         osg::UByte4     _color; 
     54        osg::Vec4ub     _color; 
    5555        float           _width; 
    5656        float           _height; 
     
    9999    void createTreeList(osg::Node* terrain,const osg::Vec3& origin, const osg::Vec3& size,unsigned int numTreesToCreate,TreeList& trees); 
    100100 
    101     osg::Geometry* createSprite( float w, float h, osg::UByte4 color ); 
    102  
    103     osg::Geometry* createOrthogonalQuads( const osg::Vec3& pos, float w, float h, osg::UByte4 color ); 
     101    osg::Geometry* createSprite( float w, float h, osg::Vec4ub color ); 
     102 
     103    osg::Geometry* createOrthogonalQuads( const osg::Vec3& pos, float w, float h, osg::Vec4ub color ); 
    104104    osg::Geometry* createOrthogonalQuadsNoColor( const osg::Vec3& pos, float w, float h ); 
    105105 
     
    410410        osg::Vec3Array& v = *(new osg::Vec3Array(numColumns*numRows)); 
    411411        osg::Vec2Array& t = *(new osg::Vec2Array(numColumns*numRows)); 
    412         osg::UByte4Array& color = *(new osg::UByte4Array(1)); 
     412        osg::Vec4ubArray& color = *(new osg::Vec4ubArray(1)); 
    413413         
    414414        color[0].set(255,255,255,255); 
     
    512512} 
    513513 
    514 osg::Geometry* ForestTechniqueManager::createSprite( float w, float h, osg::UByte4 color ) 
     514osg::Geometry* ForestTechniqueManager::createSprite( float w, float h, osg::Vec4ub color ) 
    515515{ 
    516516    // set up the coords 
    517517    osg::Vec3Array& v = *(new osg::Vec3Array(4)); 
    518518    osg::Vec2Array& t = *(new osg::Vec2Array(4)); 
    519     osg::UByte4Array& c = *(new osg::UByte4Array(1)); 
     519    osg::Vec4ubArray& c = *(new osg::Vec4ubArray(1)); 
    520520 
    521521    v[0].set(-w*0.5f,0.0f,0.0f); 
     
    545545} 
    546546 
    547 osg::Geometry* ForestTechniqueManager::createOrthogonalQuads( const osg::Vec3& pos, float w, float h, osg::UByte4 color ) 
     547osg::Geometry* ForestTechniqueManager::createOrthogonalQuads( const osg::Vec3& pos, float w, float h, osg::Vec4ub color ) 
    548548{ 
    549549    // set up the coords 
    550550    osg::Vec3Array& v = *(new osg::Vec3Array(8)); 
    551551    osg::Vec2Array& t = *(new osg::Vec2Array(8)); 
    552     osg::UByte4Array& c = *(new osg::UByte4Array(1)); 
     552    osg::Vec4ubArray& c = *(new osg::Vec4ubArray(1)); 
    553553     
    554554    float rotation = random(0.0f,osg::PI/2.0f); 
     
    681681        transform_group = new osg::Group; 
    682682         
    683         osg::Geometry* geometry = createOrthogonalQuads(osg::Vec3(0.0f,0.0f,0.0f),1.0f,1.0f,osg::UByte4(255,255,255,255)); 
     683        osg::Geometry* geometry = createOrthogonalQuads(osg::Vec3(0.0f,0.0f,0.0f),1.0f,1.0f,osg::Vec4ub(255,255,255,255)); 
    684684         
    685685        for(TreeList::iterator itr=cell->_trees.begin();