29 #if !defined MeshVoxelizer_h
31 #define MeshVoxelizer_h
35 #include "DGtal/helpers/StdDefs.h"
36 #include "DGtal/base/ConstAlias.h"
37 #include "DGtal/shapes/Mesh.h"
38 #include "DGtal/shapes/IntersectionTarget.h"
39 #include "DGtal/kernel/SpaceND.h"
40 #include "DGtal/kernel/sets/CDigitalSet.h"
41 #include "DGtal/geometry/tools/determinant/PredicateFromOrientationFunctor2.h"
42 #include "DGtal/geometry/tools/determinant/InHalfPlaneBySimple3x3Matrix.h"
78 template <
typename TDigitalSet,
int Separation = 6>
130 template<
typename MeshPo
int>
133 const double scaleFactor = 1.0);
148 template<
typename MeshPo
int>
150 const MeshPoint &a,
const MeshPoint &b,
const MeshPoint &c,
151 const double scaleFactor = 1.0);
210 const std::pair<PointZ3, PointZ3>& bbox);
223 #include "DGtal/shapes/MeshVoxelizer.ih"
Aim: Class that implements an orientation functor, ie. it provides a way to compute the orientation o...
Aim: A class for computing the digitization of a triangle or a Mesh.
typename Space::Point PointZ3
BOOST_CONCEPT_ASSERT((concepts::CDigitalSet< TDigitalSet >))
Concept Checking.
typename Space2D::RealPoint PointR2
typename DigitalSet::Domain Domain
TriangleOrientation
Enum type when deciding if a 2D point belongs to a 2D triangle.
static double distance(const PointR3 &M, const VectorR3 &n, const PointZ3 &p)
typename DigitalSet::Space Space
static TriangleOrientation pointIsInside2DTriangle(const PointR2 &A, const PointR2 &B, const PointR2 &C, const PointR2 &p)
IntersectionTarget myIntersectionTarget
Intersection target.
void voxelizeTriangle(DigitalSet &outputSet, const PointR3 &A, const PointR3 &B, const PointR3 &C, const VectorR3 &n, const std::pair< PointZ3, PointZ3 > &bbox)
void voxelize(DigitalSet &outputSet, const Mesh< MeshPoint > &aMesh, const double scaleFactor=1.0)
TDigitalSet DigitalSet
Digital Set Type.
typename IntersectionTargetTrait< Space, Separation, 1 >::Type IntersectionTarget
BOOST_STATIC_ASSERT_MSG(Separation==6||Separation==26, "Separation must be 6 or 26")
Separation Checking.
BOOST_STATIC_ASSERT_MSG(DigitalSet::Space::dimension==3, "DigitalSet dimension must be 3")
void voxelize(DigitalSet &outputSet, const MeshPoint &a, const MeshPoint &b, const MeshPoint &c, const double scaleFactor=1.0)
static bool pointIsInsideVoxel(const PointR3 &P, const PointZ3 &v)
typename Space::RealPoint VectorR3
typename Space::RealPoint PointR3
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
PointVector< dim, double > RealPoint
DGtal is the top-level namespace which contains all DGtal functions and types.
Internal intersection target structure.
Aim: Represents a set of points within the given domain. This set of points is modifiable by the user...
HyperRectDomain< Space > Domain
PointVector< 3, double > RealPoint