#include <gtest/gtest.h>
#include "fcl/config.h"
#include "fcl/geometry/geometric_shape_to_BVH_model.h"
#include "test_fcl_utility.h"
#include <iostream>
Go to the source code of this file.
Functions | |
template<typename BV > | |
void | checkAddAndFinalizeModel (BVHModel< BV > &model, const Box< typename BV::S > &shape) |
template<typename BV , typename ShapeType > | |
void | checkAddAndFinalizeModel (BVHModel< BV > &model, const ShapeType &shape) |
template<typename BV > | |
void | checkAddToEmptyModel (BVHModel< BV > &model, const Box< typename BV::S > &shape) |
template<typename BV , typename ShapeType > | |
void | checkAddToEmptyModel (BVHModel< BV > &model, const ShapeType &shape) |
template<typename BV > | |
void | checkAddToFinalizedModel (BVHModel< BV > &model, const Box< typename BV::S > &shape) |
template<typename BV , typename ShapeType > | |
void | checkAddToFinalizedModel (BVHModel< BV > &model, const ShapeType &shape) |
template<typename BV > | |
void | checkAddToUnfinalizedModel (BVHModel< BV > &model, const Box< typename BV::S > &shape) |
template<typename BV , typename ShapeType > | |
void | checkAddToUnfinalizedModel (BVHModel< BV > &model, const ShapeType &shape) |
GTEST_TEST (FCL_GENERATE_BVH_MODELS, generating_bvh_models_from_primitives) | |
int | main (int argc, char *argv[]) |
template<typename BV > | |
void | testBVHModelFromBox () |
template<typename BV > | |
void | testBVHModelFromCone () |
template<typename BV > | |
void | testBVHModelFromCylinder () |
template<typename BV > | |
void | testBVHModelFromEllipsoid () |
template<typename BV > | |
void | testBVHModelFromPrimitives () |
template<typename BV > | |
void | testBVHModelFromSphere () |
void checkAddAndFinalizeModel | ( | BVHModel< BV > & | model, |
const Box< typename BV::S > & | shape | ||
) |
Definition at line 179 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void checkAddAndFinalizeModel | ( | BVHModel< BV > & | model, |
const ShapeType & | shape | ||
) |
This function tests adding primitives to a previously begun model It checks proper functionality by checking the return value, the number of vertices and triangles and the state of the model after execution. After this call, the model is finalized.
Definition at line 159 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void checkAddToEmptyModel | ( | BVHModel< BV > & | model, |
const Box< typename BV::S > & | shape | ||
) |
Definition at line 86 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void checkAddToEmptyModel | ( | BVHModel< BV > & | model, |
const ShapeType & | shape | ||
) |
@description This file tests functionality in generateBVHModel(). Specifically, it tests that a BVHModel can be either finalized after adding a geometric primitive, or left "open" in order to add further shapes at a later time. This functionality is tested without any regard to proper functionality or special cases in the conversion from geometric primitive to BVHModel.
This function tests adding geometric primitives to an empty model. It checks proper functionality of those simply by verifying the return value, the number of vertices, triangles and the state of the model. In the process, the provided model will always be BVH_BUILD_STATE_BEGUN afterwards
Definition at line 63 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void checkAddToFinalizedModel | ( | BVHModel< BV > & | model, |
const Box< typename BV::S > & | shape | ||
) |
Definition at line 214 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void checkAddToFinalizedModel | ( | BVHModel< BV > & | model, |
const ShapeType & | shape | ||
) |
This function tests that adding geometric primitives to a finalized model indeed returns the BVH error we would expect.
Definition at line 202 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void checkAddToUnfinalizedModel | ( | BVHModel< BV > & | model, |
const Box< typename BV::S > & | shape | ||
) |
Definition at line 133 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void checkAddToUnfinalizedModel | ( | BVHModel< BV > & | model, |
const ShapeType & | shape | ||
) |
This function tests adding geometric primitives to an unfinalized model. It checks proper functionality by verifying the return value, the number of vertices, triangles and the state of the model. After execution, the provided model will always be BVH_BUILD_STATE_BEGUN.
Definition at line 112 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
GTEST_TEST | ( | FCL_GENERATE_BVH_MODELS | , |
generating_bvh_models_from_primitives | |||
) |
Definition at line 314 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 327 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void testBVHModelFromBox | ( | ) |
Definition at line 224 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void testBVHModelFromCone | ( | ) |
Definition at line 289 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void testBVHModelFromCylinder | ( | ) |
Definition at line 273 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void testBVHModelFromEllipsoid | ( | ) |
Definition at line 256 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void testBVHModelFromPrimitives | ( | ) |
Definition at line 305 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.
void testBVHModelFromSphere | ( | ) |
Definition at line 242 of file test_fcl_generate_bvh_model_deferred_finalize.cpp.