23#ifndef VCL_ALGORITHMS_CORE_VISIBILITY_H
24#define VCL_ALGORITHMS_CORE_VISIBILITY_H
26#include <vclib/space/core.h>
46template<Po
int3Concept Po
intType>
53 return (p1 - p0).cross(
p2 - p0).dot(
p - p0);
69template<Triangle3Concept TriangleType, Po
int3Concept Po
intType>
87template<Po
int3Concept Po
intType>
93 PointType c = (p1 - p0).
cross(
p2 - p0);
94 return c.squaredNorm() == 0;
109template<Po
int3Concept Po
intType>
131template<Triangle3Concept TriangleType, Po
int3Concept Po
intType>
134 const PointType& point)
152template<Po
int3Concept Po
intType>
A class representing a box in N-dimensional space.
Definition box.h:46
bool arePointsCollinear(const PointType &p0, const PointType &p1, const PointType &p2)
Checks if 3 points are collinear.
Definition visibility.h:88
auto halfSpaceDeterminant(const PointType &p0, const PointType &p1, const PointType &p2, const PointType &p)
Compute the determinant of the half-space defined by the triangle (p1, p2, p3) and the point p.
Definition visibility.h:47
bool arePointsCoplanar(const PointType &p0, const PointType &p1, const PointType &p2, const PointType &p3)
Checks if 4 points are coplanar.
Definition visibility.h:110
bool 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 ...
Definition visibility.h:132