Changeset 3171


Ignore:
Timestamp:
Sep 18, 2012, 7:47:22 PM (12 years ago)
Author:
ldelgass
Message:

updates to Group

Location:
trunk/packages/vizservers/vtkvis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/RpGroup.cpp

    r3154 r3171  
    6767    _nodes.erase(itr);
    6868}
     69
     70/**
     71 * \brief Set a group of world coordinate planes to clip rendering
     72 *
     73 * Passing NULL for planes will remove all cliping planes
     74 */
     75void Group::setClippingPlanes(vtkPlaneCollection *planes)
     76{
     77    for (NodeHashmap::iterator itr = _nodes.begin();
     78         itr != _nodes.end(); ++itr) {
     79        itr->second->setClippingPlanes(planes);
     80    }
     81}
  • trunk/packages/vizservers/vtkvis/RpGroup.h

    r3154 r3171  
    2626    typedef std::tr1::unordered_map<NodeId, VtkGraphicsObject *> NodeHashmap;
    2727
    28     Group(const NodeId& name);
     28    Group();
    2929    virtual ~Group();
    3030
     
    3434    }
    3535
     36    virtual void setDataSet(DataSet *dataSet,
     37                            Renderer *renderer)
     38    {
     39        assert(dataSet == NULL);
     40        update();
     41    }
     42
     43    virtual void setClippingPlanes(vtkPlaneCollection *planes);
     44
    3645    void addChild(const NodeId& name, VtkGraphicsObject *obj);
    3746
    3847    VtkGraphicsObject *getChild(const NodeId& name);
    3948
     49    void getChildren(std::vector<VtkGraphicsObject *>& children)
     50    {
     51        for (NodeHashmap::iterator itr = _nodes.begin();
     52             itr != _nodes.end(); ++itr) {
     53            children.push_back(itr->second);
     54        }
     55    }
     56
    4057    void removeChild(const NodeId& name);
    4158
    4259private:
    43     Group();
    44 
    4560    virtual void initProp();
    4661
Note: See TracChangeset for help on using the changeset viewer.