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

List of Core algorithms. More...

Collaboration diagram for Core Algorithms:

Modules

 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.
 
 Core Box Algorithms
 List of utility functions for boxes having different dimensions.
 
 Core Distance Algorithms
 List of distance algorithms.
 
 Core Intersection Algorithms
 List of intersection algorithms.
 
 Polygon Core Algorithms
 List of Core Polygon algorithms.
 

Functions

template<Triangle3Concept TriangleType, Point3Concept PointType>
auto vcl::halfSpaceDeterminant (const TriangleType &triangle, const PointType &point)
 Compute the determinant of the half-space defined by the triangle and the point.
 
template<FaceConcept FaceType, Point3Concept PointType>
auto vcl::halfSpaceDeterminant (const FaceType &face, const PointType &point)
 Compute the determinant of the half-space defined by the triangle and the point.
 
template<Point3Concept PointType>
auto vcl::halfSpaceDeterminant (const PointType &p1, const PointType &p2, const PointType &p3, const PointType &p)
 Compute the determinant of the half-space defined by the triangle (p1, p2, p3) and the point p.
 
template<Point3Concept PointType>
bool vcl::arePointsCoplanar (const PointType &p1, const PointType &p2, const PointType &p3, const PointType &p4)
 Checks if 4 points are coplanar.
 
template<Triangle3Concept TriangleType, Point3Concept PointType>
bool vcl::trianglePointVisibility (const TriangleType &triangle, const PointType &point)
 Checks if a point is visible from a triangle, i.e., if the point is in the half-space defined by the triangle.
 
template<Point3Concept PointType>
auto vcl::trianglePointVisibility (const PointType &p1, const PointType &p2, const PointType &p3, const PointType &p)
 Checks if a point is visible from a triangle, i.e., if the point is in the half-space defined by the triangle.
 
template<FaceConcept FaceType, Point3Concept PointType>
bool vcl::facePointVisibility (const FaceType &face, const PointType &point)
 Checks if a point is visible from a face, i.e., if the point is in the half-space defined by the face.
 

Detailed Description

List of Core algorithms.

In this module, you can find the core algorithms of VCLib, that generally involve simple geometric primitives, like points, vectors, and matrices.

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

Function Documentation

◆ arePointsCoplanar()

template<Point3Concept PointType>
bool vcl::arePointsCoplanar ( const PointType &  p1,
const PointType &  p2,
const PointType &  p3,
const PointType &  p4 
)

Checks if 4 points are coplanar.

Template Parameters
PointTypeThe type of the points.
Parameters
[in]p1First point to test.
[in]p2Second point to test.
[in]p3Third point to test.
[in]p4Fourth point to test.
Returns
True if the points are coplanar, false otherwise.

◆ facePointVisibility()

template<FaceConcept FaceType, Point3Concept PointType>
bool vcl::facePointVisibility ( const FaceType &  face,
const PointType &  point 
)

Checks if a point is visible from a face, i.e., if the point is in the half-space defined by the face.

Template Parameters
FaceTypeThe type of the face.
PointTypeThe type of the point.
Parameters
[in]faceThe input face.
[in]pointThe point to test.
Returns
true if the point is visible from the face, false otherwise.

◆ halfSpaceDeterminant() [1/3]

template<FaceConcept FaceType, Point3Concept PointType>
auto vcl::halfSpaceDeterminant ( const FaceType &  face,
const PointType &  point 
)

Compute the determinant of the half-space defined by the triangle and the point.

Template Parameters
FaceTypeThe type of the face that defines the half-space.
PointTypeThe type of the point to test.
Parameters
[in]faceThe face that defines the half-space.
[in]pointThe point to test.
Returns
The determinant of the half-space.

◆ halfSpaceDeterminant() [2/3]

template<Point3Concept PointType>
auto vcl::halfSpaceDeterminant ( const PointType &  p1,
const PointType &  p2,
const PointType &  p3,
const PointType &  p 
)

Compute the determinant of the half-space defined by the triangle (p1, p2, p3) and the point p.

The triangle is defined by the points p1, p2, and p3, ordered in a counter-clockwise manner.

Template Parameters
PointTypeThe type of the points.
Parameters
[in]p1The first point of the triangle.
[in]p2The second point of the triangle.
[in]p3The third point of the triangle.
[in]pThe point to test.
Returns
The determinant of the half-space.

◆ halfSpaceDeterminant() [3/3]

template<Triangle3Concept TriangleType, Point3Concept PointType>
auto vcl::halfSpaceDeterminant ( const TriangleType triangle,
const PointType &  point 
)

Compute the determinant of the half-space defined by the triangle and the point.

Template Parameters
TriangleTypeThe type of the triangle that defines the half-space.
PointTypeThe type of the point to test.
Parameters
[in]triangleThe triangle that defines the half-space.
[in]pThe point to test.
Returns
The determinant of the half-space.

◆ trianglePointVisibility() [1/2]

template<Point3Concept PointType>
auto vcl::trianglePointVisibility ( const PointType &  p1,
const PointType &  p2,
const PointType &  p3,
const PointType &  p 
)

Checks if a point is visible from a triangle, i.e., if the point is in the half-space defined by the triangle.

Template Parameters
PointTypeThe type of the points.
Parameters
[in]p1The first point of the triangle.
[in]p2The second point of the triangle.
[in]p3The third point of the triangle.
[in]pThe point to test.
Returns
true if the point is visible from the triangle, false otherwise.

◆ trianglePointVisibility() [2/2]

template<Triangle3Concept TriangleType, Point3Concept PointType>
bool vcl::trianglePointVisibility ( const TriangleType triangle,
const PointType &  point 
)

Checks if a point is visible from a triangle, i.e., if the point is in the half-space defined by the triangle.

Template Parameters
TriangleTypeThe type of the triangle.
PointTypeThe type of the point.
Parameters
[in]triangleThe input triangle.
[in]pointThe point to test.
Returns
true if the point is visible from the triangle, false otherwise.