gtsam_points
Loading...
Searching...
No Matches
grid.hpp
Go to the documentation of this file.
1#ifndef GLK_PRIMITIVES_GRID_HPP
2#define GLK_PRIMITIVES_GRID_HPP
3
4#include <vector>
5#include <Eigen/Core>
6
7namespace glk {
8
9class Grid {
10public:
11 Grid(double half_extent = 5.0, double step = 1.0) {
12 for (double x = -half_extent; x <= half_extent + 1e-9; x += step) {
13 vertices.push_back(Eigen::Vector3f(x, -half_extent, 0.0f));
14 vertices.push_back(Eigen::Vector3f(x, half_extent, 0.0f));
15 vertices.push_back(Eigen::Vector3f(-half_extent, x, 0.0f));
16 vertices.push_back(Eigen::Vector3f(half_extent, x, 0.0f));
17 }
18 }
19
20public:
21 std::vector<Eigen::Vector3f> vertices;
22};
23} // namespace glk
24
25#endif
Definition grid.hpp:9
Grid(double half_extent=5.0, double step=1.0)
Definition grid.hpp:11
std::vector< Eigen::Vector3f > vertices
Definition grid.hpp:21
Definition async_buffer_copy.hpp:6
std::enable_if_t< needs_aligned_allocator< T >::value, std::shared_ptr< T > > make_shared(Args &&... args)
Definition make_shared.hpp:20