9#ifndef SE_MARCHING_CUBE_HPP
10#define SE_MARCHING_CUBE_HPP
24template<
typename OctreeT>
27 const Eigen::Vector3i&
coord_1);
29template<
typename OctreeT>
33template<
typename BlockT>
35 typename BlockT::DataType data[8],
40template<
typename OctreeT>
42 typename OctreeT::DataType data[8],
47template<
typename OctreeT>
49 const typename OctreeT::BlockType*
block_ptr,
58template<
typename DataT>
64template<
typename DataT,
typename ValueSelector>
81template<
typename BlockT,
typename DataT>
111 const int block_size,
131template<
typename OctreeT,
typename DataT>
133 const typename OctreeT::BlockType* block,
140template<
typename OctreeT,
typename DataT>
142 const typename OctreeT::BlockType*
block_ptr,
156namespace algorithms {
158template<
typename OctreeT,
typename = std::enable_if_t<OctreeT::res_ == se::Res::Single>>
159typename OctreeT::SurfaceMesh
161 const std::vector<const typename OctreeT::BlockType*>&
block_ptrs);
163template<
typename OctreeT,
typename = std::enable_if_t<OctreeT::res_ == se::Res::Multi>>
164typename OctreeT::SurfaceMesh
166 const std::vector<const typename OctreeT::BlockType*>&
block_ptrs,
169template<
typename OctreeT>
170std::vector<meshing::VertexIndexMesh<3>>
172 const std::vector<const typename OctreeT::BlockType*>&
block_ptrs);
174template<
typename OctreeT>
177 const std::vector<const typename OctreeT::BlockType*>&
block_ptrs);
179template<
typename OctreeT>
187template<
typename OctreeT>
193#include "impl/marching_cube_impl.hpp"
OctreeT::SurfaceMesh marching_cube_kernel(const OctreeT &octree, const std::vector< const typename OctreeT::BlockType * > &block_ptrs)
std::vector< meshing::VertexIndexMesh< 3 > > dual_marching_cube_kernel_new(const OctreeT &octree, const std::vector< const typename OctreeT::BlockType * > &block_ptrs)
OctreeT::SurfaceMesh marching_cube(const OctreeT &octree, const int min_desired_scale=0)
Return a triangle mesh of the surface in octree.
meshing::VertexIndexMesh< 3 > dual_marching_cube_new(const OctreeT &octree, const std::vector< const typename OctreeT::BlockType * > &block_ptrs)
OctreeT::SurfaceMesh dual_marching_cube_kernel(const OctreeT &octree, const std::vector< const typename OctreeT::BlockType * > &block_ptrs, const int min_desired_scale)
void gather_dual_data(const BlockT *block, const int scale, const Eigen::Vector3f &primal_corner_coord_f, DataT data[8], std::array< Eigen::Vector3f, 8 > &dual_corner_coords_f, std::array< Eigen::Vector3i, 8 > &dual_corner_coords_i)
static const Eigen::Vector3i logical_dual_offset[8]
Definition marching_cube.hpp:122
Eigen::Vector3f interp_vertexes(const OctreeT &octree, const int x, const int y, const int z, const int edge)
void gather_data(const BlockT *block, typename BlockT::DataType data[8], const int x, const int y, const int z)
Eigen::Vector3f compute_intersection(const OctreeT &octree, const Eigen::Vector3i &coord_0, const Eigen::Vector3i &coord_1)
Single-res marching cube implementation.
static const Eigen::Vector3f norm_dual_offset_f[8]
Definition marching_cube.hpp:72
uint8_t compute_index(const OctreeT &octree, const typename OctreeT::BlockType *block_ptr, const int x, const int y, const int z)
Eigen::Vector3f interp_dual_vertexes(const int edge, const DataT data[8], const std::array< Eigen::Vector3f, 8 > &dual_corner_coords_f)
void compute_dual_index(const OctreeT &octree, const typename OctreeT::BlockType *block_ptr, const int scale, const Eigen::Vector3i &primal_corner_coord, uint8_t &edge_pattern_idx, DataT data[8], std::array< Eigen::Vector3f, 8 > &dual_corner_coords_f, std::array< Eigen::Vector3i, 8 > &dual_corner_coords_i)
Eigen::Vector3f compute_dual_intersection(const DataT &data_0, const DataT &data_1, const Eigen::Vector3f &dual_point_0_M, const Eigen::Vector3f &dual_point_1_M)
Multires-res marching cube implementation.
bool checkVertex(const Eigen::Vector3f &vertex_M, const float dim)
void norm_dual_corner_idxs(const Eigen::Vector3i &primal_corner_coord_rel, const int block_size, BoundedVector< int, 8 > &lower_priority_neighbours, BoundedVector< int, 8 > &higher_priority_neighbours, BoundedVector< BoundedVector< int, 8 >, 8 > &neighbours)
The following strategy is derived from I.
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14
std::vector< T, detail::ArrayAllocator< T, N > > BoundedVector
A statically-allocated std::vector that can store at most N elements.
Definition bounded_vector.hpp:79