16 #ifndef __TY_VISIBILITY_CONE__
17 #define __TY_VISIBILITY_CONE__
20 #include <gtest/gtest_prod.h>
120 bool solveLin2x2(
double a11,
double a12,
double a21,
double a22,
double b1,
double b2,
double& x1,
All base classes related to 3D manipulation.
bool solveLin2x2(double a11, double a12, double a21, double a22, double b1, double b2, double &x1, double &x2)
Solve a 2x2 linear system of equations Ax = b.
OVector3D buildVector2D(const OPoint3D &pA2D, const OPoint3D &pB2D)
Optimized way to build a vector in 2D (horizontal plane z = 0) from point A to B To use as a replacem...
bool segmentIntersectsSemiLine2D(const OVector3D &vAB, const OVector3D &vMN, const OVector3D &vAM)
Test if the segment [MN] intersects the semi-line [AB) in 2D (horizontal plane z = 0)
double _y
y coordinate of OCoord3D
double _x
x coordinate of OCoord3D
Class to define a segment.
bool segmentIntersectsBorderCone(const OPoint3D &pM2D, const OPoint3D &pN2D) const
Test if the segment [MN] intersects the borders of the visibility cone.
bool pointIsInCone(const OPoint3D &pM2D) const
Test if the point M lies inside the visibility cone.
bool segmentIsVisibleInCone(const OSegment3D &segmentToTest) const
Test if a segment is visible in the visibility cone.
FRIEND_TEST(test_TYVisibilityCone, pointIsInCone)
FRIEND_TEST(test_TYVisibilityCone, segmentIntersectsBorderCone)
void setupNormalsOfCone()
Compute exterior normal of the cone.
VisibilityCone(const OPoint3D &pA, const OPoint3D &pB, const OPoint3D &pC)
Builds a visibility cone spanned from point A into points B and C This cone is such that [BC] segment...