pixled-lib  1.0
mapping.h
1 #ifndef PIXLED_MAPPING_API_H
2 #define PIXLED_MAPPING_API_H
3 
4 #include <vector>
5 #include "geometry.h"
6 
7 namespace pixled {
11  typedef std::size_t index_t;
12 
19  struct led {
28 
37  };
38 
45  bool operator==(const led& l1, const led& l2);
46 
50  struct led_equal {
56  bool operator()(const led& l1, const led& l2) const;
57  };
58 
70  struct Mapping {
71  private:
72  std::vector<led> _leds;
73  bounding_box b_box;
74  public:
78  const std::vector<led>& leds() const {
79  return _leds;
80  }
81 
88  void push(const led& led);
89 
98  box boundingBox() const {return b_box;};
99  };
100 }
101 #endif
Definition: geometry.h:296
Definition: geometry.h:247
Definition: animation.cpp:3
std::size_t index_t
Definition: mapping.h:11
bool operator==(const color &c1, const color &c2)
Definition: color.cpp:181
Definition: mapping.h:70
void push(const led &led)
Definition: mapping.cpp:13
box boundingBox() const
Definition: mapping.h:98
const std::vector< led > & leds() const
Definition: mapping.h:78
Definition: mapping.h:50
bool operator()(const led &l1, const led &l2) const
Definition: mapping.cpp:9
Definition: mapping.h:19
index_t index
Definition: mapping.h:27
point location
Definition: mapping.h:23
led(point location, index_t index)
Definition: mapping.h:35
Definition: geometry.h:23