sofa::defaulttype::RigidDeriv< 3, real > Class Template Reference

Degrees of freedom of 3D rigid bodies. More...

#include <RigidTypes.h>

Collaboration diagram for sofa::defaulttype::RigidDeriv< 3, real >:

Collaboration graph
[legend]

Public Types

enum  { static_size = 3 }
typedef real value_type
typedef real Real
typedef Vec< 3, Real > Vec3
typedef helper::Quater< Real > Quat

Public Member Functions

 RigidDeriv (const Vec3 &velCenter, const Vec3 &velOrient)
 RigidDeriv ()
template<typename real2 >
 RigidDeriv (const RigidDeriv< 3, real2 > &c)
void clear ()
template<typename real2 >
void operator= (const RigidDeriv< 3, real2 > &c)
void operator+= (const RigidDeriv &a)
void operator-= (const RigidDeriv &a)
RigidDeriv< 3, real > operator+ (const RigidDeriv< 3, real > &a) const
template<typename real2 >
void operator*= (real2 a)
RigidDeriv< 3, real > operator* (float a) const
RigidDeriv< 3, real > operator* (double a) const
RigidDeriv< 3, real > operator- () const
RigidDeriv< 3, real > operator- (const RigidDeriv< 3, real > &a) const
Real operator* (const RigidDeriv< 3, real > &a) const
 dot product, mostly used to compute residuals as sqrt(x*x)
Vec3 & getVCenter (void)
Vec3 & getVOrientation (void)
const Vec3 & getVCenter (void) const
const Vec3 & getVOrientation (void) const
Vec3 & getLinear ()
const Vec3 & getLinear () const
Vec3 & getAngular ()
const Vec3 & getAngular () const
real * ptr ()
const real * ptr () const
real & operator[] (int i)
 Access to i-th element.
const real & operator[] (int i) const
 Const access to i-th element.

Static Public Member Functions

static unsigned int size ()

Protected Attributes

Vec3 vCenter
Vec3 vOrientation

Friends

class RigidCoord< 3, real >
std::ostream & operator<< (std::ostream &out, const RigidDeriv< 3, real > &v)
 write to an output stream
std::istream & operator>> (std::istream &in, RigidDeriv< 3, real > &v)
 read from an input stream

Detailed Description

template<typename real>
class sofa::defaulttype::RigidDeriv< 3, real >

Degrees of freedom of 3D rigid bodies.

Orientations are modeled using quaternions.

Definition at line 67 of file RigidTypes.h.


Member Typedef Documentation

template<typename real >
typedef helper::Quater<Real> sofa::defaulttype::RigidDeriv< 3, real >::Quat

Definition at line 73 of file RigidTypes.h.

template<typename real >
typedef real sofa::defaulttype::RigidDeriv< 3, real >::Real

Definition at line 71 of file RigidTypes.h.

template<typename real >
typedef real sofa::defaulttype::RigidDeriv< 3, real >::value_type

Definition at line 70 of file RigidTypes.h.

template<typename real >
typedef Vec<3,Real> sofa::defaulttype::RigidDeriv< 3, real >::Vec3

Definition at line 72 of file RigidTypes.h.


Member Enumeration Documentation

template<typename real >
anonymous enum

Enumerator:
static_size 

Definition at line 183 of file RigidTypes.h.


Constructor & Destructor Documentation

template<typename real >
sofa::defaulttype::RigidDeriv< 3, real >::RigidDeriv ( const Vec3 &  velCenter,
const Vec3 &  velOrient 
) [inline]

Definition at line 81 of file RigidTypes.h.

template<typename real >
sofa::defaulttype::RigidDeriv< 3, real >::RigidDeriv (  )  [inline]

Definition at line 83 of file RigidTypes.h.

References sofa::component::clear().

template<typename real >
template<typename real2 >
sofa::defaulttype::RigidDeriv< 3, real >::RigidDeriv ( const RigidDeriv< 3, real2 > &  c  )  [inline]

Definition at line 86 of file RigidTypes.h.


Member Function Documentation

template<typename real >
void sofa::defaulttype::RigidDeriv< 3, real >::clear (  )  [inline]

Definition at line 91 of file RigidTypes.h.

template<typename real >
const Vec3& sofa::defaulttype::RigidDeriv< 3, real >::getAngular (  )  const [inline]

Definition at line 168 of file RigidTypes.h.

template<typename real >
Vec3& sofa::defaulttype::RigidDeriv< 3, real >::getAngular (  )  [inline]

Definition at line 167 of file RigidTypes.h.

template<typename real >
const Vec3& sofa::defaulttype::RigidDeriv< 3, real >::getLinear (  )  const [inline]

Definition at line 166 of file RigidTypes.h.

template<typename real >
Vec3& sofa::defaulttype::RigidDeriv< 3, real >::getLinear (  )  [inline]

Definition at line 165 of file RigidTypes.h.

