Changeset 14241

Show
Ignore:
Timestamp:
09/19/14 12:35:23 (3 hours ago)
Author:
robert
Message:

Moved widgets from VolumeEditorWidget? to TransferFunctionWidget?, and widget utilities into WidgetUtils?.

Location:
OpenSceneGraph/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgkeyboardmouse/osgkeyboardmouse.cpp

    r14195 r14241  
    105105                ++pitr) 
    106106            { 
    107                 osg::Node* parent = *pitr; 
    108                 parent->removeChild(node); 
     107                (*pitr)->removeChild(node); 
    109108            } 
    110109        } 
  • OpenSceneGraph/trunk/examples/osgparticleeffects/osgparticleeffects.cpp

    r14195 r14241  
    335335                osg::ref_ptr<osg::Node> hitNode = hit.nodePath.back(); 
    336336                osg::Node::ParentList parents = hitNode->getParents(); 
    337                 osg::Node* insertGroup = 0; 
     337                osg::Group* insertGroup = 0; 
    338338                unsigned int numGroupsFound = 0; 
    339339                for(osg::Node::ParentList::iterator itr=parents.begin(); 
  • OpenSceneGraph/trunk/include/osg/Node

    r14239 r14241  
    167167 
    168168        /** A vector of osg::Group pointers which is used to store the parent(s) of node.*/ 
    169         typedef std::vector<Node*> ParentList; 
     169        typedef std::vector<Group*> ParentList; 
    170170 
    171171        /** Get the parent list of node. */ 
     
    176176        inline ParentList getParents() { return _parents; } 
    177177 
    178         inline Node* getParent(unsigned int i)  { return _parents[i]; } 
     178        inline Group* getParent(unsigned int i)  { return _parents[i]; } 
    179179 
    180180        /** 
     
    183183         * @return the parent i. 
    184184         */ 
    185         inline const Node* getParent(unsigned int i) const  { return _parents[i]; } 
     185        inline const Group* getParent(unsigned int i) const  { return _parents[i]; } 
    186186 
    187187        /** 
     
    190190         */ 
    191191        inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); } 
    192  
    193  
    194  
    195         /** Provide interface for Composite like Group nodes to implement.*/ 
    196         virtual unsigned int getNumChildren() const { return 0; } 
    197  
    198         /** Provide interface for Composite like Group nodes to implement.*/ 
    199         virtual bool addChild( Node* /*child*/ ) { return false; } 
    200  
    201         /** Provide interface for Composite like Group nodes to implement.*/ 
    202         virtual bool removeChild( Node* /*child*/ ) { return false; } 
    203  
    204         /** Provide interface for Composite like Group nodes to implement.*/ 
    205         virtual bool replaceChild( Node* /*origChild*/, Node* /*newChild*/ ) { return false; } 
    206192 
    207193 
     
    484470        mutable bool                            _boundingSphereComputed; 
    485471 
    486         void addParent(osg::Node* node); 
    487         void removeParent(osg::Node* node); 
     472        void addParent(osg::Group* parent); 
     473        void removeParent(osg::Group* parent); 
    488474 
    489475        ParentList _parents; 
  • OpenSceneGraph/trunk/src/osg/Node.cpp

    r14239 r14241  
    9696} 
    9797 
    98 void Node::addParent(osg::Node* node) 
     98void Node::addParent(osg::Group* parent) 
    9999{ 
    100100    OpenThreads::ScopedPointerLock<OpenThreads::Mutex> lock(getRefMutex()); 
    101101 
    102     _parents.push_back(node); 
    103 } 
    104  
    105 void Node::removeParent(osg::Node* node) 
     102    _parents.push_back(parent); 
     103} 
     104 
     105void Node::removeParent(osg::Group* parent) 
    106106{ 
    107107    OpenThreads::ScopedPointerLock<OpenThreads::Mutex> lock(getRefMutex()); 
    108108 
    109     ParentList::iterator pitr = std::find(_parents.begin(),_parents.end(),node); 
     109    ParentList::iterator pitr = std::find(_parents.begin(), _parents.end(), parent); 
    110110    if (pitr!=_parents.end()) _parents.erase(pitr); 
    111111} 
  • OpenSceneGraph/trunk/src/osgPlugins/txp/TXPParser.cpp

    r14197 r14241  
    317317            for (unsigned int j = 0; j < parents.size(); j++) 
    318318            { 
    319                 osg::Node* parent = parents[j]; 
    320                 if (parent) parent->removeChild(node); 
     319                parents[j]->removeChild(node); 
    321320            } 
    322321        } 
  • OpenSceneGraph/trunk/src/osgUtil/Optimizer.cpp

    r14240 r14241  
    13881388                ++pitr) 
    13891389            { 
    1390                 osg::Node* parent = *pitr; 
     1390                osg::Group* parent = *pitr; 
    13911391                if (!dynamic_cast<osg::Sequence*>(parent) && 
    13921392                    !dynamic_cast<osg::Switch*>(parent) &&