Changeset 1039 for branches/Carsten_PtrWork2/Tutorials/11picking.cpp
- Timestamp:
- 01/16/08 16:07:40 (1 year ago)
- Files:
-
- branches/Carsten_PtrWork2/Tutorials/11picking.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Tutorials/11picking.cpp
r835 r1039 35 35 36 36 // The file root node, needed for intersection 37 Node Ptr fileroot;37 NodeGlobalRefPtr fileroot; 38 38 39 39 // The points used for visualising the ray and hit object 40 GeoPnt3fProperty Ptr isectPoints;40 GeoPnt3fPropertyGlobalRefPtr isectPoints; 41 41 42 42 // The visualisation geometry, needed for update. 43 Geometry Ptr testgeocore;43 GeometryGlobalRefPtr testgeocore; 44 44 45 45 // forward declaration so we can have the interesting stuff upfront … … 53 53 case 27: 54 54 { 55 delete mgr; 56 55 57 OSG::osgExit(); 56 58 exit(0); … … 170 172 171 173 // the connection between GLUT and OpenSG 172 GLUTWindow Ptr gwin= GLUTWindow::create();174 GLUTWindowGlobalRefPtr gwin= GLUTWindow::create(); 173 175 gwin->setGlutId(winid); 174 176 gwin->init(); … … 176 178 // The scene group 177 179 178 Node Ptr scene = Node::create();179 Group Ptr g = Group::create();180 NodeGlobalRefPtr scene = Node::create(); 181 GroupGlobalRefPtr g = Group::create(); 180 182 181 183 scene->setCore(g); … … 212 214 // The line shows the ray, the triangle whatever was hit. 213 215 214 SimpleMaterial Ptr red = SimpleMaterial::create();216 SimpleMaterialGlobalRefPtr red = SimpleMaterial::create(); 215 217 216 218 red->setDiffuse (Color3f( 1,0,0 )); … … 225 227 isectPoints->addValue(Pnt3f(0,0,0)); 226 228 227 GeoUInt32Property Ptr index = GeoUInt32Property::create();229 GeoUInt32PropertyGlobalRefPtr index = GeoUInt32Property::create(); 228 230 index->addValue(0); 229 231 index->addValue(1); … … 232 234 index->addValue(4); 233 235 234 GeoUInt32Property Ptr lens = GeoUInt32Property::create();236 GeoUInt32PropertyGlobalRefPtr lens = GeoUInt32Property::create(); 235 237 lens->addValue(2); 236 238 lens->addValue(3); 237 239 238 GeoUInt8Property Ptr type = GeoUInt8Property::create();240 GeoUInt8PropertyGlobalRefPtr type = GeoUInt8Property::create(); 239 241 type->addValue(GL_LINES); 240 242 type->addValue(GL_TRIANGLES); … … 247 249 testgeocore->setMaterial(red); 248 250 249 Node Ptr testgeo = Node::create();251 NodeGlobalRefPtr testgeo = Node::create(); 250 252 testgeo->setCore(testgeocore); 251 253
