Public Types | Public Member Functions | Public Attributes

OpenTissue::geometry::AABB< math_types_ > Class Template Reference

#include <geometry_aabb.h>

Inheritance diagram for OpenTissue::geometry::AABB< math_types_ >:
OpenTissue::geometry::VolumeShape< math_types_ > OpenTissue::utility::ClassID< AABB< math_types_ > > OpenTissue::geometry::BaseShape< math_types_ > OpenTissue::utility::ClassIDInterface OpenTissue::collision::GeometryInterface< math_types_ > OpenTissue::utility::ClassIDInterface

List of all members.

Public Types

typedef math_types_ math_types
typedef math_types::value_traits value_traits
typedef math_types::real_type real_type
typedef math_types::vector3_type vector3_type
typedef math_types::matrix3x3_type matrix3x3_type
typedef math_types::quaternion_type quaternion_type

Public Member Functions

size_t const class_id () const
 AABB ()
 AABB (real_type const &xmin, real_type const &ymin, real_type const &zmin, real_type const &xmax, real_type const &ymax, real_type const &zmax)
 AABB (vector3_type const &pmin_v, vector3_type const &pmax_v)
virtual ~AABB ()
void compute_surface_points (std::vector< vector3_type > &points) const
vector3_type center () const
void set (AABB const &other_aabb)
void set (vector3_type const &pmin_v, vector3_type const &pmax_v)
void set (real_type const &xmin, real_type const &ymin, real_type const &zmin, real_type const &xmax, real_type const &ymax, real_type const &zmax)
void extent (real_type const &xmin, real_type const &ymin, real_type const &zmin, real_type const &width, real_type const &height, real_type const &depth)
real_type const & x () const
real_type const & y () const
real_type const & z () const
real_type w () const
real_type h () const
real_type d () const
vector3_typemin ()
vector3_typemax ()
vector3_type const & min () const
vector3_type const & max () const
void update (vector3_type const &n0, vector3_type const &n1, vector3_type const &n2)
void update (vector3_type const &n0, vector3_type const &n1, vector3_type const &n2, vector3_type const &n3)
void update (AABB const &A, AABB const &B)
real_type volume () const
real_type area () const
real_type diameter () const
void translate (vector3_type const &T)
void rotate (matrix3x3_type const &)
void scale (real_type const &s)
vector3_type get_support_point (vector3_type const &v) const
void compute_collision_aabb (vector3_type const &r, matrix3x3_type const &, vector3_type &min_coord, vector3_type &max_coord) const

Public Attributes

vector3_type m_min
 Coordinates of minimum corner.
vector3_type m_max
 Coordinates of maximum corner.

Detailed Description

template<typename math_types_>
class OpenTissue::geometry::AABB< math_types_ >

Axed Aligned Bounding Box (AABB).


Member Typedef Documentation

template<typename math_types_>
typedef math_types_ OpenTissue::geometry::AABB< math_types_ >::math_types
template<typename math_types_>
typedef math_types::matrix3x3_type OpenTissue::geometry::AABB< math_types_ >::matrix3x3_type
template<typename math_types_>
typedef math_types::quaternion_type OpenTissue::geometry::AABB< math_types_ >::quaternion_type
template<typename math_types_>
typedef math_types::real_type OpenTissue::geometry::AABB< math_types_ >::real_type
template<typename math_types_>
typedef math_types::value_traits OpenTissue::geometry::AABB< math_types_ >::value_traits
template<typename math_types_>
typedef math_types::vector3_type OpenTissue::geometry::AABB< math_types_ >::vector3_type

Constructor & Destructor Documentation

template<typename math_types_>
OpenTissue::geometry::AABB< math_types_ >::AABB (  )  [inline]
template<typename math_types_>
OpenTissue::geometry::AABB< math_types_ >::AABB ( real_type const &  xmin,
real_type const &  ymin,
real_type const &  zmin,
real_type const &  xmax,
real_type const &  ymax,
real_type const &  zmax 
) [inline, explicit]
template<typename math_types_>
OpenTissue::geometry::AABB< math_types_ >::AABB ( vector3_type const &  pmin_v,
vector3_type const &  pmax_v 
) [inline, explicit]
template<typename math_types_>
virtual OpenTissue::geometry::AABB< math_types_ >::~AABB (  )  [inline, virtual]

Member Function Documentation

