23#ifndef VCL_ALGORITHMS_CORE_BOUNDING_BOX_H
24#define VCL_ALGORITHMS_CORE_BOUNDING_BOX_H
26#include <vclib/concepts/iterators.h>
27#include <vclib/concepts/mesh/elements/edge.h>
28#include <vclib/concepts/range.h>
29#include <vclib/concepts/space/triangle.h>
30#include <vclib/space/core/box.h>
31#include <vclib/space/core/segment.h>
32#include <vclib/space/core/sphere.h>
64template<Po
intConcept Po
intType>
84template<SegmentConcept SegmentType>
87 using PointType = SegmentType::PointType;
109template<SphereConcept SphereType>
112 using ScalarType = SphereType::ScalarType;
115 b.add(s.center() + s.radius());
133template<TriangleConcept TriangleType>
136 using PointType = TriangleType::PointType;
159template<VertexConcept VertexType>
180template<VertexConcept VertexType>
199template<FaceConcept FaceType>
202 using VertexType = FaceType::VertexType;
205 for (
const VertexType* v : f.vertices())
224template<FaceConcept FaceType>
227 using VertexType = FaceType::VertexType;
230 for (
const VertexType* v : f->vertices())
248template<EdgeConcept EdgeType>
251 using VertexType = EdgeType::VertexType;
254 for (
const VertexType* v : e.vertices())
273template<EdgeConcept EdgeType>
276 using VertexType = EdgeType::VertexType;
279 for (
const VertexType* v : e->vertices())
305template<IteratorConcept Iterator>
308 using BB =
decltype(
boundingBox(
typename Iterator::value_type()));
312 for (; begin != end; ++begin)
340 return boundingBox(std::ranges::begin(
r), std::ranges::end(
r));
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
PointT & p0()
Returns the first endpoint of the segment.
Definition segment.h:83
PointT & p1()
Returns the second endpoint of the segment.
Definition segment.h:97
auto boundingBox(const PointType &p)
Compute the bounding box of a single point.
Definition bounding_box.h:65