Aim: the common part of all geometric kernels for computing the convex hull or Delaunay triangulation of a range of points.
More...
|
| BOOST_CONCEPT_ASSERT ((concepts::CInteger< TCoordinateInteger >)) |
|
| BOOST_CONCEPT_ASSERT ((concepts::CInteger< TInternalInteger >)) |
|
| ConvexHullCommonKernel ()=default |
| Default constructor. More...
|
|
HalfSpace | compute (const std::vector< CoordinatePoint > &vpoints, const CombinatorialPlaneSimplex &simplex, Index idx_below) |
|
HalfSpace | compute (const std::vector< CoordinatePoint > &vpoints, const CombinatorialPlaneSimplex &simplex) |
|
CoordinateVector | normal (const HalfSpace &H) const |
|
CoordinateScalar | intercept (const HalfSpace &H) const |
|
InternalScalar | dot (const HalfSpace &H1, const HalfSpace &H2) const |
|
bool | equal (const HalfSpace &H1, const HalfSpace &H2) const |
|
InternalScalar | height (const HalfSpace &H, const CoordinatePoint &p) const |
|
InternalScalar | volume (const HalfSpace &H, const CoordinatePoint &p) const |
|
bool | above (const HalfSpace &H, const CoordinatePoint &p) const |
|
bool | aboveOrOn (const HalfSpace &H, const CoordinatePoint &p) const |
|
bool | on (const HalfSpace &H, const CoordinatePoint &p) const |
|
template<Dimension dim, typename TCoordinateInteger = DGtal::int64_t, typename TInternalInteger = DGtal::int64_t>
struct DGtal::ConvexHullCommonKernel< dim, TCoordinateInteger, TInternalInteger >
Aim: the common part of all geometric kernels for computing the convex hull or Delaunay triangulation of a range of points.
Description of template class 'ConvexHullCommonKernel'
- Template Parameters
-
dim | the dimension of the space that is used for computing the convex hull (either the same as input points for convex hull, or one more than input points for Delaunay triangulation) |
TCoordinateInteger | the integer type that represents coordinates of lattice points, a model of concepts::CInteger. |
TInternalInteger | the integer type that is used for internal computations of above/below plane tests, a model of concepts::CInteger. Must be at least as precise as TCoordinateInteger. |
Definition at line 178 of file QuickHullKernels.h.
template<Dimension dim, typename TCoordinateInteger = DGtal::int64_t, typename TInternalInteger = DGtal::int64_t>
Computes an halfspace from dimension points specified by simplex with vertices in a range vpoints of Point. Orientation is induced by the order of the points. If the simplex is degenrated, the half-space is invalid and has null normal.
- Parameters
-
[in] | vpoints | a range of points over which the simplex is defined. |
[in] | simplex | a range of dimension indices of points defining an hyperplane. |
- Returns
- the corresponding halfspace (has null normal vector if simplex was not full dimensional)
Definition at line 257 of file QuickHullKernels.h.
265 A.setComponent( i-1, j,
267 - vpoints[ simplex[ 0 ] ][ j ] ) );
272 return HalfSpace { N, N.dot( ip ) };
Aim: implements basic MxN Matrix services (M,N>=1).
DGtal::uint32_t Dimension
DGtal::PointVector< dim, InternalInteger > InternalVector
DGtal::PointVector< dim, InternalInteger > InternalPoint
static const Dimension dimension
static Integer cast(Integer i)
References DGtal::IntegerConverter< dim, TInteger >::cast(), DGtal::ConvexHullCommonKernel< dim, TCoordinateInteger, TInternalInteger >::dimension, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::dot().
template<Dimension dim, typename TCoordinateInteger = DGtal::int64_t, typename TInternalInteger = DGtal::int64_t>
Computes an halfspace from dimension points specified by simplex with vertices in a range vpoints of Point. It is oriented such that the point of index idx_below is included in the half-space (i.e. below).
- Parameters
-
[in] | vpoints | a range of points over which the simplex is defined. |
[in] | simplex | a range of dimension indices of points defining an hyperplane. |
[in] | idx_below | the index of a p-oint that is below the hyperplane. |
- Returns
- the corresponding halfspace (has null normal vector if simplex was not full dimensional)
Definition at line 230 of file QuickHullKernels.h.
234 HalfSpace hs =
compute( vpoints, simplex );
240 if ( nu > hs.c ) { hs.N = -hs.N; hs.c = -hs.c; }
static Self zero
Static const for zero PointVector.
InternalInteger InternalScalar
HalfSpace compute(const std::vector< CoordinatePoint > &vpoints, const CombinatorialPlaneSimplex &simplex, Index idx_below)
References DGtal::ConvexHullCommonKernel< dim, TCoordinateInteger, TInternalInteger >::HalfSpace::c, DGtal::IntegerConverter< dim, TInteger >::cast(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::dot(), DGtal::ConvexHullCommonKernel< dim, TCoordinateInteger, TInternalInteger >::HalfSpace::N, and DGtal::PointVector< dim, InternalInteger >::zero.
template<Dimension dim, typename TCoordinateInteger = DGtal::int64_t, typename TInternalInteger = DGtal::int64_t>