Virtual Testbed
Ship dynamics simulator for extreme conditions
VertexBuffer.hh
1 #ifndef VTESTBED_GRAPHICS_VERTEXBUFFER_HH
2 #define VTESTBED_GRAPHICS_VERTEXBUFFER_HH
3 
4 #include <blitz/array.h>
5 
6 #include <vtestbed/geometry/polyhedron.hh>
7 #include <vtestbed/graphics/types.hh>
8 
9 namespace vtb {
10 
11  namespace graphics {
12 
13  class VertexBuffer: public Buffer {
14 
15  public:
16  typedef Float graphics_real_type;
17  template <class T>
18  using core_array = blitz::Array<blitz::TinyVector<T,3>,1>;
19  template <class T>
21 
22  public:
23 
24  inline
25  VertexBuffer():
26  Buffer{Buffer::TargetHint::Array}
27  {}
28 
29  template <class T>
30  VertexBuffer(core_array<T> vertices, BufferUsage usage);
31 
32  template <class T> void
33  setVertices(core_array<T> vertices, BufferUsage usage);
34 
35  template <class T> void
36  setVertices(const vertex_array<T>& vertices, BufferUsage usage);
37 
38  };
39 
40  }
41 
42 }
43 
44 #endif // vim:filetype=cpp
Main namespace.
Definition: convert.hh:9