1 #ifndef VFRENDERING_BOUNDING_BOX_RENDERER_HXX
2 #define VFRENDERING_BOUNDING_BOX_RENDERER_HXX
4 #include <VFRendering/RendererBase.hxx>
6 namespace VFRendering {
16 BoundingBoxRenderer(
const View& view,
const std::vector<glm::vec3>& vertices,
const std::vector<float>& dashing_values={});
17 static BoundingBoxRenderer forCuboid(
const View& view,
const glm::vec3& center,
const glm::vec3& side_lengths,
const glm::vec3& periodic_boundary_condition_lengths={0.0f, 0.0f, 0.0f},
float dashes_per_length=1.0f);
18 static BoundingBoxRenderer forParallelepiped(
const View& view,
const glm::vec3& center,
const glm::vec3& v1,
const glm::vec3& v2,
const glm::vec3& v3,
const glm::vec3& periodic_boundary_condition_lengths={0.0f, 0.0f, 0.0f},
float dashes_per_length=1.0f);
19 static BoundingBoxRenderer forHexagonalCell(
const View& view,
const glm::vec3& center,
float radius,
float height,
const glm::vec2& periodic_boundary_condition_lengths={0.0f, 0.0f},
float dashes_per_length=1.0f);
21 virtual void draw(
float aspect_ratio)
override;
22 virtual void optionsHaveChanged(
const std::vector<int>& changed_options)
override;
25 virtual void update(
bool keep_geometry)
override;
26 void updateVertexData();
31 bool m_is_initialized =
false;
32 unsigned int m_program = 0;
33 unsigned int m_vao = 0;
34 unsigned int m_vbo = 0;
35 unsigned int m_dash_vbo = 0;
36 unsigned int num_vertices = 0;
37 std::vector<glm::vec3> m_vertices;
38 std::vector<float> m_dashing_values;
44 glm::vec3 default_value = {1.0, 1.0, 1.0};
49 int default_value = 10;
54 float default_value = 0.0;