BVH.cpp File Reference
#include "main.h"
#include <Eigen/StdVector>
#include <Eigen/Geometry>
#include <unsupported/Eigen/BVH>

Classes

struct  Ball< Dim >
 
struct  BallPointStuff< Dim >
 
struct  TreeTest< Dim >
 

Namespaces

 Eigen
 Namespace containing all symbols from the Eigen library.
 

Functions

template<typename Scalar , int Dim>
AlignedBox< Scalar, Dim > Eigen::bounding_box (const Matrix< Scalar, Dim, 1 > &v)
 
template<int Dim>
AlignedBox< double, Dim > bounding_box (const Ball< Dim > &b)
 
double SQR (double x)
 
 EIGEN_DECLARE_TEST (BVH)
 

Function Documentation

◆ bounding_box()

template<int Dim>
AlignedBox<double, Dim> bounding_box ( const Ball< Dim > &  b)
37  {
38  return AlignedBox<double, Dim>(b.center.array() - b.radius, b.center.array() + b.radius);
39 }
Scalar * b
Definition: benchVecAdd.cpp:17
An axis aligned box.
Definition: AlignedBox.h:69

References b.

◆ EIGEN_DECLARE_TEST()

EIGEN_DECLARE_TEST ( BVH  )
221  {
222  for (int i = 0; i < g_repeat; i++) {
223 #ifdef EIGEN_TEST_PART_1
225  CALL_SUBTEST(test2.testIntersect1());
226  CALL_SUBTEST(test2.testMinimize1());
227  CALL_SUBTEST(test2.testIntersect2());
228  CALL_SUBTEST(test2.testMinimize2());
229 #endif
230 
231 #ifdef EIGEN_TEST_PART_2
232  TreeTest<3> test3;
233  CALL_SUBTEST(test3.testIntersect1());
234  CALL_SUBTEST(test3.testMinimize1());
235  CALL_SUBTEST(test3.testIntersect2());
236  CALL_SUBTEST(test3.testMinimize2());
237 #endif
238 
239 #ifdef EIGEN_TEST_PART_3
240  TreeTest<4> test4;
241  CALL_SUBTEST(test4.testIntersect1());
242  CALL_SUBTEST(test4.testMinimize1());
243  CALL_SUBTEST(test4.testIntersect2());
244  CALL_SUBTEST(test4.testMinimize2());
245 #endif
246  }
247 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
void test2()
Definition: QuaternionUnitTest.cpp:65
#define CALL_SUBTEST(FUNC)
Definition: main.h:382
static int g_repeat
Definition: main.h:191
Definition: BVH.cpp:131
void testMinimize1()
Definition: BVH.cpp:155
void testIntersect1()
Definition: BVH.cpp:138
void testIntersect2()
Definition: BVH.cpp:174
void testMinimize2()
Definition: BVH.cpp:196

References CALL_SUBTEST, Eigen::g_repeat, i, test2(), TreeTest< Dim >::testIntersect1(), TreeTest< Dim >::testIntersect2(), TreeTest< Dim >::testMinimize1(), and TreeTest< Dim >::testMinimize2().

◆ SQR()