template<typename math_types_>
real_type OpenTissue::geometry::AABB< math_types_ >::area (  )  const [inline]
template<typename math_types_>
vector3_type OpenTissue::geometry::AABB< math_types_ >::center (  )  const [inline]
template<typename math_types_>
size_t const OpenTissue::geometry::AABB< math_types_ >::class_id (  )  const [inline, virtual]

Query the class ID.

Returns:
The object's class ID

Reimplemented from OpenTissue::utility::ClassID< AABB< math_types_ > >.

template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::compute_collision_aabb ( vector3_type const &  r,
matrix3x3_type const &  ,
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 math_types_>
void OpenTissue::geometry::AABB< math_types_ >::compute_surface_points ( std::vector< vector3_type > &  points  )  const [inline]
template<typename math_types_>
real_type OpenTissue::geometry::AABB< math_types_ >::d (  )  const [inline]
template<typename math_types_>
real_type OpenTissue::geometry::AABB< math_types_ >::diameter (  )  const [inline]
template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::extent ( real_type const &  xmin,
real_type const &  ymin,
real_type const &  zmin,
real_type const &  width,
real_type const &  height,
real_type const &  depth 
) [inline]

Set AABB box.

Parameters:
xmin 
ymin 
zmin 
width 
height 
depth 
template<typename math_types_>
vector3_type OpenTissue::geometry::AABB< math_types_ >::get_support_point ( vector3_type const &  v  )  const [inline]
template<typename math_types_>
real_type OpenTissue::geometry::AABB< math_types_ >::h (  )  const [inline]
template<typename math_types_>
vector3_type const& OpenTissue::geometry::AABB< math_types_ >::max (  )  const [inline]
template<typename math_types_>
vector3_type& OpenTissue::geometry::AABB< math_types_ >::max (  )  [inline]
template<typename math_types_>
vector3_type const& OpenTissue::geometry::AABB< math_types_ >::min (  )  const [inline]
template<typename math_types_>
vector3_type& OpenTissue::geometry::AABB< math_types_ >::min (  )  [inline]
template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::rotate ( matrix3x3_type const &   )  [inline]
template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::scale ( real_type const &  s  )  [inline]
template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::set ( vector3_type const &  pmin_v,
vector3_type const &  pmax_v 
) [inline]
template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::set ( AABB< math_types_ > const &  other_aabb  )  [inline]

Assingment Method. Assigns the size of the specified AABB to this AABB.

Parameters:
other_aabb Another AABB
template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::set ( real_type const &  xmin,
real_type const &  ymin,
real_type const &  zmin,
real_type const &  xmax,
real_type const &  ymax,
real_type const &  zmax 
) [inline]

Set AABB box.

Parameters:
xmin 
ymin 
zmin 
xmax 
ymax 
zmax 
template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::translate ( vector3_type const &  T  )  [inline]
template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::update ( vector3_type const &  n0,
vector3_type const &  n1,
vector3_type const &  n2,
vector3_type const &  n3 
) [inline]

Update Bounding Box This method updates the size of the AABB such that it encloses the given nodes.

Parameters:
n0 
n1 
n2 
n3 
template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::update ( vector3_type const &  n0,
vector3_type const &  n1,
vector3_type const &  n2 
) [inline]

Update Bounding Box This method updates the size of the AABB such that it encloses the given nodes.

Parameters:
n0 
n1 
n2 
template<typename math_types_>
void OpenTissue::geometry::AABB< math_types_ >::update ( AABB< math_types_ > const &  A,
AABB< math_types_ > const &  B 
) [inline]

Update Box. This method updates the size of the AABB such that it encloses the given AABBs.

Parameters:
A 
B 
template<typename math_types_>
real_type OpenTissue::geometry::AABB< math_types_ >::volume (  )  const [inline]

Get Volume.

Returns:
The current value of the volume of the AABB.
template<typename math_types_>
real_type OpenTissue::geometry::AABB< math_types_ >::w (  )  const [inline]
template<typename math_types_>
real_type const& OpenTissue::geometry::AABB< math_types_ >::x (  )  const [inline]
template<typename math_types_>
real_type const& OpenTissue::geometry::AABB< math_types_ >::y (  )  const [inline]
template<typename math_types_>
real_type const& OpenTissue::geometry::AABB< math_types_ >::z (  )  const [inline]

Member Data Documentation

template<typename math_types_>
vector3_type OpenTissue::geometry::AABB< math_types_ >::m_max

Coordinates of maximum corner.

template<typename math_types_>
vector3_type OpenTissue::geometry::AABB< math_types_ >::m_min

Coordinates of minimum corner.


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