Changeset 1168
- Timestamp:
- 04/16/08 02:25:04 (4 weeks ago)
- Files:
-
- trunk/Source/Base/Base/OSGContainerForwards.h (modified) (1 diff)
- trunk/Source/Contrib/Manipulators/OSGManipulator.cpp (modified) (6 diffs)
- trunk/Source/Contrib/Manipulators/OSGManipulator.h (modified) (4 diffs)
- trunk/Source/Contrib/Manipulators/OSGManipulatorManager.cpp (modified) (2 diffs)
- trunk/Source/Contrib/Manipulators/OSGManipulatorManager.h (modified) (1 diff)
- trunk/Source/Contrib/Manipulators/OSGMoveManipulator.cpp (modified) (1 diff)
- trunk/Source/Contrib/Manipulators/OSGMoveManipulator.h (modified) (1 diff)
- trunk/Source/Contrib/Manipulators/OSGRotateManipulator.cpp (modified) (1 diff)
- trunk/Source/Contrib/Manipulators/OSGRotateManipulator.h (modified) (1 diff)
- trunk/Source/Contrib/Manipulators/OSGScaleManipulator.cpp (modified) (1 diff)
- trunk/Source/Contrib/Manipulators/OSGScaleManipulator.h (modified) (1 diff)
- trunk/Source/Contrib/Manipulators/OSGSimpleGeometryExt.cpp (modified) (13 diffs)
- trunk/Source/Contrib/Manipulators/OSGSimpleGeometryExt.h (modified) (2 diffs)
- trunk/Source/Contrib/Manipulators/build.info (modified) (1 diff)
- trunk/Source/Contrib/Manipulators/testManipulators.cpp (modified) (8 diffs)
- trunk/Source/System/Material/Base/OSGMaterial.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/Base/Base/OSGContainerForwards.h
r1126 r1168 94 94 WeakRefCountPolicy > CLASST##WeakPtr; \ 95 95 typedef RefCountPtr< CLASST, \ 96 MTRecordedRefCountPolicy> CLASST##MTRecPtr; 96 MTRecordedRefCountPolicy> CLASST##MTRecPtr; \ 97 typedef CLASST##RecPtr CLASST##RefPtr; 97 98 98 99 trunk/Source/Contrib/Manipulators/OSGManipulator.cpp
r852 r1168 144 144 { 145 145 //std::cout << "parent size= " << parents.getSize() << std::endl; 146 parent = dynamic_cast<NodePtr>(getParents()[0] .getCPtr()); // Dangerous! multiple parents?146 parent = dynamic_cast<NodePtr>(getParents()[0]); // Dangerous! multiple parents? 147 147 } 148 148 else … … 239 239 Inherited::onCreate(source); 240 240 241 setMaterialX(SimpleMaterial::create()); 242 setMaterialY(SimpleMaterial::create()); 243 setMaterialZ(SimpleMaterial::create()); 241 SimpleMaterialUnrecPtr pMat = SimpleMaterial::create(); 242 243 setMaterialX(pMat); 244 245 pMat = SimpleMaterial::create(); 246 247 setMaterialY(pMat); 248 249 pMat = SimpleMaterial::create(); 250 251 setMaterialZ(pMat); 244 252 245 253 SimpleMaterialPtr simpleMat; … … 249 257 250 258 // add a name attachment 251 Name Ptr nameN = Name::create();259 NameUnrecPtr nameN = Name::create(); 252 260 nameN->editFieldPtr()->setValue("XManipulator"); 253 261 addAttachment(nameN); 254 262 255 263 // make the axis lines 256 setAxisLinesN(makeCoordAxis(getLength()[0], 2.0, false));257 addRef (getAxisLinesN());264 NodeUnrecPtr pNode = makeCoordAxis(getLength()[0], 2.0, false); 265 setAxisLinesN(pNode); 258 266 259 267 // make the red x-axis transform and handle 260 268 261 setTransXNode(Node::create()); 269 pNode = Node::create(); 270 setTransXNode(pNode); 262 271 _transHandleXC = ComponentTransform::create(); 263 setHandleXNode(makeHandleGeo() ); 264 setMaterialX (SimpleMaterial::create()); 265 266 addRef(getTransXNode() ); 267 addRef(_transHandleXC ); 268 addRef(getHandleXNode()); 269 addRef(getMaterialX() ); 272 273 pNode = makeHandleGeo(); 274 setHandleXNode(pNode); 275 pMat = SimpleMaterial::create(); 276 setMaterialX (pMat ); 270 277 271 278 getTransXNode()->setCore (_transHandleXC ); … … 286 293 // make the green y-axis transform and handle 287 294 288 setTransYNode(Node::create()); 295 pNode = Node::create(); 296 setTransYNode(pNode); 289 297 _transHandleYC = ComponentTransform::create(); 290 setHandleYNode(makeHandleGeo()); 291 setMaterialY(SimpleMaterial::create()); 292 293 addRef(getTransYNode() ); 294 addRef(_transHandleYC ); 295 addRef(getHandleYNode()); 296 addRef(getMaterialY() ); 298 pNode = makeHandleGeo(); 299 setHandleYNode(pNode); 300 pMat = SimpleMaterial::create(); 301 setMaterialY(pMat); 297 302 298 303 getTransYNode()->setCore (_transHandleYC ); … … 312 317 // make the blue z-axis transform and handle 313 318 314 setTransZNode(Node::create()); 319 pNode = Node::create(); 320 setTransZNode(pNode); 315 321 _transHandleZC = ComponentTransform::create(); 316 setHandleZNode(makeHandleGeo() ); 317 setMaterialZ (SimpleMaterial::create()); 318 319 addRef(getTransZNode() ); 320 addRef(_transHandleZC ); 321 addRef(getHandleZNode()); 322 addRef(getMaterialZ() ); 322 pNode = makeHandleGeo(); 323 setHandleZNode(pNode); 324 pMat = SimpleMaterial::create(); 325 setMaterialZ (pMat); 323 326 324 327 getTransZNode()->setCore (_transHandleZC); … … 340 343 void Manipulator::onDestroy() 341 344 { 342 subRef(getTransXNode() ); 343 subRef(_transHandleXC ); 344 subRef(getHandleXNode()); 345 subRef(getMaterialX() ); 346 347 subRef(getTransYNode() ); 348 subRef(_transHandleYC ); 349 subRef(getHandleYNode()); 350 subRef(getMaterialY() ); 351 352 subRef(getTransZNode() ); 353 subRef(_transHandleZC ); 354 subRef(getHandleZNode()); 355 subRef(getMaterialZ() ); 356 357 subRef(getAxisLinesN()); 358 // Name?? 345 } 346 347 void Manipulator::resolveLinks(void) 348 { 349 Inherited::resolveLinks(); 350 351 _activeParent = NullFC; 352 353 _transHandleXC = NullFC; 354 _transHandleYC = NullFC; 355 _transHandleZC = NullFC; 359 356 } 360 357 trunk/Source/Contrib/Manipulators/OSGManipulator.h
r852 r1168 122 122 void onDestroy(); 123 123 124 virtual void resolveLinks(void); 125 124 126 /*! \} */ 125 127 /*---------------------------------------------------------------------*/ … … 131 133 /*! \} */ 132 134 133 virtual Node Ptr makeHandleGeo() = 0;134 virtual void addHandleGeo(NodePtr n);135 virtual void subHandleGeo(NodePtr n);136 void reverseTransform();135 virtual NodeTransitPtr makeHandleGeo() = 0; 136 virtual void addHandleGeo(NodePtr n); 137 virtual void subHandleGeo(NodePtr n); 138 void reverseTransform(); 137 139 138 140 virtual void doMovement( TransformPtr t, … … 147 149 const ViewportPtr &port); 148 150 149 Node Ptr_activeParent;151 NodeUnrecPtr _activeParent; 150 152 ExternalUpdateHandler* _externalUpdateHandler; 151 153 … … 153 155 private: 154 156 155 ComponentTransform Ptr _transHandleXC;156 ComponentTransform Ptr _transHandleYC;157 ComponentTransform Ptr _transHandleZC;157 ComponentTransformUnrecPtr _transHandleXC; 158 ComponentTransformUnrecPtr _transHandleYC; 159 ComponentTransformUnrecPtr _transHandleZC; 158 160 159 161 friend class FieldContainer; trunk/Source/Contrib/Manipulators/OSGManipulatorManager.cpp
r784 r1168 51 51 // wenn der ManipulatorManager sich den Node merken wuerde!?! 52 52 53 Node Ptr ManipulatorManager::createManipulator(const ManipulatorType type)53 NodeTransitPtr ManipulatorManager::createManipulator(const ManipulatorType type) 54 54 { 55 Node Ptr maniN = Node::create();55 NodeTransitPtr maniN = Node::create(); 56 56 57 57 switch (type) … … 83 83 if ( ! _maniC->getParents().empty() ) 84 84 { 85 NodePtr maniN = dynamic_cast<NodePtr>(_maniC->getParents()[0] .getCPtr());85 NodePtr maniN = dynamic_cast<NodePtr>(_maniC->getParents()[0]); 86 86 87 87 _maniC = NullFC; trunk/Source/Contrib/Manipulators/OSGManipulatorManager.h
r827 r1168 54 54 enum ManipulatorType { ROTATE, SCALE, TRANSLATE }; 55 55 56 Node Ptr createManipulator(const ManipulatorType type);57 void changeManipulator(const ManipulatorType type);58 bool activate ( NodePtr n );56 NodeTransitPtr createManipulator(const ManipulatorType type); 57 void changeManipulator(const ManipulatorType type); 58 bool activate ( NodePtr n ); 59 59 60 void setTarget (const NodePtr &value);61 void setViewport (const ViewportPtr &value);62 bool isActive ( void );60 void setTarget (const NodePtr &value); 61 void setViewport (const ViewportPtr &value); 62 bool isActive ( void ); 63 63 64 void mouseMove (const Int16 x,65 const Int16 y);66 void mouseButtonPress (const UInt16 button,67 const Int16 x,68 const Int16 y );69 void mouseButtonRelease(const UInt16 button,70 const Int16 x,71 const Int16 y );64 void mouseMove (const Int16 x, 65 const Int16 y); 66 void mouseButtonPress (const UInt16 button, 67 const Int16 x, 68 const Int16 y ); 69 void mouseButtonRelease(const UInt16 button, 70 const Int16 x, 71 const Int16 y ); 72 72 private: 73 ManipulatorPtr _maniC; 74 ManipulatorType _currentType; 75 NodePtr _target; 76 ViewportPtr _viewport; 73 74 ManipulatorUnrecPtr _maniC; 75 ManipulatorType _currentType; 76 NodeUnrecPtr _target; 77 ViewportUnrecPtr _viewport; 77 78 }; 78 79 trunk/Source/Contrib/Manipulators/OSGMoveManipulator.cpp
r998 r1168 137 137 } 138 138 139 Node Ptr MoveManipulator::makeHandleGeo()139 NodeTransitPtr MoveManipulator::makeHandleGeo() 140 140 { 141 141 return makeCone(0.75, 0.1, 12, true, true); trunk/Source/Contrib/Manipulators/OSGMoveManipulator.h
r852 r1168 97 97 /*! \} */ 98 98 99 virtual Node Ptr makeHandleGeo();100 virtual void doMovement( TransformPtr t,101 const Int32 coord,102 const Real32 value,103 const Vec3f &translation,104 const Quaternion &rotation,105 const Vec3f &scaleFactor,106 const Quaternion &scaleOrientation);99 virtual NodeTransitPtr makeHandleGeo(); 100 virtual void doMovement( TransformPtr t, 101 const Int32 coord, 102 const Real32 value, 103 const Vec3f &translation, 104 const Quaternion &rotation, 105 const Vec3f &scaleFactor, 106 const Quaternion &scaleOrientation); 107 107 108 108 /*========================== PRIVATE ================================*/ trunk/Source/Contrib/Manipulators/OSGRotateManipulator.cpp
r998 r1168 138 138 } 139 139 140 Node Ptr RotateManipulator::makeHandleGeo()140 NodeTransitPtr RotateManipulator::makeHandleGeo() 141 141 { 142 142 return makeSphere(2, 0.2); trunk/Source/Contrib/Manipulators/OSGRotateManipulator.h
r852 r1168 96 96 /*! \} */ 97 97 98 virtual Node Ptr makeHandleGeo();99 virtual void doMovement( TransformPtr t,100 const Int32 coord,101 const Real32 value,102 const Vec3f &translation,103 const Quaternion &rotation,104 const Vec3f &scaleFactor,105 const Quaternion &scaleOrientation);98 virtual NodeTransitPtr makeHandleGeo(); 99 virtual void doMovement( TransformPtr t, 100 const Int32 coord, 101 const Real32 value, 102 const Vec3f &translation, 103 const Quaternion &rotation, 104 const Vec3f &scaleFactor, 105 const Quaternion &scaleOrientation); 106 106 107 107 /*========================== PRIVATE ================================*/ trunk/Source/Contrib/Manipulators/OSGScaleManipulator.cpp
r998 r1168 137 137 } 138 138 139 Node Ptr ScaleManipulator::makeHandleGeo()139 NodeTransitPtr ScaleManipulator::makeHandleGeo() 140 140 { 141 141 return makeCylinder(0.75, 0.1, 12, true, true, true); trunk/Source/Contrib/Manipulators/OSGScaleManipulator.h
r852 r1168 96 96 /*! \} */ 97 97 98 virtual Node Ptr makeHandleGeo();99 virtual void doMovement( TransformPtr t,100 const Int32 coord,101 const Real32 value,102 const Vec3f &translation,103 const Quaternion &rotation,104 const Vec3f &scaleFactor,105 const Quaternion &scaleOrientation);98 virtual NodeTransitPtr makeHandleGeo(); 99 virtual void doMovement( TransformPtr t, 100 const Int32 coord, 101 const Real32 value, 102 const Vec3f &translation, 103 const Quaternion &rotation, 104 const Vec3f &scaleFactor, 105 const Quaternion &scaleOrientation); 106 106 107 107 /*========================== PRIVATE ================================*/ trunk/Source/Contrib/Manipulators/OSGSimpleGeometryExt.cpp
r837 r1168 56 56 OSG_BEGIN_NAMESPACE 57 57 58 Geometry Ptr makeGridGeo(const Real32 width,59 const Real32 depth,60 const Real32 hCellWidth,61 const Color3f &color )58 GeometryTransitPtr makeGridGeo(const Real32 width, 59 const Real32 depth, 60 const Real32 hCellWidth, 61 const Color3f &color ) 62 62 { 63 63 Int32 nCols, nRows; … … 67 67 Color3f(color[0] - 0.4, color[1] - 0.4, color[2] - 0.4); 68 68 69 Geometry Ptr geo = Geometry::create();70 GeoPnt3fProperty Ptr pnts = GeoPnt3fProperty ::create();71 GeoUInt32Property Ptr lens = GeoUInt32Property ::create();72 GeoUInt8Property Ptr types = GeoUInt8Property ::create();73 GeoColor3fProperty Ptr colors = GeoColor3fProperty::create();69 GeometryTransitPtr geo = Geometry::create(); 70 GeoPnt3fPropertyUnrecPtr pnts = GeoPnt3fProperty ::create(); 71 GeoUInt32PropertyUnrecPtr lens = GeoUInt32Property ::create(); 72 GeoUInt8PropertyUnrecPtr types = GeoUInt8Property ::create(); 73 GeoColor3fPropertyUnrecPtr colors = GeoColor3fProperty::create(); 74 74 // GeoIndicesUI32Ptr indices = GeoIndicesUI32::create(); 75 SimpleMaterial Ptr mat = SimpleMaterial::create();75 SimpleMaterialUnrecPtr mat = SimpleMaterial::create(); 76 76 77 77 Real32 height (0.0 ); … … 156 156 } 157 157 158 Geometry Ptr makeGridBorderGeo(const Real32 width,159 const Real32 depth,160 const Color3f &color)158 GeometryTransitPtr makeGridBorderGeo(const Real32 width, 159 const Real32 depth, 160 const Color3f &color) 161 161 { 162 162 const Color3f darkerColor = 163 163 Color3f( color[0]-0.4, color[1]-0.4, color[2]-0.4 ); 164 164 165 Geometry Ptr geo = Geometry::create();166 GeoPnt3fProperty Ptr pnts = GeoPnt3fProperty::create();167 GeoUInt32Property Ptr lens = GeoUInt32Property::create();168 GeoUInt8Property Ptr types = GeoUInt8Property::create();169 GeoColor3fProperty Ptr colors = GeoColor3fProperty::create();165 GeometryTransitPtr geo = Geometry::create(); 166 GeoPnt3fPropertyUnrecPtr pnts = GeoPnt3fProperty::create(); 167 GeoUInt32PropertyUnrecPtr lens = GeoUInt32Property::create(); 168 GeoUInt8PropertyUnrecPtr types = GeoUInt8Property::create(); 169 GeoColor3fPropertyUnrecPtr colors = GeoColor3fProperty::create(); 170 170 // GeoIndicesUI32Ptr indices = GeoIndicesUI32::create(); 171 SimpleMaterial Ptr mat = SimpleMaterial::create();172 LineChunk Ptr lineChunk = LineChunk::create();171 SimpleMaterialUnrecPtr mat = SimpleMaterial::create(); 172 LineChunkUnrecPtr lineChunk = LineChunk::create(); 173 173 174 174 Real32 height (0.0 ); … … 249 249 * The grid has the base color <i>color</i>. 250 250 */ 251 Node Ptr makeGrid(const Real32 width,252 const Real32 depth,253 const Real32 hCellWidth,254 const Color3f &color )255 { 256 Node PtrgrpNode = Node::create();257 Group PtrgrpCore = Group::create();258 Node PtrgridNode = Node::create();259 Node PtrborderNode = Node::create();251 NodeTransitPtr makeGrid(const Real32 width, 252 const Real32 depth, 253 const Real32 hCellWidth, 254 const Color3f &color ) 255 { 256 NodeTransitPtr grpNode = Node::create(); 257 GroupUnrecPtr grpCore = Group::create(); 258 NodeUnrecPtr gridNode = Node::create(); 259 NodeUnrecPtr borderNode = Node::create(); 260 260 261 261 gridNode->setCore (makeGridGeo(width, depth, hCellWidth, color)); … … 272 272 273 273 274 Node Ptr makeSelection(NodePtr geoN)275 { 276 Node PtrtransN = Node::create();277 Node Ptr node = Node::create();278 ComponentTransform Ptr transC = ComponentTransform::create();274 NodeTransitPtr makeSelection(NodePtr geoN) 275 { 276 NodeTransitPtr transN = Node::create(); 277 NodeUnrecPtr node = Node::create(); 278 ComponentTransformUnrecPtr transC = ComponentTransform::create(); 279 279 280 280 node->setCore(makeSelectionGeo(geoN)); … … 283 283 transN->addChild(node ); 284 284 285 addRef(transN);286 287 285 commitChanges(); 288 286 … … 290 288 } 291 289 292 Geometry Ptr makeSelectionGeo(NodePtr geoN)290 GeometryTransitPtr makeSelectionGeo(NodePtr geoN) 293 291 { 294 292 Pnt3f min, max; 295 293 geoN->getVolume().getBounds(min, max); 296 294 297 Geometry Ptrgeo = Geometry::create();298 GeoPnt3fProperty Ptr newPnts = GeoPnt3fProperty::create();299 GeoUInt32Property Ptr lens = GeoUInt32Property::create();300 GeoUInt8Property Ptr types = GeoUInt8Property::create();301 GeoColor3fProperty Ptr colors = GeoColor3fProperty::create();295 GeometryTransitPtr geo = Geometry::create(); 296 GeoPnt3fPropertyUnrecPtr newPnts = GeoPnt3fProperty::create(); 297 GeoUInt32PropertyUnrecPtr lens = GeoUInt32Property::create(); 298 GeoUInt8PropertyUnrecPtr types = GeoUInt8Property::create(); 299 GeoColor3fPropertyUnrecPtr colors = GeoColor3fProperty::create(); 302 300 303 301 // GeoIndicesUI32Ptr indices = GeoIndicesUI32::create(); 304 SimpleMaterial Ptr mat = SimpleMaterial::create();305 306 LineChunk Ptr lineChunk = LineChunk::create();302 SimpleMaterialUnrecPtr mat = SimpleMaterial::create(); 303 304 LineChunkUnrecPtr lineChunk = LineChunk::create(); 307 305 308 306 GeometryPtr selGeoC = dynamic_cast<GeometryPtr>(geoN->getCore()); … … 350 348 351 349 352 PolygonChunk Ptr _gayaPolygonChunk;350 PolygonChunkUnrecPtr _gayaPolygonChunk; 353 351 354 352 PolygonChunkPtr getPolygonChunk(const UInt16 faces, … … 358 356 { 359 357 _gayaPolygonChunk = PolygonChunk::create(); 360 361 addRef(_gayaPolygonChunk);362 358 363 359 _gayaPolygonChunk->setCullFace(faces); … … 374 370 } 375 371 376 MaterialChunk Ptr _gayaMaterialChunk;372 MaterialChunkRecPtr _gayaMaterialChunk; 377 373 378 374 MaterialChunkPtr getMaterialChunk(const Color4f &ambientColor, … … 385 381 _gayaMaterialChunk = MaterialChunk::create(); 386 382 387 addRef(_gayaMaterialChunk);388 389 383 _gayaMaterialChunk->setDiffuse(diffuseColor); 390 384 _gayaMaterialChunk->setAmbient(ambientColor); … … 397 391 } 398 392 399 ChunkMaterial Ptr _gayaSelectionMaterial;393 ChunkMaterialRecPtr _gayaSelectionMaterial; 400 394 401 395 ChunkMaterialPtr getSelectionMaterial() … … 404 398 { 405 399 _gayaSelectionMaterial = ChunkMaterial::create(); 406 407 addRef(_gayaSelectionMaterial);408 400 409 401 _gayaSelectionMaterial->addChunk(getPolygonChunk()); trunk/Source/Contrib/Manipulators/OSGSimpleGeometryExt.h
r837 r1168 66 66 * \ingroup SimpleGeometry 67 67 */ 68 OSG_CONTRIBGUI_DLLMAPPING GeometryPtr makeGridGeo(const Real32 width, 69 const Real32 depth, 70 const Real32 horCellWidth, 71 const Color3f &color ); 68 OSG_CONTRIBGUI_DLLMAPPING 69 GeometryTransitPtr makeGridGeo(const Real32 width, 70 const Real32 depth, 71 const Real32 horCellWidth, 72 const Color3f &color ); 72 73 73 74 … … 75 76 * \ingroup SimpleGeometry 76 77 */ 77 OSG_CONTRIBGUI_DLLMAPPING NodePtr makeGrid(const Real32 width, 78 const Real32 depth, 79 const Real32 horCellWidth, 80 const Color3f &color ); 78 OSG_CONTRIBGUI_DLLMAPPING 79 NodeTransitPtr makeGrid(const Real32 width, 80 const Real32 depth, 81 const Real32 horCellWidth, 82 const Color3f &color ); 81 83 82 OSG_CONTRIBGUI_DLLMAPPING NodePtr makeSelection(NodePtr); 84 OSG_CONTRIBGUI_DLLMAPPING 85 NodeTransitPtr makeSelection(NodePtr); 83 86 84 OSG_CONTRIBGUI_DLLMAPPING GeometryPtr makeSelectionGeo(NodePtr); 87 OSG_CONTRIBGUI_DLLMAPPING 88 GeometryTransitPtr makeSelectionGeo(NodePtr); 85 89 86 90 trunk/Source/Contrib/Manipulators/build.info
r1085 r1168 23 23 test_libpath.append(option.libDir) 24 24 25 stop_traversal = Truetrunk/Source/Contrib/Manipulators/testManipulators.cpp
r790 r1168 16 16 OSG_USING_NAMESPACE 17 17 18 Node Ptr scene = NullFC;19 Transform Ptr interTC = NullFC;20 Node Ptr interN = NullFC;21 Node Ptr maniN = NullFC;18 NodeRefPtr scene = NullFC; 19 TransformRefPtr interTC = NullFC; 20 NodeRefPtr interN = NullFC; 21 NodeRefPtr maniN = NullFC; 22 22 23 23 ManipulatorManager *mama; … … 25 25 26 26 int setupGLUT( int *argc, char *argv[] ); 27 Node Ptr makeCoordAxes(void);27 NodeTransitPtr makeCoordAxes(void); 28 28 29 29 int main(int argc, char **argv) … … 32 32 int winid = setupGLUT(&argc, argv); 33 33 34 GLUTWindow Ptr gwin= GLUTWindow::create();34 GLUTWindowUnrecPtr gwin= GLUTWindow::create(); 35 35 gwin->setGlutId(winid); 36 36 gwin->init(); … … 39 39 mama = new ManipulatorManager; 40 40 41 Group Ptr g = Group::create();41 GroupUnrecPtr g = Group::create(); 42 42 scene = Node::create(); 43 43 … … 144 144 switch(k) 145 145 { 146 case 27: exit(1); 146 case 27: 147 delete mama; 148 delete mgr; 149 scene = NullFC; 150 interTC = NullFC; 151 interN = NullFC; 152 maniN = NullFC; 153 osgExit(); 154 exit(1); 147 155 case ' ': 148 156 { … … 194 202 } 195 203 196 Geometry Ptr makeCoordAxesGeo(void)197 { 198 Geometry Ptr axesG = Geometry::create();199 200 GeoUInt8Property Ptr type = GeoUInt8Property::create();204 GeometryTransitPtr makeCoordAxesGeo(void) 205 { 206 GeometryTransitPtr axesG = Geometry::create(); 207 208 GeoUInt8PropertyUnrecPtr type = GeoUInt8Property::create(); 201 209 type->addValue(GL_LINES ); 202 210 type->addValue(GL_TRIANGLES); 203 211 204 GeoUInt32Property Ptr lens = GeoUInt32Property::create();212 GeoUInt32PropertyUnrecPtr lens = GeoUInt32Property::create(); 205 213 lens->addValue(6); 206 214 lens->addValue(9); 207 215 208 GeoPnt3fProperty Ptr pnts = GeoPnt3fProperty::create();216 GeoPnt3fPropertyUnrecPtr pnts = GeoPnt3fProperty::create(); 209 217 // the 6 points of the three Lines 210 218 pnts->addValue(Pnt3f(0, 0, 0)); … … 230 238 pnts->addValue(Pnt3f(-0.2, -0.2, 0.8)); 231 239 232 GeoColor3fProperty Ptr colors = GeoColor3fProperty::create();240 GeoColor3fPropertyUnrecPtr colors = GeoColor3fProperty::create(); 233 241 colors->addValue(Color3f(1, 0, 0)); 234 242 colors->addValue(Color3f(1, 0, 0)); … … 261 269 } 262 270 263 Node Ptr makeCoordAxes(void)264 { 265 Node Ptr axesN = Node::create();271 NodeTransitPtr makeCoordAxes(void) 272 { 273 NodeTransitPtr axesN = Node::create(); 266 274 267 275 axesN->setCore(makeCoordAxesGeo()); trunk/Source/System/Material/Base/OSGMaterial.cpp
r1097 r1168 226 226 Stores the default material used by the Simple Geometry. 227 227 */ 228 static SimpleMaterial UnrecPtr _defaultMaterial;228 static SimpleMaterialRecPtr _defaultMaterial; 229 229 230 230 /*! \ingroup GrpSystemDrawablesGeometrySimpleGeometry … … 257 257 Stores the default unlit material. 258 258 */ 259 static SimpleMaterial UnrecPtr _defaultUnlitMaterial;259 static SimpleMaterialRecPtr _defaultUnlitMaterial; 260 260 261 261 /*! \ingroup GrpSystemDrawablesGeometrySimpleGeometry
