Show
Ignore:
Timestamp:
09/19/14 12:35:23 (3 days ago)
Author:
robert
Message:

Moved widgets from VolumeEditorWidget? to TransferFunctionWidget?, and widget utilities into WidgetUtils?.

Files:
1 modified

Legend:

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

    r13470 r13488  
    1818 
    1919#include <osg/Geode> 
    20 #include <osg/GeometryNew> 
     20#include <osg/Geometry> 
    2121#include <osg/Material> 
    2222#include <osg/Vec3> 
     
    9494    { 
    9595        // create Geometry object to store all the vertices and points primitive. 
    96         osg::GeometryNew* pointsGeom = new osg::GeometryNew(); 
     96        osg::Geometry* pointsGeom = new osg::Geometry(); 
    9797         
    9898        // create a Vec3Array and add to it all my coordinates. 
     
    123123        // that only use one color for the whole object. 
    124124        pointsGeom->setColorArray(colors); 
    125         pointsGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
     125        pointsGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
    126126         
    127127         
     
    130130        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    131131        pointsGeom->setNormalArray(normals); 
    132         pointsGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
     132        pointsGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
    133133 
    134134 
     
    148148    { 
    149149        // create Geometry object to store all the vertices and lines primitive. 
    150         osg::GeometryNew* linesGeom = new osg::GeometryNew(); 
     150        osg::Geometry* linesGeom = new osg::Geometry(); 
    151151         
    152152        // this time we'll preallocate the vertex array to the size we 
     
    171171        colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); 
    172172        linesGeom->setColorArray(colors); 
    173         linesGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
     173        linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
    174174         
    175175 
     
    178178        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    179179        linesGeom->setNormalArray(normals); 
    180         linesGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
     180        linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
    181181 
    182182 
     
    193193    { 
    194194        // create Geometry object to store all the vertices and lines primitive. 
    195         osg::GeometryNew* linesGeom = new osg::GeometryNew(); 
     195        osg::Geometry* linesGeom = new osg::Geometry(); 
    196196         
    197197        // this time we'll preallocate the vertex array to the size  
     
    213213        colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); 
    214214        linesGeom->setColorArray(colors); 
    215         linesGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
     215        linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
    216216 
    217217 
     
    220220        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    221221        linesGeom->setNormalArray(normals); 
    222         linesGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
     222        linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
    223223 
    224224 
     
    235235    { 
    236236        // create Geometry object to store all the vertices and lines primitive. 
    237         osg::GeometryNew* linesGeom = new osg::GeometryNew(); 
     237        osg::Geometry* linesGeom = new osg::Geometry(); 
    238238         
    239239        // this time we'll a C arrays to initialize the vertices. 
     
    260260        colors->push_back(osg::Vec4(1.0f,1.0f,0.0f,1.0f)); 
    261261        linesGeom->setColorArray(colors); 
    262         linesGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
     262        linesGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
    263263         
    264264 
     
    267267        normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    268268        linesGeom->setNormalArray(normals); 
    269         linesGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
     269        linesGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
    270270         
    271271 
     
    308308    { 
    309309        // create Geometry object to store all the vertices and lines primitive. 
    310         osg::GeometryNew* polyGeom = new osg::GeometryNew(); 
     310        osg::Geometry* polyGeom = new osg::Geometry(); 
    311311         
    312312        // this time we'll use C arrays to initialize the vertices. 
     
    334334        // use the shared color array. 
    335335        polyGeom->setColorArray(shared_colors.get()); 
    336         polyGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
     336        polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
    337337         
    338338 
    339339        // use the shared normal array. 
    340340        polyGeom->setNormalArray(shared_normals.get()); 
    341         polyGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
     341        polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
    342342         
    343343 
     
    356356    { 
    357357        // create Geometry object to store all the vertices and lines primitive. 
    358         osg::GeometryNew* polyGeom = new osg::GeometryNew(); 
     358        osg::Geometry* polyGeom = new osg::Geometry(); 
    359359         
    360360        // note, anticlockwise ordering. 
     
    381381        // use the shared color array. 
    382382        polyGeom->setColorArray(shared_colors.get()); 
    383         polyGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
     383        polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
    384384         
    385385 
    386386        // use the shared normal array. 
    387387        polyGeom->setNormalArray(shared_normals.get()); 
    388         polyGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
     388        polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
    389389         
    390390 
     
    403403    { 
    404404        // create Geometry object to store all the vertices and lines primitive. 
    405         osg::GeometryNew* polyGeom = new osg::GeometryNew(); 
     405        osg::Geometry* polyGeom = new osg::Geometry(); 
    406406         
    407407        // note, first coord at top, second at bottom, reverse to that buggy OpenGL image.. 
     
    430430        // use the shared color array. 
    431431        polyGeom->setColorArray(shared_colors.get()); 
    432         polyGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
     432        polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
    433433         
    434434 
    435435        // use the shared normal array. 
    436436        polyGeom->setNormalArray(shared_normals.get()); 
    437         polyGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
     437        polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
    438438         
    439439 
     
    452452    { 
    453453        // create Geometry object to store all the vertices and lines primitive. 
    454         osg::GeometryNew* polyGeom = new osg::GeometryNew(); 
     454        osg::Geometry* polyGeom = new osg::Geometry(); 
    455455         
    456456        // note, first coord at top, second at bottom, reverse to that buggy OpenGL image.. 
     
    498498        // use the shared color array. 
    499499        polyGeom->setColorArray(shared_colors.get()); 
    500         polyGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
     500        polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
    501501         
    502502 
    503503        // use the shared normal array. 
    504504        polyGeom->setNormalArray(shared_normals.get()); 
    505         polyGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
     505        polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
    506506         
    507507 
     
    572572  
    573573    // create Geometry object to store all the vertices and lines primitive. 
    574     osg::GeometryNew* polyGeom = new osg::GeometryNew(); 
     574    osg::Geometry* polyGeom = new osg::Geometry(); 
    575575 
    576576    // note, anticlockwise ordering. 
     
    591591    colors->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); 
    592592    polyGeom->setColorArray(colors); 
    593     polyGeom->setColorBinding(osg::GeometryNew::BIND_OVERALL); 
     593    polyGeom->setColorBinding(osg::Geometry::BIND_OVERALL); 
    594594 
    595595 
     
    598598    normals->push_back(osg::Vec3(0.0f,-1.0f,0.0f)); 
    599599    polyGeom->setNormalArray(normals); 
    600     polyGeom->setNormalBinding(osg::GeometryNew::BIND_OVERALL); 
     600    polyGeom->setNormalBinding(osg::Geometry::BIND_OVERALL); 
    601601 
    602602    osg::Vec2 myTexCoords[] =