23#ifndef VCL_MESH_ELEM_ALGORITHMS_INTERSECTION_H
24#define VCL_MESH_ELEM_ALGORITHMS_INTERSECTION_H
26#include <vclib/mesh/elements.h>
28#include <vclib/algorithms/core.h>
29#include <vclib/space/core.h>
53template<FaceConcept FaceType, Po
intConcept Po
intType>
59 f.vertex(0)->position(),
60 f.vertex(1)->position(),
61 f.vertex(2)->position()),
71 f.vertex(
tris[
i])->position(),
72 f.vertex(
tris[
i + 1])->position(),
73 f.vertex(
tris[
i + 2])->position()),
85template<Po
intConcept Po
intType, FaceConcept FaceType>
111template<FaceConcept FaceType, Po
intConcept Po
intType,
typename SScalar>
116 std::pair<SScalar, SScalar>&
res)
121 f.vertex(0)->position(),
122 f.vertex(1)->position(),
123 f.vertex(2)->position()),
129 if (f.vertexNumber() == 3) {
132 f.vertex(0)->position(),
133 f.vertex(1)->position(),
134 f.vertex(2)->position()),
140 res.first = std::numeric_limits<SScalar>::max();
141 std::pair<SScalar, SScalar>
r;
150 f.vertex(
tris[
i])->position(),
151 f.vertex(
tris[
i + 1])->position(),
152 f.vertex(
tris[
i + 2])->position()),
157 if (
r.first <
res.first) {
182template<FaceConcept FaceType,
typename SScalar>
186 std::pair<SScalar, SScalar>
res;
195template<
typename SScalar, FaceConcept FaceType>
A class representing a box in N-dimensional space.
Definition box.h:46
PointT size() const
Computes the size of the box.
Definition box.h:267
The TriangleWrapper class is a wrapper around a N-Dimensional triangle.
Definition triangle_wrapper.h:54
bool intersect(const PlaneType &plane, const BoxType &box)
Checks if a plane intersects with a box.
Definition intersect.h:258
std::vector< uint > earCut(Iterator begin, Iterator end)
Triangulates a simple polygon with no holes using the ear-cutting algorithm.
Definition ear_cut.h:90