Drake Designer
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
vtkCollections.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 
5 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6 All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 // .NAME vtkCollections - An orthonormal frame representation
15 // .SECTION Description
16 // An orthonormal frame representation for use with the vtkFrameWidget
17 
18 // .SECTION See Also
19 // vtkFrameWidget vtkFrameWidget
20 
21 
22 #ifndef __vtkCollections_h
23 #define __vtkCollections_h
24 
25 #include "vtkProp.h"
26 
27 #include <vtkOpenGL.h>
28 
29 #include <vtkDRCFiltersModule.h>
30 
31 #include <octomap/AbstractOcTree.h>
32 #include <octomap/OcTreeBase.h>
33 #include <octomap/octomap_types.h>
34 #include <octomap/ColorOcTree.h>
35 #include <octovis/ColorOcTreeDrawer.h>
36 #include <octovis/OcTreeRecord.h>
37 #include <iostream>
38 #include <sstream>
39 
40 
41 class VTKDRCFILTERS_EXPORT vtkCollections : public vtkProp
42 {
43 public:
44  // Description:
45  // Instantiate the class.
46  static vtkCollections *New();
47 
48  // Description:
49  // Standard methods for the class.
50  vtkTypeMacro(vtkCollections,vtkProp);
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
53  void on_obj_collection_data(const char* data);
54  void on_link_collection_data(const char* data);
55  void on_points_collection_data(const char* data);
56  void on_reset_collections_data(const char* data);
57 
58  // Description:
59  // Methods supporting, and required by, the rendering process.
60  virtual void ReleaseGraphicsResources(vtkWindow*);
61  virtual int RenderOpaqueGeometry(vtkViewport*);
62  virtual int RenderOverlay(vtkViewport*);
63  virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
64  virtual int HasTranslucentPolygonalGeometry();
65 
66  class vtkInternal;
67  vtkInternal* Internal;
68 
69  // Getter and Setter
70  int getCollectionsSize();
71  int getCollectionsId(int mapIndex);
72  std::string getCollectionsName(int mapIndex);
73  int getCollectionsType(int mapIndex);
74  bool getCollectionsShow(int mapIndex);
75 
76  void setEnabled(int id, bool show);
77  void removeIdFromCollections(int id);
78 
79  void setRangeStart(double rangeStart);
80  void setRangeEnd(double rangeEnd);
81  void setAlphaPoints(double alphaPoints);
82 
83  void setFillScans(bool colorByTime);
84 
85  void setPointWidth(double pointWidth);
86  void setPoseWidth(double poseWidth);
87  void setColorPoses(bool colorPoses);
88 
89  void setColorByTime(bool colorByTime);
90 
91  void setElevationByTime(bool elevationByTime);
92  void setElevationByCollection(bool elevationByCollection);
93  void setMaxElevation(double maxElevation);
94 
95  void setShowToggle();
96 
97 protected:
99  ~vtkCollections();
100 
101 private:
102 
103 
104 
105  template <class MyCollection>
106  void on_collection_data(const typename MyCollection::my_vs_collection_t *msg);
107 
108  void calculate_ranges(int64_t& range_start, int64_t& range_end);
109 
110  double time_elevation(int64_t id, double z, int collid);
111 
112 
113  vtkCollections(const vtkCollections&); //Not implemented
114  void operator=(const vtkCollections&); //Not implemented
115 };
116 
117 #endif
float z
vtkInternal * Internal
#define VTKDRCFILTERS_EXPORT