Public Types | Public Member Functions | Public Attributes

OpenTissue::sdf::Geometry< mesh_type_, grid_type_ > Class Template Reference

#include <sdf_geometry.h>

Inheritance diagram for OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >:
OpenTissue::collision::GeometryInterface< mesh_type_::math_types > OpenTissue::utility::ClassID< Geometry< mesh_type_, grid_type_ > > OpenTissue::utility::ClassIDInterface OpenTissue::utility::ClassIDInterface

List of all members.

Public Types

typedef mesh_type_ mesh_type
typedef grid_type_ grid_type
typedef mesh_type::math_types math_types
typedef math_types::real_type real_type
typedef math_types::vector3_type vector3_type
typedef math_types::matrix3x3_type matrix3x3_type
typedef geometry::Sphere
< math_types
sphere_type
typedef std::list< vector3_typepoint_container
typedef point_container::iterator point_iterator
typedef
point_container::const_iterator 
const_point_iterator
typedef
bvh::BoundingVolumeHierarchy
< sphere_type, vector3_type * > 
bvh_type

Public Member Functions

size_t const class_id () const
 Geometry ()
vector3_type ext () const
real_type const & max_radius () const
void compute_collision_aabb (vector3_type const &r, matrix3x3_type const &R, vector3_type &min_coord, vector3_type &max_coord) const

Public Attributes

mesh_type m_mesh
 A pointer to the mesh representing the zero-level set surface of the signed distance field.
grid_type m_phi
 A pointer to a map containing the signed distance field.
real_type m_max_radius
 The maximum radius.
vector3_type m_min_coord
 The AABB corner node with smallest coordinates (in BF coords).
vector3_type m_max_coord
 The AABB corner node with largest coordinates (in BF coords).
point_container m_sampling
 A point sampling, representing the zero level set surface of the signed distance map.
bvh_type m_bvh
 Sphere BVH (of sample points), used to speed up collision queries.

Detailed Description

template<typename mesh_type_, typename grid_type_>
class OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >

Signed Distance Map Geometry. This is infact a double representation, a signed distance map is used and a point sampling of the surface of the object is also used.

When doing collision detection between two bodies one simply looks up the point sampling in the distance map of the other body and vice versa. All sample points with distance less than collision envelope generates a contact point. The separation (or penetration) distance is simply the signed distance value at the sample points position, the contact normal is the gradient of the signed distance map the sample position, and the location of the contact points is given by the sample position.


Member Typedef Documentation

template<typename mesh_type_ , typename grid_type_ >
typedef bvh::BoundingVolumeHierarchy<sphere_type,vector3_type*> OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::bvh_type
template<typename mesh_type_ , typename grid_type_ >
typedef point_container::const_iterator OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::const_point_iterator
template<typename mesh_type_ , typename grid_type_ >
typedef grid_type_ OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::grid_type
template<typename mesh_type_ , typename grid_type_ >
typedef mesh_type::math_types OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::math_types
template<typename mesh_type_ , typename grid_type_ >
typedef math_types::matrix3x3_type OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::matrix3x3_type
template<typename mesh_type_ , typename grid_type_ >
typedef mesh_type_ OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::mesh_type
template<typename mesh_type_ , typename grid_type_ >
typedef std::list<vector3_type> OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::point_container
template<typename mesh_type_ , typename grid_type_ >
typedef point_container::iterator OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::point_iterator
template<typename mesh_type_ , typename grid_type_ >
typedef math_types::real_type OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::real_type
template<typename mesh_type_ , typename grid_type_ >
typedef geometry::Sphere<math_types> OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::sphere_type
template<typename mesh_type_ , typename grid_type_ >
typedef math_types::vector3_type OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::vector3_type

Constructor & Destructor Documentation

template<typename mesh_type_ , typename grid_type_ >
OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::Geometry (  )  [inline]

Member Function Documentation

template<typename mesh_type_ , typename grid_type_ >
size_t const OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::class_id (  )  const [inline, virtual]

Query the class ID.

Returns:
The object's class ID

Reimplemented from OpenTissue::utility::ClassID< Geometry< mesh_type_, grid_type_ > >.

template<typename mesh_type_ , typename grid_type_ >
void OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::compute_collision_aabb ( vector3_type const &  r,
matrix3x3_type const &  R,
vector3_type min_coord,
vector3_type max_coord 
) const [inline]

Compute Bounding Box. This method computes an axis aligned bounding box (AABB) that encloses the geometry.

Parameters:
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.
template<typename mesh_type_ , typename grid_type_ >
vector3_type OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::ext (  )  const [inline]

Get Half Side Extents

Returns:
A 3D vector, where each component corresponds to the half-side extent of the tight fitting OBB of the signed distance field.
template<typename mesh_type_ , typename grid_type_ >
real_type const& OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::max_radius (  )  const [inline]

Maximum Radius. Return a radius value equal to or greater than the radius of the minimum enclosing sphere (with center at center of mass).

Returns:
The maximum radius.

Member Data Documentation

template<typename mesh_type_ , typename grid_type_ >
bvh_type OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::m_bvh

Sphere BVH (of sample points), used to speed up collision queries.

template<typename mesh_type_ , typename grid_type_ >
vector3_type OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::m_max_coord

The AABB corner node with largest coordinates (in BF coords).

template<typename mesh_type_ , typename grid_type_ >
real_type OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::m_max_radius

The maximum radius.

template<typename mesh_type_ , typename grid_type_ >
mesh_type OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::m_mesh

A pointer to the mesh representing the zero-level set surface of the signed distance field.

template<typename mesh_type_ , typename grid_type_ >
vector3_type OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::m_min_coord

The AABB corner node with smallest coordinates (in BF coords).

template<typename mesh_type_ , typename grid_type_ >
grid_type OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::m_phi

A pointer to a map containing the signed distance field.

template<typename mesh_type_ , typename grid_type_ >
point_container OpenTissue::sdf::Geometry< mesh_type_, grid_type_ >::m_sampling

A point sampling, representing the zero level set surface of the signed distance map.


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