Visual Computing Library
Loading...
Searching...
No Matches
Core Bounding Box Algorithms

List of overloaded boundingBox functions that take in input an object (or a Range of objects) and return its/their bounding box. More...

Collaboration diagram for Core Bounding Box Algorithms:

Functions

template<PointConcept PointType>
auto vcl::boundingBox (const PointType &p)
 Compute the bounding box of a single point.
 
template<SegmentConcept SegmentType>
auto vcl::boundingBox (const SegmentType &s)
 Compute the bounding box of a line segment.
 
template<SphereConcept SphereType>
auto vcl::boundingBox (const SphereType &s)
 Compute the bounding box of a sphere.
 
template<TriangleConcept TriangleType>
auto vcl::boundingBox (const TriangleType &t)
 Compute the bounding box of a triangle.
 
template<VertexConcept VertexType>
auto vcl::boundingBox (const VertexType &v)
 Compute the bounding box of a vertex.
 
template<VertexConcept VertexType>
auto vcl::boundingBox (const VertexType *v)
 Compute the bounding box of a vertex pointer.
 
template<FaceConcept FaceType>
auto vcl::boundingBox (const FaceType &f)
 Compute the bounding box of a face.
 
template<FaceConcept FaceType>
auto vcl::boundingBox (const FaceType *f)
 Compute the bounding box of a face pointer.
 
template<EdgeConcept EdgeType>
auto vcl::boundingBox (const EdgeType &e)
 Compute the bounding box of an edge.
 
template<EdgeConcept EdgeType>
auto vcl::boundingBox (const EdgeType *e)
 Compute the bounding box of an edge pointer.
 
template<IteratorConcept Iterator>
auto vcl::boundingBox (Iterator begin, Iterator end)
 Calculates the bounding box of a set of objects.
 
template<Range Rng>
auto vcl::boundingBox (Rng &&r)
 Calculates the bounding box of a range of objects.
 

Detailed Description

List of overloaded boundingBox functions that take in input an object (or a Range of objects) and return its/their bounding box.

You can access these algorithms by including #include <vclib/algorithms/core/bounding_box.h>

Note
To compute the bounding box of a Mesh, use the vcl::boundingBox function defined in vclib/algorithms/mesh/stat/bounding_box.h.

Function Documentation

◆ boundingBox() [1/12]

template<EdgeConcept EdgeType>
auto vcl::boundingBox ( const EdgeType &  e)

Compute the bounding box of an edge.

Given an edge e, this function computes and returns the bounding box of the edge. The bounding box is represented by a vcl::Box object.

Template Parameters
EdgeTypeThe type of the edge. It must satisfy the EdgeConcept.
Parameters
[in]eThe input edge to compute the bounding box of
Returns
The bounding box of the input edge

◆ boundingBox() [2/12]

template<EdgeConcept EdgeType>
auto vcl::boundingBox ( const EdgeType *  e)

Compute the bounding box of an edge pointer.

Given a pointer to an edge e, this function computes and returns the bounding box of the edge. The bounding box is represented by a vcl::Box object.

Template Parameters
EdgeTypeThe type of the edge. It must satisfy the EdgeConcept.
Parameters
[in]eA pointer to the input edge to compute the bounding box of
Returns
The bounding box of the input edge

◆ boundingBox() [3/12]

template<FaceConcept FaceType>
auto vcl::boundingBox ( const FaceType &  f)

Compute the bounding box of a face.

Given a face f, this function computes and returns the bounding box of the face. The bounding box is represented by a vcl::Box object.

Template Parameters
FaceTypeThe type of the face. It must satisfy the FaceConcept.
Parameters
[in]fThe input face to compute the bounding box of
Returns
The bounding box of the input face

◆ boundingBox() [4/12]

template<FaceConcept FaceType>
auto vcl::boundingBox ( const FaceType *  f)

Compute the bounding box of a face pointer.

Given a pointer to a face f, this function computes and returns the bounding box of the face. The bounding box is represented by a vcl::Box object.

Template Parameters
FaceTypeThe type of the face. It must satisfy the FaceConcept.
Parameters
[in]fA pointer to the input face to compute the bounding box of
Returns
The bounding box of the input face

