37 #include <gtest/gtest.h> 39 #include "fcl/config.h" 62 template<
typename BV,
typename ShapeType>
65 using S =
typename BV::S;
73 GTEST_ASSERT_EQ(num_vertices, 0);
74 GTEST_ASSERT_EQ(num_tris, 0);
78 GTEST_ASSERT_EQ(ret,
BVH_OK);
88 using S =
typename BV::S;
98 GTEST_ASSERT_EQ(ret,
BVH_OK);
111 template<
typename BV,
typename ShapeType>
114 using S =
typename BV::S;
115 const uint8_t n = 32;
125 GTEST_ASSERT_EQ(ret,
BVH_OK);
127 EXPECT_GT(model.
num_tris, num_tris);
132 template<
typename BV>
135 using S =
typename BV::S;
145 GTEST_ASSERT_EQ(ret,
BVH_OK);
158 template<
typename BV,
typename ShapeType>
160 using S =
typename BV::S;
161 const uint8_t n = 32;
171 GTEST_ASSERT_EQ(ret,
BVH_OK);
173 EXPECT_GT(model.
num_tris, num_tris);
178 template<
typename BV>
180 using S =
typename BV::S;
190 GTEST_ASSERT_EQ(ret,
BVH_OK);
201 template<
typename BV,
typename ShapeType>
204 using S =
typename BV::S;
205 const uint8_t n = 32;
213 template<
typename BV>
216 using S =
typename BV::S;
223 template<
typename BV>
226 using S =
typename BV::S;
241 template<
typename BV>
244 using S =
typename BV::S;
255 template<
typename BV>
258 using S =
typename BV::S;
272 template<
typename BV>
275 using S =
typename BV::S;
288 template<
typename BV>
291 using S =
typename BV::S;
304 template<
typename BV>
307 testBVHModelFromBox<BV>();
308 testBVHModelFromSphere<BV>();
309 testBVHModelFromEllipsoid<BV>();
310 testBVHModelFromCylinder<BV>();
311 testBVHModelFromCone<BV>();
314 GTEST_TEST(FCL_GENERATE_BVH_MODELS, generating_bvh_models_from_primitives)
316 testBVHModelFromPrimitives<AABB<double>>();
317 testBVHModelFromPrimitives<OBB<double>>();
318 testBVHModelFromPrimitives<RSS<double>>();
319 testBVHModelFromPrimitives<kIOS<double>>();
320 testBVHModelFromPrimitives<OBBRSS<double>>();
321 testBVHModelFromPrimitives<KDOP<double, 16> >();
322 testBVHModelFromPrimitives<KDOP<double, 18> >();
323 testBVHModelFromPrimitives<KDOP<double, 24> >();
327 int main(
int argc,
char* argv[])
329 ::testing::InitGoogleTest(&argc, argv);
330 return RUN_ALL_TESTS();
void testBVHModelFromBox()
void testBVHModelFromCylinder()
Eigen::Transform< S, 3, Eigen::Isometry > Transform3
void testBVHModelFromSphere()
Center at zero point ellipsoid.
void testBVHModelFromEllipsoid()
Eigen::Matrix< S, 3, 1 > Vector3
int num_vertices
Number of points.
void checkAddToUnfinalizedModel(BVHModel< BV > &model, const ShapeType &shape)
Cannot allocate memory for vertices and triangles.
void testBVHModelFromPrimitives()
int num_tris
Number of triangles.
void checkAddToEmptyModel(BVHModel< BV > &model, const ShapeType &shape)
void checkAddToFinalizedModel(BVHModel< BV > &model, const ShapeType &shape)
Center at zero point, axis aligned box.
int generateBVHModel(BVHModel< BV > &model, const Box< typename BV::S > &shape, const Transform3< typename BV::S > &pose, FinalizeModel finalize_model)
Generate BVH model from box.
after beginModel(), state for adding geometry primitives
Eigen::Translation< S, 3 > Translation3
GTEST_TEST(FCL_GENERATE_BVH_MODELS, generating_bvh_models_from_primitives)
A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as ...
int main(int argc, char *argv[])
empty state, immediately after constructor
Center at zero point sphere.
BVHBuildState build_state
The state of BVH building process.
void checkAddAndFinalizeModel(BVHModel< BV > &model, const ShapeType &shape)
void testBVHModelFromCone()