source: trunk/packages/vizservers/vtkvis/RpGroup.h @ 3154

Last change on this file since 3154 was 3154, checked in by ldelgass, 12 years ago

Add new 3d drawing shapes

  • Property svn:eol-style set to native
File size: 1007 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2012, Purdue Research Foundation
4 *
5 * Author: Leif Delgass <ldelgass@purdue.edu>
6 */
7
8#ifndef __RAPPTURE_VTKVIS_GROUP_H__
9#define __RAPPTURE_VTKVIS_GROUP_H__
10
11#include <tr1/unordered_map>
12
13#include <vtkProp3D.h>
14
15#include "RpVtkGraphicsObject.h"
16
17namespace Rappture {
18namespace VtkVis {
19
20/**
21 * \brief Collection of shapes with grouping
22 */
23class Group : public VtkGraphicsObject {
24public:
25    typedef std::string NodeId;
26    typedef std::tr1::unordered_map<NodeId, VtkGraphicsObject *> NodeHashmap;
27
28    Group(const NodeId& name);
29    virtual ~Group();
30
31    virtual const char *getClassName() const
32    {
33        return "Group";
34    }
35
36    void addChild(const NodeId& name, VtkGraphicsObject *obj);
37
38    VtkGraphicsObject *getChild(const NodeId& name);
39
40    void removeChild(const NodeId& name);
41
42private:
43    Group();
44
45    virtual void initProp();
46
47    virtual void update();
48
49    NodeHashmap _nodes;
50};
51
52}
53}
54
55#endif
Note: See TracBrowser for help on using the repository browser.