◆ boundingBox() [5/12]

template<PointConcept PointType>
auto vcl::boundingBox ( const PointType &  p)

Compute the bounding box of a single point.

Given a point p, this function computes and returns the bounding box of the point. The bounding box is represented by a vcl::Box object.

Template Parameters
PointTypeThe type of the point. It must satisfy the PointConcept.
Parameters
[in]pThe input point to compute the bounding box of
Returns
The bounding box of the input point

◆ boundingBox() [6/12]

template<SegmentConcept SegmentType>
auto vcl::boundingBox ( const SegmentType s)

Compute the bounding box of a line segment.

Given a line segment s, this function computes and returns the bounding box of the segment. The bounding box is represented by a vcl::Box object.

Template Parameters
SegmentTypeThe type of the segment. It must satisfy the SegmentConcept.
Parameters
[in]sThe input line segment to compute the bounding box of
Returns
The bounding box of the input line segment

◆ boundingBox() [7/12]

template<SphereConcept SphereType>
auto vcl::boundingBox ( const SphereType s)

Compute the bounding box of a sphere.

Given a sphere s, this function computes and returns the bounding box of the sphere. The bounding box is represented by a vcl::Box object.

Template Parameters
SphereTypeThe type of the sphere. It must satisfy the SphereConcept.
Parameters
[in]sThe input sphere to compute the bounding box of
Returns
The bounding box of the input sphere

◆ boundingBox() [8/12]

template<TriangleConcept TriangleType>
auto vcl::boundingBox ( const TriangleType t)

Compute the bounding box of a triangle.

Given a triangle t, this function computes and returns the bounding box of the triangle. The bounding box is represented by a vcl::Box object.

Template Parameters
TriangleTypeThe type of the triangle.
Parameters
[in]tThe input triangle to compute the bounding box of
Returns
The bounding box of the input triangle

◆ boundingBox() [9/12]

template<VertexConcept VertexType>
auto vcl::boundingBox ( const VertexType &  v)

Compute the bounding box of a vertex.

Given a vertex v, this function computes and returns the bounding box of the vertex. The bounding box is represented by a vcl::Box object.

Template Parameters
VertexTypeThe type of the vertex. It must satisfy the VertexConcept.
Parameters
[in]vThe input vertex to compute the bounding box of
Returns
The bounding box of the input vertex

◆ boundingBox() [10/12]

template<VertexConcept VertexType>
auto vcl::boundingBox ( const VertexType *  v)

Compute the bounding box of a vertex pointer.

Given a pointer to a vertex v, this function computes and returns the bounding box of the vertex. The bounding box is represented by a vcl::Box object.

Template Parameters
VertexTypeThe type of the vertex. It must satisfy the VertexConcept.
Parameters
[in]vA pointer to the input vertex to compute the bounding box of
Returns
The bounding box of the input vertex

◆ boundingBox() [11/12]

template<IteratorConcept Iterator>
auto vcl::boundingBox ( Iterator  begin,
Iterator  end 
)

Calculates the bounding box of a set of objects.

Given a set of objects iterated in the range [begin, end), computes the bounding box by calling the proper overload of the boundingBox function for each object.

If begin == end, the returned bounding box is invalid.

Note
A proper boundingBox function overloaded on the iterated object type must exist.
Template Parameters
Iteratorthe type of the iterator over the objects. It must satisfy the IteratorConcept.
Parameters
[in]beginthe iterator to the beginning of the range of objects.
[in]endthe iterator to the end of the range of objects.
Returns
the bounding box of the entire set of objects.

◆ boundingBox() [12/12]

template<Range Rng>
auto vcl::boundingBox ( Rng &&  r)

Calculates the bounding box of a range of objects.

Given a set of objects iterated in the range, computes the bounding box by calling the proper overload of the boundingBox function for each object.

If the range is empty, the returned bounding box is invalid.

Note
A proper boundingBox function overloaded on the iterated object type must exist.
Template Parameters
Rngthe type of the range of objects. It must satisfy the Range concept.
Parameters
[in]rthe range of objects.
Returns
the bounding box of the entire range of objects.