]> git.tdb.fi Git - libs/gl.git/blob - source/geometrybuilder.h
Make Animation::Iterator assignable
[libs/gl.git] / source / geometrybuilder.h
1 #ifndef MSP_GL_GEOMETRYBUILDER_H_
2 #define MSP_GL_GEOMETRYBUILDER_H_
3
4 namespace Msp {
5 namespace GL {
6
7 class Mesh;
8 class PrimitiveBuilder;
9
10 class GeometryBuilder
11 {
12 public:
13         enum TextureFit
14         {
15                 STRETCH,
16                 CROP,
17                 WRAP
18         };
19
20 protected:
21         bool generate_tbn;
22         TextureFit tex_fit;
23
24         GeometryBuilder();
25
26 public:
27         GeometryBuilder &tbn(bool = true);
28         GeometryBuilder &texture_fit(TextureFit);
29 protected:
30         void adjust_texture_scale(float &, float &, float, float) const;
31
32 public:
33         virtual void build(PrimitiveBuilder &) const = 0;
34         void build(Mesh &) const;
35 };
36
37 } // namespace GL
38 } // namespace Msp
39
40 #endif