Functions
test_fcl_generate_bvh_model_deferred_finalize.cpp File Reference
#include <gtest/gtest.h>
#include "fcl/config.h"
#include "fcl/geometry/geometric_shape_to_BVH_model.h"
#include "test_fcl_utility.h"
#include <iostream>
Include dependency graph for test_fcl_generate_bvh_model_deferred_finalize.cpp:

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 ()
 

Function Documentation

◆ checkAddAndFinalizeModel() [1/2]

template<typename BV >
void checkAddAndFinalizeModel ( BVHModel< BV > &  model,
const Box< typename BV::S > &  shape 
)

◆ checkAddAndFinalizeModel() [2/2]

template<typename BV , typename ShapeType >
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.

◆ checkAddToEmptyModel() [1/2]

template<typename BV >
void checkAddToEmptyModel ( BVHModel< BV > &  model,
const Box< typename BV::S > &  shape 
)

◆ checkAddToEmptyModel() [2/2]

template<typename BV , typename ShapeType >
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.

◆ checkAddToFinalizedModel() [1/2]

template<typename BV >
void checkAddToFinalizedModel ( BVHModel< BV > &  model,
const Box< typename BV::S > &  shape 
)

◆ checkAddToFinalizedModel() [2/2]

template<typename BV , typename ShapeType >
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.

◆ checkAddToUnfinalizedModel() [1/2]

template<typename BV >
void checkAddToUnfinalizedModel ( BVHModel< BV > &  model,
const Box< typename BV::S > &  shape 
)

◆ checkAddToUnfinalizedModel() [2/2]

template<typename BV , typename ShapeType >
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()

GTEST_TEST ( FCL_GENERATE_BVH_MODELS  ,
generating_bvh_models_from_primitives   
)

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ testBVHModelFromBox()

template<typename BV >
void testBVHModelFromBox ( )

◆ testBVHModelFromCone()

template<typename BV >
void testBVHModelFromCone ( )

◆ testBVHModelFromCylinder()

template<typename BV >
void testBVHModelFromCylinder ( )

◆ testBVHModelFromEllipsoid()

template<typename BV >
void testBVHModelFromEllipsoid ( )

◆ testBVHModelFromPrimitives()

template<typename BV >
void testBVHModelFromPrimitives ( )

◆ testBVHModelFromSphere()

template<typename BV >
void testBVHModelFromSphere ( )


fcl
Author(s):
autogenerated on Wed Mar 2 2022 00:15:33