Public Types | Public Member Functions | Protected Member Functions

OpenTissue::bvh::SelfCollisionQuery< collision_policy > Class Template Reference

#include <bvh_self_collision_query.h>

Inheritance diagram for OpenTissue::bvh::SelfCollisionQuery< collision_policy >:
collision_policy

List of all members.

Public Types

typedef collision_policy::bvh_type bvh_type
typedef bvh_type::bv_ptr bv_ptr
typedef bvh_type::bv_ptr_container bv_ptr_container
typedef bvh_type::bv_type bv_type
typedef bv_type::bv_ptr_iterator bv_ptr_iterator

Public Member Functions

template<typename results_container >
void run (bvh_type const &bvh, results_container &results)

Protected Member Functions

template<typename results_container >
void self_test (bv_ptr bv, results_container &results)
template<typename results_container >
void tandem_test (bv_ptr bv_A, bv_ptr bv_B, results_container &results)

Detailed Description

template<typename collision_policy>
class OpenTissue::bvh::SelfCollisionQuery< collision_policy >

Self Collision Query.

The collision policy must support the following interface:

bool adjacent(bv_ptr_type,bv_ptr_type) bool curvature_test(bv_ptr_type) bool curvature_test(bv_ptr_type,bv_ptr_type) bool overlap(bv_ptr_type,bv_ptr_type) bool report(bv_ptr_type,bv_ptr_type,result_type)

In 2D the curvature test is a test for flatness of the surface, if it is not bend enough for being self-intersecting the curvature test is passed i.e. returns true. If surface is severly bend the curvature test should fail.

For volumetric meshes, it is not easy to define what is meant by a curvature test. However this implementation allows for a equivalent test to be used.


Member Typedef Documentation

template<typename collision_policy >
typedef bvh_type::bv_ptr OpenTissue::bvh::SelfCollisionQuery< collision_policy >::bv_ptr
template<typename collision_policy >
typedef bvh_type::bv_ptr_container OpenTissue::bvh::SelfCollisionQuery< collision_policy >::bv_ptr_container
template<typename collision_policy >
typedef bv_type::bv_ptr_iterator OpenTissue::bvh::SelfCollisionQuery< collision_policy >::bv_ptr_iterator
template<typename collision_policy >
typedef bvh_type::bv_type OpenTissue::bvh::SelfCollisionQuery< collision_policy >::bv_type
template<typename collision_policy >
typedef collision_policy::bvh_type OpenTissue::bvh::SelfCollisionQuery< collision_policy >::bvh_type

Member Function Documentation

template<typename collision_policy >
template<typename results_container >
void OpenTissue::bvh::SelfCollisionQuery< collision_policy >::run ( bvh_type const &  bvh,
results_container &  results 
) [inline]

Run Collision Query.

Parameters:
bvh The bvh upon which to perform self-collision.
results Upon return this container contains any results from the collision query.
template<typename collision_policy >
template<typename results_container >
void OpenTissue::bvh::SelfCollisionQuery< collision_policy >::self_test ( bv_ptr  bv,
results_container &  results 
) [inline, protected]

Self-test

Parameters:
bv A pointer to the bv that is current being tested agasint it-self.
results Upon return this container contains any results from the collision query.
template<typename collision_policy >
template<typename results_container >
void OpenTissue::bvh::SelfCollisionQuery< collision_policy >::tandem_test ( bv_ptr  bv_A,
bv_ptr  bv_B,
results_container &  results 
) [inline, protected]

Run Tandem Test.

Parameters:
bv_A Pointer to a bv.
bv_B Pointer to another bv.
results Upon return this container contains any results from the collision query.

The documentation for this class was generated from the following file: