Changeset 1039 for branches/Carsten_PtrWork2/Tutorials/08materials.cpp
- Timestamp:
- 01/16/08 16:07:40 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Tutorials/08materials.cpp
r835 r1039 30 30 31 31 // a separate transformation for every object 32 Transform Ptr cyltrans, tortrans;32 TransformGlobalRefPtr cyltrans, tortrans; 33 33 34 34 … … 73 73 74 74 // the connection between GLUT and OpenSG 75 GLUTWindow Ptr gwin= GLUTWindow::create();75 GLUTWindowGlobalRefPtr gwin= GLUTWindow::create(); 76 76 gwin->setGlutId(winid); 77 77 gwin->init(); … … 84 84 // The scene group 85 85 86 Node Ptr scene = Node::create();87 Group Ptr g = Group::create();86 NodeGlobalRefPtr scene = Node::create(); 87 GroupGlobalRefPtr g = Group::create(); 88 88 89 89 scene->setCore(g); 90 90 91 91 // The cylinder and its transformation 92 Node Ptr cyl = Node::create();93 Geometry Ptr cylgeo = makeCylinderGeo( 1.4, .3, 8, true, true, true );92 NodeGlobalRefPtr cyl = Node::create(); 93 GeometryGlobalRefPtr cylgeo = makeCylinderGeo( 1.4, .3, 8, true, true, true ); 94 94 95 95 cyl->setCore(cylgeo); … … 97 97 cyltrans = Transform::create(); 98 98 99 Node Ptr cyltransnode = Node::create();99 NodeGlobalRefPtr cyltransnode = Node::create(); 100 100 cyltransnode->setCore (cyltrans); 101 101 cyltransnode->addChild(cyl ); … … 105 105 106 106 // The torus and its transformation 107 Node Ptr torus = Node::create();108 Geometry Ptr torusgeo = makeTorusGeo( .2, 1, 8, 12 );107 NodeGlobalRefPtr torus = Node::create(); 108 GeometryGlobalRefPtr torusgeo = makeTorusGeo( .2, 1, 8, 12 ); 109 109 110 110 torus->setCore(torusgeo); … … 112 112 tortrans = Transform::create(); 113 113 114 Node Ptr tortransnode = Node::create();114 NodeGlobalRefPtr tortransnode = Node::create(); 115 115 tortransnode->setCore (tortrans); 116 116 tortransnode->addChild(torus ); … … 139 139 */ 140 140 141 SimpleMaterial Ptr m1 = SimpleMaterial::create();141 SimpleMaterialGlobalRefPtr m1 = SimpleMaterial::create(); 142 142 143 143 // when everything is changed, not setting the mask is ok … … 198 198 */ 199 199 200 Image Ptr image = Image::create();200 ImageGlobalRefPtr image = Image::create(); 201 201 202 202 if(argc > 1) … … 212 212 } 213 213 214 SimpleTexturedMaterial Ptr m2 = SimpleTexturedMaterial::create();214 SimpleTexturedMaterialGlobalRefPtr m2 = SimpleTexturedMaterial::create(); 215 215 216 216 m2->setAmbient (Color3f(0.3,0.3,0.3)); … … 285 285 case 27: 286 286 { 287 delete mgr; 288 287 289 OSG::osgExit(); 288 290 exit(0);
