MCPcopy Create free account
hub / github.com/abess-team/abess / testIntersect1

Method testIntersect1

python/include/unsupported/test/BVH.cpp:101–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 typedef AlignedBox<double, Dim> BoxType;
100
101 void testIntersect1()
102 {
103 BallTypeList b;
104 for(int i = 0; i < 500; ++i) {
105 b.push_back(BallType(VectorType::Random(), 0.5 * internal::random(0., 1.)));
106 }
107 KdBVH<double, Dim, BallType> tree(b.begin(), b.end());
108
109 VectorType pt = VectorType::Random();
110 BallPointStuff<Dim> i1(pt), i2(pt);
111
112 for(int i = 0; i < (int)b.size(); ++i)
113 i1.intersectObject(b[i]);
114
115 BVIntersect(tree, i2);
116
117 VERIFY(i1.count == i2.count);
118 }
119
120 void testMinimize1()
121 {

Callers 1

test_BVHFunction · 0.80

Calls 7

BVIntersectFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
randomFunction · 0.50
push_backMethod · 0.45
sizeMethod · 0.45
intersectObjectMethod · 0.45

Tested by

no test coverage detected