mirror of https://github.com/CGAL/cgal
Add operator() to grid
This commit is contained in:
parent
5002d8c16c
commit
05792f846a
|
|
@ -12,9 +12,9 @@
|
|||
#ifndef CGAL_CARTESIAN_GRID_3_H
|
||||
#define CGAL_CARTESIAN_GRID_3_H
|
||||
|
||||
#include <CGAL/license/Isosurfacing_3.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
#include <CGAL/Image_3.h>
|
||||
#include <CGAL/license/Isosurfacing_3.h>
|
||||
|
||||
#include <array>
|
||||
#include <type_traits>
|
||||
|
|
@ -46,6 +46,10 @@ public:
|
|||
from_image(image);
|
||||
}
|
||||
|
||||
FT operator()(const std::array<std::size_t, 3> &idx) const {
|
||||
return values[linear_index(idx[0], idx[1], idx[2])];
|
||||
}
|
||||
|
||||
FT value(const std::size_t x, const std::size_t y, const std::size_t z) const {
|
||||
return values[linear_index(x, y, z)];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue