Changeset 1039 for branches/Carsten_PtrWork2/Tutorials/03share.cpp
- Timestamp:
- 01/16/08 16:07:40 (1 year ago)
- Files:
-
- branches/Carsten_PtrWork2/Tutorials/03share.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Tutorials/03share.cpp
r835 r1039 27 27 28 28 // a seprate transformation for every copy 29 Transform Ptr trans[ncopies];29 TransformGlobalRefPtr trans[ncopies]; 30 30 31 31 … … 44 44 45 45 // set the transforms' matrices 46 for(UInt16 i=0; i <ncopies; ++i)46 for(UInt16 i=0; i < ncopies; ++i) 47 47 { 48 48 m.setTransform(Vec3f( osgSin(t / 1000.f + i * 4 * ncopies / Pi), … … 70 70 71 71 // the connection between GLUT and OpenSG 72 GLUTWindow Ptr gwin= GLUTWindow::create();72 GLUTWindowGlobalRefPtr gwin= GLUTWindow::create(); 73 73 gwin->setGlutId(winid); 74 74 gwin->init(); … … 97 97 98 98 // this time, create just the core of the geometry 99 Geometry Ptr torus = makeTorusGeo( .5, 2, 8, 12 );99 GeometryGlobalRefPtr torus = makeTorusGeo( .5, 2, 8, 12 ); 100 100 101 101 // create the scene … … 110 110 111 111 // create the root Group node 112 Node Ptr scene = Node::create();113 Group Ptr g = Group::create();112 NodeGlobalRefPtr scene = Node::create(); 113 GroupGlobalRefPtr g = Group::create(); 114 114 115 115 scene->setCore(g); … … 119 119 { 120 120 // create the nodes for the shared Geometry core 121 Node Ptr geonode = Node::create();121 NodeRefPtr geonode = Node::create(); 122 122 123 123 // assign the Core to the Node … … 125 125 126 126 // add a transformation for every Geometry 127 Node Ptr transnode = Node::create();127 NodeRefPtr transnode = Node::create(); 128 128 129 129 trans[i] = Transform::create(); … … 189 189 case 27: 190 190 { 191 delete mgr; 192 191 193 OSG::osgExit(); 192 194 exit(0);
