Changeset 1039 for branches/Carsten_PtrWork2/Tutorials/05geometry.cpp
- Timestamp:
- 01/16/08 16:07:40 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Tutorials/05geometry.cpp
r835 r1039 27 27 28 28 // The pointer to the transformation 29 Transform Ptr trans;29 TransformGlobalRefPtr trans; 30 30 31 31 // The pointer to the geometry core 32 Geometry Ptr geo;32 GeometryGlobalRefPtr geo; 33 33 34 34 … … 49 49 50 50 // the connection between GLUT and OpenSG 51 GLUTWindow Ptr gwin= GLUTWindow::create();51 GLUTWindowGlobalRefPtr gwin = GLUTWindow::create(); 52 52 gwin->setGlutId(winid); 53 53 gwin->init(); … … 74 74 property, thus the mask is also called the same for each property. 75 75 */ 76 GeoUInt8Property Ptr type = GeoUInt8Property::create();76 GeoUInt8PropertyGlobalRefPtr type = GeoUInt8Property::create(); 77 77 type->addValue(GL_POLYGON ); 78 78 type->addValue(GL_TRIANGLES); … … 85 85 types property. 86 86 */ 87 GeoUInt32Property Ptr lens = GeoUInt32Property::create();87 GeoUInt32PropertyGlobalRefPtr lens = GeoUInt32Property::create(); 88 88 lens->addValue(4); 89 89 lens->addValue(6); … … 99 99 general kind. 100 100 */ 101 GeoPnt3fProperty Ptr pnts = OSG::GeoPnt3fProperty::create();101 GeoPnt3fPropertyGlobalRefPtr pnts = OSG::GeoPnt3fProperty::create(); 102 102 // the 4 points of the polygon 103 103 pnts->addValue(Pnt3f(-1, -1, -1)); … … 129 129 Put it all together into a Geometry NodeCore. 130 130 */ 131 geo =Geometry::create();131 geo = Geometry::create(); 132 132 geo->setTypes (type); 133 133 geo->setLengths (lens); … … 139 139 140 140 // put the geometry core into a node 141 Node Ptr n = Node::create();141 NodeGlobalRefPtr n = Node::create(); 142 142 n->setCore(geo); 143 143 144 144 // add a transformation to make it move 145 Node Ptr scene = Node::create();145 NodeGlobalRefPtr scene = Node::create(); 146 146 trans = Transform::create(); 147 147 scene->setCore(trans); … … 254 254 case 27: 255 255 { 256 delete mgr; 257 256 258 OSG::osgExit(); 257 259 exit(0);
