1 #ifndef VFRENDERING_GEOMETRY_HXX
2 #define VFRENDERING_GEOMETRY_HXX
9 namespace VFRendering {
25 Geometry(
const std::vector<glm::vec3>& positions,
const std::vector<std::array<index_type, 3>>& surface_indices={},
const std::vector<std::array<index_type, 4>>& volume_indices={},
const bool& is_2d=
false);
27 const std::vector<glm::vec3>& positions()
const;
28 const std::vector<std::array<index_type, 3>>& surfaceIndices()
const;
29 const std::vector<std::array<index_type, 4>>& volumeIndices()
const;
30 const glm::vec3& min()
const;
31 const glm::vec3& max()
const;
32 const bool& is2d()
const;
34 static Geometry cartesianGeometry(glm::ivec3 n, glm::vec3 bounds_min, glm::vec3 bounds_max);
35 static Geometry rectilinearGeometry(
const std::vector<float>& xs,
const std::vector<float>& ys,
const std::vector<float>& zs);
38 std::vector<glm::vec3> m_positions;
39 mutable std::vector<std::array<index_type, 3>> m_surface_indices;
40 mutable std::vector<std::array<index_type, 4>> m_volume_indices;
42 mutable bool m_bounds_min_set;
43 mutable glm::vec3 m_bounds_min;
44 mutable bool m_bounds_max_set;
45 mutable glm::vec3 m_bounds_max;