Show
Ignore:
Timestamp:
01/16/08 16:07:40 (1 year ago)
Author:
cneumann
Message:

changed: - factory functions return a TransitPtr? that can not be implicitly

converted to C Ptr. Should help with porting.

added: - GlobalRefPtr?, needed for cases where upon return from main

a RefPtr? goes out of scope (it would attempt to access the
FCFactory which is already shutdown at that point).

status: - vrml loader does not compile (needs porting to ref ptr)

  • tutorials compile, run and exit cleanly
  • multithreading and cluster are untested, yet
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Tutorials/11picking.cpp

    r835 r1039  
    3535 
    3636// The file root node, needed for intersection 
    37 NodePtr fileroot; 
     37NodeGlobalRefPtr fileroot; 
    3838 
    3939// The points used for visualising the ray and hit object 
    40 GeoPnt3fPropertyPtr isectPoints; 
     40GeoPnt3fPropertyGlobalRefPtr isectPoints; 
    4141 
    4242// The visualisation geometry, needed for update. 
    43 GeometryPtr testgeocore; 
     43GeometryGlobalRefPtr testgeocore; 
    4444 
    4545// forward declaration so we can have the interesting stuff upfront 
     
    5353        case 27:     
    5454        { 
     55            delete mgr; 
     56         
    5557            OSG::osgExit(); 
    5658            exit(0); 
     
    170172 
    171173    // the connection between GLUT and OpenSG 
    172     GLUTWindowPtr gwin= GLUTWindow::create(); 
     174    GLUTWindowGlobalRefPtr gwin= GLUTWindow::create(); 
    173175    gwin->setGlutId(winid); 
    174176    gwin->init(); 
     
    176178    // The scene group 
    177179     
    178     NodePtr  scene = Node::create(); 
    179     GroupPtr g     = Group::create(); 
     180    NodeGlobalRefPtr  scene = Node::create(); 
     181    GroupGlobalRefPtr g     = Group::create(); 
    180182     
    181183    scene->setCore(g); 
     
    212214    // The line shows the ray, the triangle whatever was hit. 
    213215     
    214     SimpleMaterialPtr red = SimpleMaterial::create(); 
     216    SimpleMaterialGlobalRefPtr red = SimpleMaterial::create(); 
    215217     
    216218    red->setDiffuse     (Color3f( 1,0,0 ));    
     
    225227    isectPoints->addValue(Pnt3f(0,0,0)); 
    226228 
    227     GeoUInt32PropertyPtr index = GeoUInt32Property::create(); 
     229    GeoUInt32PropertyGlobalRefPtr index = GeoUInt32Property::create(); 
    228230    index->addValue(0); 
    229231    index->addValue(1); 
     
    232234    index->addValue(4); 
    233235 
    234     GeoUInt32PropertyPtr lens = GeoUInt32Property::create(); 
     236    GeoUInt32PropertyGlobalRefPtr lens = GeoUInt32Property::create(); 
    235237    lens->addValue(2); 
    236238    lens->addValue(3); 
    237239     
    238     GeoUInt8PropertyPtr type = GeoUInt8Property::create(); 
     240    GeoUInt8PropertyGlobalRefPtr type = GeoUInt8Property::create(); 
    239241    type->addValue(GL_LINES); 
    240242    type->addValue(GL_TRIANGLES); 
     
    247249    testgeocore->setMaterial(red); 
    248250     
    249     NodePtr testgeo = Node::create(); 
     251    NodeGlobalRefPtr testgeo = Node::create(); 
    250252    testgeo->setCore(testgeocore); 
    251253