39 #include <gtest/gtest.h> 46 return atan2(r2 * sin(included_angle), r1 - r2 * cos(included_angle));
49 bool isShadowPureImpl(
const float r1,
const float r2,
const float included_angle,
const double min_angle,
const double max_angle)
53 if (angle < min_angle || angle > max_angle)
58 TEST(ScanShadowDetector, ShadowDetectionGeometry)
60 for (
float min_angle = 90.0; min_angle >= 0.0; min_angle -= 5.0)
62 for (
float max_angle = 90.0; max_angle <= 180; max_angle += 5.0)
67 for (
float r1 = 0.1; r1 < 1.0; r1 += 0.1)
69 for (
float r2 = 0.1; r2 < 1.0; r2 += 0.1)
71 for (
float inc = 0.01; inc < 0.1; inc += 0.02)
84 int main(
int argc,
char **argv)
86 testing::InitGoogleTest(&argc, argv);
87 return RUN_ALL_TESTS();
void configure(const float min_angle, const float max_angle)
bool isShadowPureImpl(const float r1, const float r2, const float included_angle, const double min_angle, const double max_angle)
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
static double from_degrees(double degrees)
static double to_degrees(double radians)
bool isShadow(const float r1, const float r2, const float included_angle)
double getAngleWithViewpoint(const float r1, const float r2, const float included_angle)
int main(int argc, char **argv)
TEST(ScanShadowDetector, ShadowDetectionGeometry)