#include <collision_geometry_interface.h>
Public Types | |
typedef math_types::vector3_type | vector3_type |
typedef math_types::matrix3x3_type | matrix3x3_type |
Public Member Functions | |
virtual void | compute_collision_aabb (vector3_type const &r, matrix3x3_type const &R, vector3_type &min_coord, vector3_type &max_coord) const =0 |
Collision Geometry Interface. The purpose of this class is to create a common interface for collision geometries.
The interface should make it easier to integrate geometry types into a collision detection engine. In particular it should help make multiple dispatching easier (the class_id interface) and it should support basic functionality for computing bounding boxes (compute_collision_aabb method)
typedef math_types::matrix3x3_type OpenTissue::collision::GeometryInterface< math_types >::matrix3x3_type |
Reimplemented in OpenTissue::geometry::BaseShape< math_types >, OpenTissue::geometry::VolumeShape< math_types >, OpenTissue::geometry::BaseShape< types >, OpenTissue::geometry::BaseShape< typename types::math_policy >, OpenTissue::geometry::BaseShape< math_types_ >, OpenTissue::geometry::VolumeShape< typename types::math_policy >, and OpenTissue::geometry::VolumeShape< math_types_ >.
typedef math_types::vector3_type OpenTissue::collision::GeometryInterface< math_types >::vector3_type |
Reimplemented in OpenTissue::geometry::BaseShape< math_types >, OpenTissue::geometry::VolumeShape< math_types >, OpenTissue::geometry::BaseShape< types >, OpenTissue::geometry::BaseShape< typename types::math_policy >, OpenTissue::geometry::BaseShape< math_types_ >, OpenTissue::geometry::VolumeShape< typename types::math_policy >, and OpenTissue::geometry::VolumeShape< math_types_ >.
virtual void OpenTissue::collision::GeometryInterface< math_types >::compute_collision_aabb | ( | vector3_type const & | r, | |
matrix3x3_type const & | R, | |||
vector3_type & | min_coord, | |||
vector3_type & | max_coord | |||
) | const [pure virtual] |
Compute Bounding Box. This method computes an axis aligned bounding box (AABB) that encloses the geometry.
r | The position of the model frame (i.e the coordinate frame the geometry lives in). | |
R | The orientation of the model frame (i.e the coordinate frame the geometry lives in). | |
min_coord | Upon return holds the minimum corner of the box. | |
max_coord | Upon return holds the maximum corner of the box. |