23#ifndef VCL_MESH_ELEM_ALGORITHMS_VISIBILITY_H
24#define VCL_MESH_ELEM_ALGORITHMS_VISIBILITY_H
26#include <vclib/mesh/elements.h>
28#include <vclib/algorithms/core.h>
45template<FaceConcept FaceType, Po
int3Concept Po
intType>
52 face.vertex(0)->position(),
53 face.vertex(1)->position(),
54 face.vertex(2)->position(),
58 if (face.vertexNumber() == 3) {
60 face.vertex(0)->position(),
61 face.vertex(1)->position(),
62 face.vertex(2)->position(),
67 return n.dot(point - face.vertex(0)->position());
84template<FaceConcept FaceType, Po
int3Concept Po
intType>
A class representing a box in N-dimensional space.
Definition box.h:46
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 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...
Definition visibility.h:85
FaceType::VertexType::PositionType faceNormal(const FaceType &f)
Computes the normal of a face, without modifying the face. Works both for triangle and polygonal face...
Definition geometry.h:46