Changeset 1168

Show
Ignore:
Timestamp:
04/16/08 02:25:04 (4 weeks ago)
Author:
vossg
Message:

changed: merge manipulator changes from carsten
added : *RefPtr? typedef
fixed : use recorded ref counts for global mats

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/Base/Base/OSGContainerForwards.h

    r1126 r1168  
    9494                               WeakRefCountPolicy      > CLASST##WeakPtr;      \ 
    9595    typedef       RefCountPtr< CLASST,                                         \ 
    96                                MTRecordedRefCountPolicy> CLASST##MTRecPtr; 
     96                               MTRecordedRefCountPolicy> CLASST##MTRecPtr;     \ 
     97    typedef       CLASST##RecPtr                         CLASST##RefPtr; 
    9798 
    9899 
  • trunk/Source/Contrib/Manipulators/OSGManipulator.cpp

    r852 r1168  
    144144        { 
    145145            //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? 
    147147        } 
    148148        else 
     
    239239    Inherited::onCreate(source); 
    240240 
    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); 
    244252 
    245253    SimpleMaterialPtr  simpleMat; 
     
    249257 
    250258    // add a name attachment 
    251     NamePtr nameN = Name::create(); 
     259    NameUnrecPtr nameN = Name::create(); 
    252260    nameN->editFieldPtr()->setValue("XManipulator"); 
    253261    addAttachment(nameN); 
    254262 
    255263    // 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); 
    258266 
    259267    // make the red x-axis transform and handle 
    260268 
    261     setTransXNode(Node::create()); 
     269    pNode = Node::create(); 
     270    setTransXNode(pNode); 
    262271    _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 ); 
    270277 
    271278    getTransXNode()->setCore (_transHandleXC  ); 
     
    286293    // make the green y-axis transform and handle 
    287294 
    288     setTransYNode(Node::create()); 
     295    pNode = Node::create(); 
     296    setTransYNode(pNode); 
    289297    _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); 
    297302 
    298303    getTransYNode()->setCore (_transHandleYC  ); 
     
    312317    // make the blue z-axis transform and handle 
    313318 
    314     setTransZNode(Node::create()); 
     319    pNode = Node::create(); 
     320    setTransZNode(pNode); 
    315321    _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); 
    323326 
    324327    getTransZNode()->setCore (_transHandleZC); 
     
    340343void Manipulator::onDestroy() 
    341344{ 
    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 
     347void Manipulator::resolveLinks(void) 
     348
     349    Inherited::resolveLinks(); 
     350 
     351    _activeParent  = NullFC; 
     352 
     353    _transHandleXC = NullFC; 
     354    _transHandleYC = NullFC; 
     355    _transHandleZC = NullFC; 
    359356} 
    360357 
  • trunk/Source/Contrib/Manipulators/OSGManipulator.h

    r852 r1168  
    122122    void    onDestroy(); 
    123123 
     124    virtual void resolveLinks(void); 
     125 
    124126    /*! \}                                                                 */ 
    125127    /*---------------------------------------------------------------------*/ 
     
    131133    /*! \}                                                                 */ 
    132134 
    133     virtual NodePtr 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(); 
    137139 
    138140    virtual void    doMovement(      TransformPtr t, 
     
    147149                               const ViewportPtr &port); 
    148150 
    149     NodePtr                 _activeParent; 
     151    NodeUnrecPtr            _activeParent; 
    150152    ExternalUpdateHandler*  _externalUpdateHandler; 
    151153 
     
    153155  private: 
    154156 
    155     ComponentTransformPtr _transHandleXC; 
    156     ComponentTransformPtr _transHandleYC; 
    157     ComponentTransformPtr _transHandleZC; 
     157    ComponentTransformUnrecPtr _transHandleXC; 
     158    ComponentTransformUnrecPtr _transHandleYC; 
     159    ComponentTransformUnrecPtr _transHandleZC; 
    158160 
    159161    friend class FieldContainer; 
  • trunk/Source/Contrib/Manipulators/OSGManipulatorManager.cpp

    r784 r1168  
    5151// wenn der ManipulatorManager sich den Node merken wuerde!?! 
    5252 
    53 NodePtr ManipulatorManager::createManipulator(const ManipulatorType type) 
     53NodeTransitPtr ManipulatorManager::createManipulator(const ManipulatorType type) 
    5454{ 
    55     NodePtr maniN = Node::create(); 
     55    NodeTransitPtr maniN = Node::create(); 
    5656     
    5757    switch (type) 
     
    8383        if ( ! _maniC->getParents().empty() ) 
    8484        { 
    85             NodePtr maniN = dynamic_cast<NodePtr>(_maniC->getParents()[0].getCPtr()); 
     85            NodePtr maniN = dynamic_cast<NodePtr>(_maniC->getParents()[0]); 
    8686 
    8787            _maniC = NullFC; 
  • trunk/Source/Contrib/Manipulators/OSGManipulatorManager.h

    r827 r1168  
    5454    enum    ManipulatorType { ROTATE, SCALE, TRANSLATE }; 
    5555 
    56     NodePtr 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   ); 
    5959     
    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              ); 
    6363     
    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     ); 
    7272private: 
    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; 
    7778}; 
    7879 
  • trunk/Source/Contrib/Manipulators/OSGMoveManipulator.cpp

    r998 r1168  
    137137} 
    138138 
    139 NodePtr MoveManipulator::makeHandleGeo() 
     139NodeTransitPtr MoveManipulator::makeHandleGeo() 
    140140{ 
    141141    return makeCone(0.75, 0.1, 12, true, true); 
  • trunk/Source/Contrib/Manipulators/OSGMoveManipulator.h

    r852 r1168  
    9797    /*! \}                                                                 */ 
    9898 
    99     virtual NodePtr 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); 
    107107 
    108108    /*==========================  PRIVATE  ================================*/ 
  • trunk/Source/Contrib/Manipulators/OSGRotateManipulator.cpp

    r998 r1168  
    138138} 
    139139 
    140 NodePtr RotateManipulator::makeHandleGeo() 
     140NodeTransitPtr RotateManipulator::makeHandleGeo() 
    141141{ 
    142142    return makeSphere(2, 0.2); 
  • trunk/Source/Contrib/Manipulators/OSGRotateManipulator.h

    r852 r1168  
    9696    /*! \}                                                                 */ 
    9797 
    98     virtual NodePtr 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); 
    106106 
    107107    /*==========================  PRIVATE  ================================*/ 
  • trunk/Source/Contrib/Manipulators/OSGScaleManipulator.cpp

    r998 r1168  
    137137} 
    138138 
    139 NodePtr ScaleManipulator::makeHandleGeo() 
     139NodeTransitPtr ScaleManipulator::makeHandleGeo() 
    140140{ 
    141141    return makeCylinder(0.75, 0.1, 12, true, true, true); 
  • trunk/Source/Contrib/Manipulators/OSGScaleManipulator.h

    r852 r1168  
    9696    /*! \}                                                                 */ 
    9797 
    98     virtual NodePtr 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); 
    106106 
    107107    /*==========================  PRIVATE  ================================*/ 
  • trunk/Source/Contrib/Manipulators/OSGSimpleGeometryExt.cpp

    r837 r1168  
    5656OSG_BEGIN_NAMESPACE 
    5757 
    58 GeometryPtr makeGridGeo(const Real32   width, 
    59                         const Real32   depth, 
    60                         const Real32   hCellWidth, 
    61                         const Color3f &color     ) 
     58GeometryTransitPtr makeGridGeo(const Real32   width, 
     59                               const Real32   depth, 
     60                               const Real32   hCellWidth, 
     61                               const Color3f &color     ) 
    6262{ 
    6363    Int32       nCols, nRows; 
     
    6767        Color3f(color[0] - 0.4, color[1] - 0.4, color[2] - 0.4); 
    6868 
    69     GeometryPtr           geo     = Geometry::create(); 
    70     GeoPnt3fPropertyPtr   pnts    = GeoPnt3fProperty  ::create(); 
    71     GeoUInt32PropertyPtr  lens    = GeoUInt32Property ::create(); 
    72     GeoUInt8PropertyPtr   types   = GeoUInt8Property  ::create(); 
    73     GeoColor3fPropertyPtr 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(); 
    7474//    GeoIndicesUI32Ptr  indices = GeoIndicesUI32::create(); 
    75     SimpleMaterialPtr  mat     = SimpleMaterial::create(); 
     75    SimpleMaterialUnrecPtr  mat     = SimpleMaterial::create(); 
    7676 
    7777    Real32 height   (0.0        ); 
     
    156156} 
    157157 
    158 GeometryPtr makeGridBorderGeo(const Real32   width, 
    159                               const Real32   depth, 
    160                               const Color3f &color) 
     158GeometryTransitPtr makeGridBorderGeo(const Real32   width, 
     159                                     const Real32   depth, 
     160                                     const Color3f &color) 
    161161{ 
    162162    const Color3f darkerColor = 
    163163        Color3f( color[0]-0.4, color[1]-0.4, color[2]-0.4 ); 
    164164 
    165     GeometryPtr           geo    = Geometry::create(); 
    166     GeoPnt3fPropertyPtr   pnts   = GeoPnt3fProperty::create(); 
    167     GeoUInt32PropertyPtr  lens   = GeoUInt32Property::create(); 
    168     GeoUInt8PropertyPtr   types  = GeoUInt8Property::create(); 
    169     GeoColor3fPropertyPtr 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(); 
    170170//    GeoIndicesUI32Ptr  indices   = GeoIndicesUI32::create(); 
    171     SimpleMaterialPtr  mat       = SimpleMaterial::create(); 
    172     LineChunkPtr       lineChunk = LineChunk::create(); 
     171    SimpleMaterialUnrecPtr  mat       = SimpleMaterial::create(); 
     172    LineChunkUnrecPtr       lineChunk = LineChunk::create(); 
    173173 
    174174    Real32 height   (0.0        ); 
     
    249249 * The grid has the base color <i>color</i>. 
    250250 */ 
    251 NodePtr makeGrid(const Real32   width, 
    252                  const Real32   depth, 
    253                  const Real32   hCellWidth, 
    254                  const Color3f &color     ) 
    255 { 
    256     NodePtr grpNode    = Node::create(); 
    257     GroupPtr grpCore    = Group::create(); 
    258     NodePtr  gridNode   = Node::create(); 
    259     NodePtr  borderNode = Node::create(); 
     251NodeTransitPtr 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(); 
    260260 
    261261    gridNode->setCore  (makeGridGeo(width, depth, hCellWidth, color)); 
     
    272272 
    273273 
    274 NodePtr makeSelection(NodePtr geoN) 
    275 { 
    276     NodePtr               transN = Node::create(); 
    277     NodePtr               node   = Node::create(); 
    278     ComponentTransformPtr transC = ComponentTransform::create(); 
     274NodeTransitPtr makeSelection(NodePtr geoN) 
     275{ 
     276    NodeTransitPtr             transN = Node::create(); 
     277    NodeUnrecPtr               node   = Node::create(); 
     278    ComponentTransformUnrecPtr transC = ComponentTransform::create(); 
    279279 
    280280    node->setCore(makeSelectionGeo(geoN)); 
     
    283283    transN->addChild(node  ); 
    284284 
    285     addRef(transN); 
    286  
    287285    commitChanges(); 
    288286 
     
    290288} 
    291289 
    292 GeometryPtr makeSelectionGeo(NodePtr geoN) 
     290GeometryTransitPtr makeSelectionGeo(NodePtr geoN) 
    293291{ 
    294292    Pnt3f min, max; 
    295293    geoN->getVolume().getBounds(min, max); 
    296294 
    297     GeometryPtr           geo       = Geometry::create(); 
    298     GeoPnt3fPropertyPtr   newPnts   = GeoPnt3fProperty::create(); 
    299     GeoUInt32PropertyPtr  lens      = GeoUInt32Property::create(); 
    300     GeoUInt8PropertyPtr   types     = GeoUInt8Property::create(); 
    301     GeoColor3fPropertyPtr 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(); 
    302300 
    303301//    GeoIndicesUI32Ptr  indices   = GeoIndicesUI32::create(); 
    304     SimpleMaterialPtr  mat       = SimpleMaterial::create(); 
    305  
    306     LineChunkPtr       lineChunk = LineChunk::create(); 
     302    SimpleMaterialUnrecPtr  mat       = SimpleMaterial::create(); 
     303 
     304    LineChunkUnrecPtr       lineChunk = LineChunk::create(); 
    307305 
    308306    GeometryPtr selGeoC = dynamic_cast<GeometryPtr>(geoN->getCore()); 
     
    350348 
    351349 
    352 PolygonChunkPtr _gayaPolygonChunk; 
     350PolygonChunkUnrecPtr _gayaPolygonChunk; 
    353351 
    354352PolygonChunkPtr getPolygonChunk(const UInt16 faces, 
     
    358356    { 
    359357        _gayaPolygonChunk = PolygonChunk::create(); 
    360  
    361         addRef(_gayaPolygonChunk); 
    362358 
    363359        _gayaPolygonChunk->setCullFace(faces); 
     
    374370} 
    375371 
    376 MaterialChunkPtr _gayaMaterialChunk; 
     372MaterialChunkRecPtr _gayaMaterialChunk; 
    377373 
    378374MaterialChunkPtr getMaterialChunk(const Color4f &ambientColor, 
     
    385381        _gayaMaterialChunk = MaterialChunk::create(); 
    386382 
    387         addRef(_gayaMaterialChunk); 
    388  
    389383        _gayaMaterialChunk->setDiffuse(diffuseColor); 
    390384        _gayaMaterialChunk->setAmbient(ambientColor); 
     
    397391} 
    398392 
    399 ChunkMaterialPtr _gayaSelectionMaterial; 
     393ChunkMaterialRecPtr _gayaSelectionMaterial; 
    400394 
    401395ChunkMaterialPtr getSelectionMaterial() 
     
    404398    { 
    405399        _gayaSelectionMaterial = ChunkMaterial::create(); 
    406  
    407         addRef(_gayaSelectionMaterial); 
    408400 
    409401        _gayaSelectionMaterial->addChunk(getPolygonChunk()); 
  • trunk/Source/Contrib/Manipulators/OSGSimpleGeometryExt.h

    r837 r1168  
    6666 *  \ingroup SimpleGeometry 
    6767 */ 
    68 OSG_CONTRIBGUI_DLLMAPPING GeometryPtr makeGridGeo(const Real32   width, 
    69                                                   const Real32   depth, 
    70                                                   const Real32   horCellWidth, 
    71                                                   const Color3f &color       ); 
     68OSG_CONTRIBGUI_DLLMAPPING  
     69GeometryTransitPtr makeGridGeo(const Real32   width, 
     70                               const Real32   depth, 
     71                               const Real32   horCellWidth, 
     72                               const Color3f &color       ); 
    7273 
    7374 
     
    7576 *  \ingroup SimpleGeometry 
    7677 */ 
    77 OSG_CONTRIBGUI_DLLMAPPING NodePtr makeGrid(const Real32   width, 
    78                                            const Real32   depth, 
    79                                            const Real32   horCellWidth, 
    80                                            const Color3f &color       ); 
     78OSG_CONTRIBGUI_DLLMAPPING  
     79NodeTransitPtr makeGrid(const Real32   width, 
     80                        const Real32   depth, 
     81                        const Real32   horCellWidth, 
     82                        const Color3f &color       ); 
    8183 
    82 OSG_CONTRIBGUI_DLLMAPPING NodePtr makeSelection(NodePtr); 
     84OSG_CONTRIBGUI_DLLMAPPING  
     85NodeTransitPtr makeSelection(NodePtr); 
    8386 
    84 OSG_CONTRIBGUI_DLLMAPPING GeometryPtr makeSelectionGeo(NodePtr); 
     87OSG_CONTRIBGUI_DLLMAPPING  
     88GeometryTransitPtr makeSelectionGeo(NodePtr); 
    8589 
    8690 
  • trunk/Source/Contrib/Manipulators/build.info

    r1085 r1168  
    2323            test_libpath.append(option.libDir) 
    2424 
    25 stop_traversal = True 
  • trunk/Source/Contrib/Manipulators/testManipulators.cpp

    r790 r1168  
    1616OSG_USING_NAMESPACE 
    1717 
    18 NodePtr         scene   = NullFC; 
    19 TransformPtr    interTC = NullFC; 
    20 NodePtr         interN  = NullFC; 
    21 NodePtr         maniN   = NullFC; 
     18NodeRefPtr         scene   = NullFC; 
     19TransformRefPtr    interTC = NullFC; 
     20NodeRefPtr         interN  = NullFC; 
     21NodeRefPtr         maniN   = NullFC; 
    2222 
    2323ManipulatorManager *mama; 
     
    2525 
    2626int setupGLUT( int *argc, char *argv[] ); 
    27 NodePtr makeCoordAxes(void); 
     27NodeTransitPtr makeCoordAxes(void); 
    2828 
    2929int main(int argc, char **argv) 
     
    3232    int winid = setupGLUT(&argc, argv); 
    3333 
    34     GLUTWindowPtr gwin= GLUTWindow::create(); 
     34    GLUTWindowUnrecPtr gwin= GLUTWindow::create(); 
    3535    gwin->setGlutId(winid); 
    3636    gwin->init(); 
     
    3939    mama = new ManipulatorManager; 
    4040 
    41     GroupPtr g = Group::create(); 
     41    GroupUnrecPtr g = Group::create(); 
    4242    scene = Node::create(); 
    4343 
     
    144144    switch(k) 
    145145    { 
    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); 
    147155    case ' ': 
    148156    { 
     
    194202} 
    195203 
    196 GeometryPtr makeCoordAxesGeo(void) 
    197 { 
    198     GeometryPtr axesG = Geometry::create(); 
    199  
    200     GeoUInt8PropertyPtr type = GeoUInt8Property::create(); 
     204GeometryTransitPtr makeCoordAxesGeo(void) 
     205{ 
     206    GeometryTransitPtr axesG = Geometry::create(); 
     207 
     208    GeoUInt8PropertyUnrecPtr type = GeoUInt8Property::create(); 
    201209    type->addValue(GL_LINES    ); 
    202210    type->addValue(GL_TRIANGLES); 
    203211 
    204     GeoUInt32PropertyPtr lens = GeoUInt32Property::create(); 
     212    GeoUInt32PropertyUnrecPtr lens = GeoUInt32Property::create(); 
    205213    lens->addValue(6); 
    206214    lens->addValue(9); 
    207215 
    208     GeoPnt3fPropertyPtr pnts = GeoPnt3fProperty::create(); 
     216    GeoPnt3fPropertyUnrecPtr pnts = GeoPnt3fProperty::create(); 
    209217    // the 6 points of the three Lines 
    210218    pnts->addValue(Pnt3f(0, 0, 0)); 
     
    230238    pnts->addValue(Pnt3f(-0.2, -0.2, 0.8)); 
    231239 
    232     GeoColor3fPropertyPtr colors = GeoColor3fProperty::create(); 
     240    GeoColor3fPropertyUnrecPtr colors = GeoColor3fProperty::create(); 
    233241    colors->addValue(Color3f(1, 0, 0)); 
    234242    colors->addValue(Color3f(1, 0, 0)); 
     
    261269} 
    262270 
    263 NodePtr makeCoordAxes(void) 
    264 { 
    265     NodePtr axesN = Node::create(); 
     271NodeTransitPtr makeCoordAxes(void) 
     272{ 
     273    NodeTransitPtr axesN = Node::create(); 
    266274 
    267275    axesN->setCore(makeCoordAxesGeo()); 
  • trunk/Source/System/Material/Base/OSGMaterial.cpp

    r1097 r1168  
    226226    Stores the default material used by the Simple Geometry. 
    227227*/ 
    228 static SimpleMaterialUnrecPtr _defaultMaterial; 
     228static SimpleMaterialRecPtr _defaultMaterial; 
    229229 
    230230/*! \ingroup GrpSystemDrawablesGeometrySimpleGeometry 
     
    257257    Stores the default unlit material. 
    258258*/ 
    259 static SimpleMaterialUnrecPtr _defaultUnlitMaterial; 
     259static SimpleMaterialRecPtr _defaultUnlitMaterial; 
    260260 
    261261/*! \ingroup GrpSystemDrawablesGeometrySimpleGeometry