Cheetah Software  1.0
VisualizationData.h
Go to the documentation of this file.
1 
5 #ifndef VISUALIZATION_DATA_H
6 #define VISUALIZATION_DATA_H
7 
8 #define VISUALIZATION_MAX_PATH_POINTS 2000
9 #define VISUALIZATION_MAX_PATHS 10
10 #define VISUALIZATION_MAX_ITEMS 100
11 #define VISUALIZATION_MAX_CHEETAHS 0
12 
13 #include "cppTypes.h"
14 
18  double radius;
19 };
20 
26 };
27 
32  float head_width;
33  float head_length;
34  float shaft_width;
35 };
36 
42 };
43 
45  size_t num_points = 0;
48  void clear() {
49  num_points = 0;
50  }
51 };
52 
57  double radius;
58 };
59 
61  size_t num_paths = 0, num_arrows = 0, num_cones = 0, num_spheres = 0,
62  num_blocks = 0;
68 
69  void clear() {
70  num_paths = 0, num_arrows = 0, num_cones = 0, num_spheres = 0, num_blocks = 0;
71  }
72 
74  if(num_spheres < VISUALIZATION_MAX_ITEMS) {
75  return &spheres[num_spheres++];
76  }
77  return nullptr;
78  }
79 
81  if(num_blocks < VISUALIZATION_MAX_ITEMS) {
82  return &blocks[num_blocks++];
83  }
84  return nullptr;
85  }
86 
88  if(num_arrows < VISUALIZATION_MAX_ITEMS) {
89  return &arrows[num_arrows++];
90  }
91  return nullptr;
92  }
93 
95  if(num_cones < VISUALIZATION_MAX_ITEMS) {
96  return &cones[num_cones++];
97  }
98  return nullptr;
99  }
100 
102  if(num_paths < VISUALIZATION_MAX_PATHS) {
103  auto* path = &paths[num_paths++];
104  path->clear();
105  return path;
106  }
107  return nullptr;
108  }
109 };
110 
111 #endif
Vec3< float > point_position
Vec4< float > color
typename Eigen::Matrix< T, 4, 1 > Quat
Definition: cppTypes.h:58
Vec3< float > corner_position
SphereVisualization * addSphere()
typename Eigen::Matrix< T, 3, 1 > Vec3
Definition: cppTypes.h:26
#define VISUALIZATION_MAX_PATHS
Vec4< float > color
Vec3< float > direction
#define VISUALIZATION_MAX_PATH_POINTS
PathVisualization * addPath()
Eigen::Matrix< T, 12, 1 > Vec12
Definition: cppTypes.h:42
typename Eigen::Matrix< T, 4, 1 > Vec4
Definition: cppTypes.h:30
Vec3< float > base_position
Vec3< float > direction
ArrowVisualization * addArrow()
Vec3< float > dimension
#define VISUALIZATION_MAX_ITEMS
ConeVisualization * addCone()
BlockVisualization * addBlock()
Vec3< float > position