20#include <shapes/Shape.hpp>
24#include <boost/multi_array.hpp>
32 boost::multi_array<int, 3> raster(grid_size);
33 for (
int i = 0; i < grid_size[0]; ++i) {
34 for (
int j = 0;
j < grid_size[1]; ++
j) {
35 for (
int k = 0; k < grid_size[2]; ++k) {
43 return {raster.data(), raster.data() + raster.num_elements()};
Vector implementation and trait types for boost qvm interoperability.
std::vector< int > rasterize(Utils::Vector3i const &grid_size, double grid_spacing, double grid_offset) const
Rasterize a shape on a regular grid.
virtual bool is_inside(Utils::Vector3d const &pos) const
Check whether the given point is inside the shape or not.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.