iridescence
Loading...
Searching...
No Matches
pointnormals_buffer.hpp
Go to the documentation of this file.
1#ifndef GLK_POINT_NORMALS_BUFFER_HPP
2#define GLK_POINT_NORMALS_BUFFER_HPP
3
4#include <memory>
5#include <Eigen/Dense>
6#include <glk/drawable.hpp>
7#include <glk/thin_lines.hpp>
8
9namespace glk {
10
13public:
14 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
15 using Ptr = std::shared_ptr<PointNormalsBuffer>;
16
24 PointNormalsBuffer(const float* vertices, size_t vertex_stride, const float* normals, size_t normal_stride, int num_points, double normal_length);
25
26 template <template <class> class Allocator>
28 const std::vector<Eigen::Vector3f, Allocator<Eigen::Vector3f>>& vertices,
29 const std::vector<Eigen::Vector3f, Allocator<Eigen::Vector3f>>& normals,
30 double normal_length);
31
32 virtual ~PointNormalsBuffer() override;
33
34 virtual void draw(glk::GLSLShader& shader) const override;
35
36private:
37 std::unique_ptr<glk::ThinLines> normal_lines;
38};
39
40} // namespace glk
41
42#endif
Definition drawable.hpp:12
GLSLShader is a wrapper for OpenGL shader programs.
Definition glsl_shader.hpp:49
virtual ~PointNormalsBuffer() override
PointNormalsBuffer(const std::vector< Eigen::Vector3f, Allocator< Eigen::Vector3f > > &vertices, const std::vector< Eigen::Vector3f, Allocator< Eigen::Vector3f > > &normals, double normal_length)
virtual void draw(glk::GLSLShader &shader) const override
std::shared_ptr< PointNormalsBuffer > Ptr
Definition pointnormals_buffer.hpp:15
PointNormalsBuffer(const float *vertices, size_t vertex_stride, const float *normals, size_t normal_stride, int num_points, double normal_length)
Constructor.
Definition async_buffer_copy.hpp:6