otsdaq  v1_01_02
 All Classes Namespaces Functions
Visual3DGeometry.h
1 #ifndef _ots_Visual3DGeometry_h
2 #define _ots_Visual3DGeometry_h
3 
4 #include "otsdaq-core/MonicelliInterface/Visual3DEvent.h"
5 
6 #include <vector>
7 
8 namespace ots
9 {
10 
11 class Point
12 {
13 public:
14  double x;
15  double y;
16  double z;
17  Point& operator*(double factor){this->x*=factor;this->y*=factor;this->z*=factor;return *this;}
18 };
19 
20 typedef std::vector<Point> Points;
21 
23 {
24 public:
25  //0->(0,0) 1->(0,numberOfColumns), 2->(numberOfRows,numberOfColumns), 3->(numberOfRows,0)
26  //3-------2
27  //| |
28  //0-------1
29  Points corners;
30  int numberOfRows;
31  int numberOfColumns;
32 };
33 
34 typedef std::vector<Visual3DShape> Visual3DShapes;
35 
37 {
38 public:
39  Visual3DGeometry(){;}
40  virtual ~Visual3DGeometry(void){;}
41 
42  void reset(void){theShapes_.clear();}
43 
44  //Setters
45  void addShape(const Visual3DShape& shape) {theShapes_.push_back(shape);}
46  //Getters
47  const Visual3DShapes& getShapes(void) const {return theShapes_;}
48 
49 private:
50  Visual3DShapes theShapes_;
51 };
52 
53 }
54 
55 #endif