]> git.tdb.fi Git - r2c2.git/blob - source/3d/allocation.h
Make some internal colors darker to match linear color space
[r2c2.git] / source / 3d / allocation.h
1 #ifndef R2C2_3D_ALLOCATION_H_
2 #define R2C2_3D_ALLOCATION_H_
3
4 #include <msp/gl/color.h>
5 #include "libr2c2/train.h"
6 #include "utility.h"
7
8 namespace R2C2 {
9
10 class Layout3D;
11 class Path3D;
12
13 class Allocation3D: public Utility3D, public sigc::trackable
14 {
15 private:
16         typedef std::list<Path3D *> PathList;
17         typedef std::map<Block *, PathList> PathMap;
18
19         Train &train;
20         Msp::GL::Color color;
21         PathMap paths;
22
23 public:
24         Allocation3D(Layout3D &, Train &);
25
26         void set_color(const Msp::GL::Color &);
27 private:
28         Msp::GL::Color get_color_for_block(const Block &) const;
29
30         void block_reserved(Block &, Train *);
31         void train_advanced(Block &);
32 };
33
34 } // namespace R2C2
35
36 #endif