Changeset 1039 for branches/Carsten_PtrWork2/Tutorials/06indexgeometry.cpp
- Timestamp:
- 01/16/08 16:07:40 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Tutorials/06indexgeometry.cpp
r835 r1039 20 20 21 21 // The pointer to the transformation 22 Transform Ptr trans;22 TransformGlobalRefPtr trans; 23 23 24 24 // The SimpleSceneManager to manage simple applications … … 56 56 57 57 // the connection between GLUT and OpenSG 58 GLUTWindow Ptr gwin= GLUTWindow::create();58 GLUTWindowGlobalRefPtr gwin= GLUTWindow::create(); 59 59 gwin->setGlutId(winid); 60 60 gwin->init(); … … 73 73 The initial setup is the same as in the geometry... 74 74 */ 75 GeoUInt8Property Ptr type = GeoUInt8Property::create();75 GeoUInt8PropertyGlobalRefPtr type = GeoUInt8Property::create(); 76 76 type->addValue(GL_POLYGON ); 77 77 type->addValue(GL_TRIANGLES); 78 78 type->addValue(GL_QUADS ); 79 79 80 GeoUInt32Property Ptr lens = GeoUInt32Property::create();80 GeoUInt32PropertyGlobalRefPtr lens = GeoUInt32Property::create(); 81 81 lens->addValue(4); 82 82 lens->addValue(6); … … 86 86 This time, only unique positions are stored. 87 87 */ 88 GeoPnt3fProperty Ptr pnts = GeoPnt3fProperty::create();88 GeoPnt3fPropertyGlobalRefPtr pnts = GeoPnt3fProperty::create(); 89 89 // the base 90 90 pnts->addValue(Pnt3f(-1, -1, -1)); … … 111 111 Colors also have their own types, they are neither Points nor Vectors. 112 112 */ 113 GeoVec3fProperty Ptr colors = GeoVec3fProperty::create();113 GeoVec3fPropertyGlobalRefPtr colors = GeoVec3fProperty::create(); 114 114 // the base 115 115 colors->addValue(Color3f(1, 1, 0)); … … 138 138 for the vertices. 139 139 */ 140 GeoUInt32Property Ptr indices = GeoUInt32Property::create();140 GeoUInt32PropertyGlobalRefPtr indices = GeoUInt32Property::create(); 141 141 // indices for the polygon 142 142 indices->addValue(0); … … 168 168 Put it all together into a Geometry NodeCore. 169 169 */ 170 Geometry Ptr geo=Geometry::create();170 GeometryGlobalRefPtr geo = Geometry::create(); 171 171 geo->setTypes (type); 172 172 geo->setLengths (lens); … … 177 177 178 178 // put the geometry core into a node 179 Node Ptr n = Node::create();179 NodeGlobalRefPtr n = Node::create(); 180 180 n->setCore(geo); 181 181 182 182 // add a transformation to make it move 183 Node Ptr scene = Node::create();183 NodeGlobalRefPtr scene = Node::create(); 184 184 trans = Transform::create(); 185 185 scene->setCore(trans); … … 240 240 case 27: 241 241 { 242 delete mgr; 243 242 244 OSG::osgExit(); 243 245 exit(0);
