Public Types | Public Member Functions | Protected Attributes

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

#include <geometry_obb.h>

Inheritance diagram for OpenTissue::geometry::OBB< math_types_ >:
OpenTissue::geometry::VolumeShape< math_types_ > OpenTissue::function::SignedDistanceFunction< math_types_ > OpenTissue::utility::ClassID< OBB< math_types_ > > OpenTissue::geometry::BaseShape< math_types_ > OpenTissue::function::ImplicitFunction< 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::coordsys_type coordsys_type

Public Member Functions

void compute_surface_points (std::vector< vector3_type > &points) const
vector3_type center () const
vector3_type const & eps () const
vector3_type const & ext () const
matrix3x3_type const & orientation () const
size_t const class_id () const
 OBB ()
virtual ~OBB ()
 OBB (vector3_type const &T, matrix3x3_type const &R, vector3_type const &a)
 OBB (OBB const &box)
void set (OBB const &box)
void set (vector3_type const &T, matrix3x3_type const &R, vector3_type const &a)
void init (real_type const &width, real_type const &height, real_type const &depth)
void place (vector3_type const &T, matrix3x3_type const &R)
void place (coordsys_type const &X)
void xform (vector3_type const &T, matrix3x3_type const &R)
void xform (coordsys_type const &X)
real_type diameter () const
real_type area () const
real_type volume () const
void translate (vector3_type const &T)
void rotate (matrix3x3_type const &R)
void scale (real_type const &s)
vector3_type get_support_point (vector3_type const &v) const
real_type evaluate (vector3_type const &x) const
vector3_type gradient (vector3_type const &) const
vector3_type normal (vector3_type const &) const
real_type signed_distance (vector3_type const &) const
void compute_collision_aabb (vector3_type const &r, matrix3x3_type const &R, vector3_type &min_coord, vector3_type &max_coord) const

Protected Attributes

matrix3x3_type m_R
 The orientation of the axes of this oriented bounding box.
vector3_type m_T
 The location of this oriented bounding boxs center.
vector3_type m_ext
 The extends along this oriented bounding boxs axes.
vector3_type m_eps
 The extents and the collision envelope along this oriented bounding boxs axes.

Detailed Description

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

A Oriented Bounding Box.


Member Typedef Documentation

template<typename math_types_>
typedef math_types::coordsys_type OpenTissue::geometry::OBB< math_types_ >::coordsys_type
template<typename math_types_>
typedef math_types_ OpenTissue::geometry::OBB< math_types_ >::math_types
template<typename math_types_>
typedef math_types::matrix3x3_type OpenTissue::geometry::OBB< math_types_ >::matrix3x3_type
template<typename math_types_>
typedef math_types::real_type OpenTissue::geometry::OBB< math_types_ >::real_type
template<typename math_types_>
typedef math_types::value_traits OpenTissue::geometry::OBB< math_types_ >::value_traits
template<typename math_types_>
typedef math_types::vector3_type OpenTissue::geometry::OBB< math_types_ >::vector3_type

Constructor & Destructor Documentation

template<typename math_types_>
OpenTissue::geometry::OBB< math_types_ >::OBB (  )  [inline]
template<typename math_types_>
virtual OpenTissue::geometry::OBB< math_types_ >::~OBB (  )  [inline, virtual]
template<typename math_types_>
OpenTissue::geometry::OBB< math_types_ >::OBB ( vector3_type const &  T,
matrix3x3_type const &  R,
vector3_type const &  a 
) [inline, explicit]
template<typename math_types_>
OpenTissue::geometry::OBB< math_types_ >::OBB ( OBB< math_types_ > const &  box  )  [inline]

Member Function Documentation

template<typename math_types_>
real_type OpenTissue::geometry::OBB< math_types_ >::area (  )  const [inline]

Get Surface Area of OBB

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

Query the class ID.

Returns:
The object's class ID

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

template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::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 math_types_>
void OpenTissue::geometry::OBB< math_types_ >::compute_surface_points ( std::vector< vector3_type > &  points  )  const [inline]
template<typename math_types_>
real_type OpenTissue::geometry::OBB< math_types_ >::diameter (  )  const [inline]

Get Diameter of OBB. This is defined to be the length of the diagonal.

Returns:
template<typename math_types_>
vector3_type const& OpenTissue::geometry::OBB< math_types_ >::eps (  )  const [inline]
template<typename math_types_>
real_type OpenTissue::geometry::OBB< math_types_ >::evaluate ( vector3_type const &  x  )  const [inline]
template<typename math_types_>
vector3_type const& OpenTissue::geometry::OBB< math_types_ >::ext (  )  const [inline]
template<typename math_types_>
vector3_type OpenTissue::geometry::OBB< math_types_ >::get_support_point ( vector3_type const &  v  )  const [inline]
template<typename math_types_>
vector3_type OpenTissue::geometry::OBB< math_types_ >::gradient ( vector3_type const &   )  const [inline]
template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::init ( real_type const &  width,
real_type const &  height,
real_type const &  depth 
) [inline]
template<typename math_types_>
vector3_type OpenTissue::geometry::OBB< math_types_ >::normal ( vector3_type const &   )  const [inline]
template<typename math_types_>
matrix3x3_type const& OpenTissue::geometry::OBB< math_types_ >::orientation (  )  const [inline]
template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::place ( coordsys_type const &  X  )  [inline]
template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::place ( vector3_type const &  T,
matrix3x3_type const &  R 
) [inline]
template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::rotate ( matrix3x3_type const &  R  )  [inline]
template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::scale ( real_type const &  s  )  [inline]
template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::set ( vector3_type const &  T,
matrix3x3_type const &  R,
vector3_type const &  a 
) [inline]

Assignment method. Assigns values to this OBB, such that it is equal to the specified parameters.

Parameters:
T 
R 
a 
template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::set ( OBB< math_types_ > const &  box  )  [inline]

Assignment method. Assigns values to this OBB, such that it is equal to the specified OBB.

Parameters:
box 
template<typename math_types_>
real_type OpenTissue::geometry::OBB< math_types_ >::signed_distance ( vector3_type const &   )  const [inline]
template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::translate ( vector3_type const &  T  )  [inline]
template<typename math_types_>
real_type OpenTissue::geometry::OBB< math_types_ >::volume (  )  const [inline]

Get Volume of OBB

Returns:
template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::xform ( vector3_type const &  T,
matrix3x3_type const &  R 
) [inline]

Apply Transform to OBB First rotate then translate

Parameters:
T 
R 
template<typename math_types_>
void OpenTissue::geometry::OBB< math_types_ >::xform ( coordsys_type const &  X  )  [inline]

Apply Transform to OBB

Parameters:
X 

Member Data Documentation

template<typename math_types_>
vector3_type OpenTissue::geometry::OBB< math_types_ >::m_eps [protected]

The extents and the collision envelope along this oriented bounding boxs axes.

template<typename math_types_>
vector3_type OpenTissue::geometry::OBB< math_types_ >::m_ext [protected]

The extends along this oriented bounding boxs axes.

template<typename math_types_>
matrix3x3_type OpenTissue::geometry::OBB< math_types_ >::m_R [protected]

The orientation of the axes of this oriented bounding box.

template<typename math_types_>
vector3_type OpenTissue::geometry::OBB< math_types_ >::m_T [protected]

The location of this oriented bounding boxs center.


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