Classes | Public Member Functions | Protected Types | Protected Attributes

OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy > Class Template Reference

#include <mbd_collision_detection.h>

List of all members.

Classes

class  constraint_traits
class  edge_traits
class  node_traits

Public Member Functions

 CollisionDetection ()
broad_phase_typeget_broad_phase ()
broad_phase_type const * get_broad_phase () const
narrow_phase_typeget_narrow_phase ()
narrow_phase_type const * get_narrow_phase () const
analyzer_typeget_analyzer ()
analyzer_type const * get_analyzer () const
bool run (group_ptr_container &groups)
void init (configuration_type &configuration)
void clear ()
bool add (body_type *body)
bool remove (body_type *body)
void set_short_circuiting (bool const &value)
bool is_short_circuiting () const
size_type get_time_stamp () const

Protected Types

typedef
types::math_policy::index_type 
size_type
typedef types::configuration_type configuration_type
typedef types::body_type body_type
typedef types::edge_type edge_type
typedef types::group_ptr_container group_ptr_container
typedef types::group_type group_type
typedef types::edge_ptr_container edge_ptr_container
typedef
types::indirect_edge_iterator 
indirect_edge_iterator
typedef BroadPhasePolicy< typesbroad_phase_type
typedef NarrowPhasePolicy< typesnarrow_phase_type
typedef AnalyzerPolicy< typesanalyzer_type

Protected Attributes

configuration_typem_configuration
 A pointer to the configuration.
broad_phase_type m_broad_phase
 Broad phase collision detection algorithm.
narrow_phase_type m_narrow_phase
 Narrow phase collision detection algorithm.
analyzer_type m_analyzer
 Spatial Temporal Analyzer.
bool m_short_circuit
 Boolean flag indicating whether the collision detection engine should short-circuit on first penetration it finds.
size_type m_time_stamp
 Time-stamp of last invocation of the collision detection engine.

Detailed Description

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
class OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >

Collision Detection Engine. This class implements the basic behavior of a traditional collision detection engine, there are some subtelty to it, which is not seen in most others collsion detection engines. The different thing is that there is an explicit contact determination phase and a spatical-temporal analysis phase (see DIKU technical report no. 04-06 for more details).


Member Typedef Documentation

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef AnalyzerPolicy<types> OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::analyzer_type [protected]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef types::body_type OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::body_type [protected]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef BroadPhasePolicy<types> OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::broad_phase_type [protected]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef types::configuration_type OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::configuration_type [protected]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef types::edge_ptr_container OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::edge_ptr_container [protected]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef types::edge_type OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::edge_type [protected]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef types::group_ptr_container OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::group_ptr_container [protected]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef types::group_type OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::group_type [protected]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef types::indirect_edge_iterator OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::indirect_edge_iterator [protected]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef NarrowPhasePolicy<types> OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::narrow_phase_type [protected]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
typedef types::math_policy::index_type OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::size_type [protected]

Constructor & Destructor Documentation

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::CollisionDetection (  )  [inline]

Member Function Documentation

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
bool OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::add ( body_type body  )  [inline]

Notify Add body_type. Used by the configuration to tell the collision detection engine that the configuration has changed.

Parameters:
body 
Returns:
A boolean value indicating whether the notification was succesfull or not.
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
void OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::clear (  )  [inline]

Clear All.

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
analyzer_type* OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::get_analyzer (  )  [inline]

Get Analyzer Module.

Returns:
A pointer to the analyzer collision detection module.
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
analyzer_type const* OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::get_analyzer (  )  const [inline]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
broad_phase_type* OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::get_broad_phase (  )  [inline]

Get Broad Phase Module.

Returns:
A pointer to the broad phase collision detection module.
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
broad_phase_type const* OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::get_broad_phase (  )  const [inline]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
narrow_phase_type const* OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::get_narrow_phase (  )  const [inline]
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
narrow_phase_type* OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::get_narrow_phase (  )  [inline]

Get Narrow Phase Module.

Returns:
A pointer to the narrow phase collision detection module.
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
size_type OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::get_time_stamp (  )  const [inline]

Get Time-Stamp.

Returns:
The value of the time-stamp of the last invocation of the collision detection engine.
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
void OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::init ( configuration_type configuration  )  [inline]

Initialization Routine.

Parameters:
configuration 
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
bool OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::is_short_circuiting (  )  const [inline]

Retrive Short Circuiting State.

Returns:
A boolean value indicating whether short circuiting is on.
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
bool OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::remove ( body_type body  )  [inline]

Notify Remove body_type. Used by the configuration to tell the collision detection engine that the configuration has changed.

Parameters:
body 
Returns:
A boolean value indicating whether the notification was succesfull or not.
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
bool OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::run ( group_ptr_container groups  )  [inline]

Run Collision Detection Query.

Parameters:
groups Upon return this container contains all the contact groups that have been detected.
Returns:
If a penetration have been discovered then the return value is true otherwise it is false.
template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
void OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::set_short_circuiting ( bool const &  value  )  [inline]

Set Short Circuiting.

Parameters:
value The new short circuiting value, if on collision detection engine will terminate the query first time a penetration is encountered.

Member Data Documentation

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
analyzer_type OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::m_analyzer [protected]

Spatial Temporal Analyzer.

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
broad_phase_type OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::m_broad_phase [protected]

Broad phase collision detection algorithm.

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
configuration_type* OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::m_configuration [protected]

A pointer to the configuration.

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
narrow_phase_type OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::m_narrow_phase [protected]

Narrow phase collision detection algorithm.

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
bool OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::m_short_circuit [protected]

Boolean flag indicating whether the collision detection engine should short-circuit on first penetration it finds.

template<typename types, template< typename types > class BroadPhasePolicy, template< typename types > class NarrowPhasePolicy, template< typename types > class AnalyzerPolicy>
size_type OpenTissue::mbd::CollisionDetection< types, BroadPhasePolicy, NarrowPhasePolicy, AnalyzerPolicy >::m_time_stamp [protected]

Time-stamp of last invocation of the collision detection engine.


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