template<typename real >
const Vec3& sofa::defaulttype::RigidDeriv< 3, real >::getVCenter ( void   )  const [inline]

Definition at line 162 of file RigidTypes.h.

template<typename real >
Vec3& sofa::defaulttype::RigidDeriv< 3, real >::getVCenter ( void   )  [inline]

template<typename real >
const Vec3& sofa::defaulttype::RigidDeriv< 3, real >::getVOrientation ( void   )  const [inline]

Definition at line 163 of file RigidTypes.h.

template<typename real >
Vec3& sofa::defaulttype::RigidDeriv< 3, real >::getVOrientation ( void   )  [inline]

template<typename real >
Real sofa::defaulttype::RigidDeriv< 3, real >::operator* ( const RigidDeriv< 3, real > &  a  )  const [inline]

dot product, mostly used to compute residuals as sqrt(x*x)

Definition at line 153 of file RigidTypes.h.

References vCenter, and vOrientation.

template<typename real >
RigidDeriv<3,real> sofa::defaulttype::RigidDeriv< 3, real >::operator* ( double  a  )  const [inline]

Definition at line 134 of file RigidTypes.h.

template<typename real >
RigidDeriv<3,real> sofa::defaulttype::RigidDeriv< 3, real >::operator* ( float  a  )  const [inline]

Definition at line 127 of file RigidTypes.h.

template<typename real >
template<typename real2 >
void sofa::defaulttype::RigidDeriv< 3, real >::operator*= ( real2  a  )  [inline]

Definition at line 121 of file RigidTypes.h.

template<typename real >
RigidDeriv<3,real> sofa::defaulttype::RigidDeriv< 3, real >::operator+ ( const RigidDeriv< 3, real > &  a  )  const [inline]

Definition at line 112 of file RigidTypes.h.

References vCenter, and vOrientation.

template<typename real >
void sofa::defaulttype::RigidDeriv< 3, real >::operator+= ( const RigidDeriv< 3, real > &  a  )  [inline]

Definition at line 100 of file RigidTypes.h.

template<typename real >
RigidDeriv<3,real> sofa::defaulttype::RigidDeriv< 3, real >::operator- ( const RigidDeriv< 3, real > &  a  )  const [inline]

Definition at line 146 of file RigidTypes.h.

References vCenter, and vOrientation.

template<typename real >
RigidDeriv<3,real> sofa::defaulttype::RigidDeriv< 3, real >::operator- (  )  const [inline]

Definition at line 141 of file RigidTypes.h.

template<typename real >
void sofa::defaulttype::RigidDeriv< 3, real >::operator-= ( const RigidDeriv< 3, real > &  a  )  [inline]

Definition at line 106 of file RigidTypes.h.

template<typename real >
template<typename real2 >
void sofa::defaulttype::RigidDeriv< 3, real >::operator= ( const RigidDeriv< 3, real2 > &  c  )  [inline]

Definition at line 94 of file RigidTypes.h.

template<typename real >
const real& sofa::defaulttype::RigidDeriv< 3, real >::operator[] ( int  i  )  const [inline]

Const access to i-th element.

Definition at line 200 of file RigidTypes.h.

template<typename real >
real& sofa::defaulttype::RigidDeriv< 3, real >::operator[] ( int  i  )  [inline]

Access to i-th element.

Definition at line 191 of file RigidTypes.h.

template<typename real >
const real* sofa::defaulttype::RigidDeriv< 3, real >::ptr (  )  const [inline]

Definition at line 186 of file RigidTypes.h.

template<typename real >
real* sofa::defaulttype::RigidDeriv< 3, real >::ptr (  )  [inline]

Definition at line 185 of file RigidTypes.h.

template<typename real >
static unsigned int sofa::defaulttype::RigidDeriv< 3, real >::size ( void   )  [inline, static]

Definition at line 188 of file RigidTypes.h.


Friends And Related Function Documentation

template<typename real >
std::ostream& operator<< ( std::ostream &  out,
const RigidDeriv< 3, real > &  v 
) [friend]

write to an output stream

Definition at line 173 of file RigidTypes.h.

template<typename real >
std::istream& operator>> ( std::istream &  in,
RigidDeriv< 3, real > &  v 
) [friend]

read from an input stream

Definition at line 178 of file RigidTypes.h.

template<typename real >
friend class RigidCoord< 3, real > [friend]

Definition at line 79 of file RigidTypes.h.


Field Documentation

template<typename real >
Vec3 sofa::defaulttype::RigidDeriv< 3, real >::vCenter [protected]

Definition at line 76 of file RigidTypes.h.

Referenced by operator*(), operator+(), and operator-().

template<typename real >
Vec3 sofa::defaulttype::RigidDeriv< 3, real >::vOrientation [protected]

Definition at line 77 of file RigidTypes.h.

Referenced by operator*(), operator+(), and operator-().


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

Generated on Sun Nov 23 04:23:53 2008 for Sofa by  doxygen 1.5.7.1