Virtual Testbed
Ship dynamics simulator for extreme conditions
IndexBuffer.hh
1 #ifndef VTESTBED_GRAPHICS_INDEXBUFFER_HH
2 #define VTESTBED_GRAPHICS_INDEXBUFFER_HH
3 
4 #include <blitz/array.h>
5 
6 #include <vtestbed/geometry/types.hh>
7 #include <vtestbed/graphics/types.hh>
8 
9 namespace vtb {
10 
11  namespace graphics {
12 
13  class IndexBuffer: public Buffer {
14 
15  public:
16  using graphics_index_type = UnsignedInt;
17  using core_index_type = int;
19  using core_array_type = blitz::Array<face_type,1>;
21 
22  public:
23 
24  inline
25  IndexBuffer():
26  Buffer{Buffer::TargetHint::ElementArray}
27  {}
28 
29  IndexBuffer(core_array_type faces, BufferUsage usage);
30 
31  void setIndices(core_array_type faces, BufferUsage usage);
32  void setIndices(const face_array& faces, BufferUsage usage);
33 
34  };
35 
36  }
37 
38 }
39 
40 #endif // vim:filetype=cpp
Main namespace.
Definition: convert.hh:9