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

#include <RigidTypes.h>

Collaboration diagram for sofa::defaulttype::RigidCoord< 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

 RigidCoord (const Vec3 &posCenter, const Quat &orient)
 RigidCoord ()
template<typename real2 >
 RigidCoord (const RigidCoord< 3, real2 > &c)
void clear ()
template<typename real2 >
void operator= (const RigidCoord< 3, real2 > &c)
void operator+= (const RigidDeriv< 3, real > &a)
RigidCoord< 3, real > operator+ (const RigidDeriv< 3, real > &a) const
RigidCoord< 3, real > operator- (const RigidCoord< 3, real > &a) const
void operator+= (const RigidCoord< 3, real > &a)
template<typename real2 >
void operator*= (real2 a)
template<typename real2 >
RigidCoord< 3, real > operator* (real2 a) const
Real operator* (const RigidCoord< 3, real > &a) const
 dot product, mostly used to compute residuals as sqrt(x*x)
real norm2 () const
 Squared norm.
real norm () const
 Euclidean norm.
Vec3 & getCenter ()
Quat & getOrientation ()
const Vec3 & getCenter () const
const Quat & getOrientation () const
void multRight (const RigidCoord< 3, real > &c)
 Apply a transformation with respect to itself.
RigidCoord< 3, real > mult (const RigidCoord< 3, real > &c) const
 compute the product with another frame on the right
template<class Mat >
void fromMatrix (const Mat &m) const
 Set from the given matrix.
template<class Mat >
void toMatrix (Mat &m) const
 Write to the given matrix.
template<class Mat >
void writeRotationMatrix (Mat &m) const
void writeOpenGlMatrix (float m[16]) const
 Write the OpenGL transformation matrix.
Vec3 vectorToChild (const Vec3 &v) const
 compute the projection of a vector from the parent frame to the child
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 RigidCoord< 3, real > identity ()
static int max_size ()
static unsigned int size ()

Protected Attributes

Vec3 center
Quat orientation

Friends

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

Detailed Description

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

Definition at line 210 of file RigidTypes.h.


Member Typedef Documentation

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

Definition at line 216 of file RigidTypes.h.

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

Definition at line 214 of file RigidTypes.h.

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

Definition at line 213 of file RigidTypes.h.

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

Definition at line 215 of file RigidTypes.h.


Member Enumeration Documentation

template<typename real >
anonymous enum

Enumerator:
static_size 

Definition at line 407 of file RigidTypes.h.


Constructor & Destructor Documentation

template<typename real >
sofa::defaulttype::RigidCoord< 3, real >::RigidCoord ( const Vec3 &  posCenter,
const Quat &  orient 
) [inline]

Definition at line 222 of file RigidTypes.h.

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

Definition at line 224 of file RigidTypes.h.

References sofa::component::clear().

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

Definition at line 227 of file RigidTypes.h.


Member Function Documentation

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

Definition at line 233 of file RigidTypes.h.

template<typename real >
template<class Mat >
void sofa::defaulttype::RigidCoord< 3, real >::fromMatrix ( const Mat &  m  )  const [inline]

Set from the given matrix.

Definition at line 354 of file RigidTypes.h.

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

Definition at line 329 of file RigidTypes.h.

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

Definition at line 327 of file RigidTypes.h.

Referenced by multRight(), operator+=(), and operator-().

template<typename real >
const Quat& sofa::defaulttype::RigidCoord< 3, real >::getOrientation ( void   )  const [inline]

Definition at line 330 of file RigidTypes.h.

template<typename real >
Quat& sofa::defaulttype::RigidCoord< 3, real >::getOrientation ( void   )  [inline]

Definition at line 328 of file RigidTypes.h.

Referenced by mult(), and multRight().

template<typename real >
static RigidCoord<3,real> sofa::defaulttype::RigidCoord< 3, real >::identity (  )  [inline, static]

Definition at line 332 of file RigidTypes.h.

template<typename real >
static int sofa::defaulttype::RigidCoord< 3, real >::max_size (  )  [inline, static]

Definition at line 403 of file RigidTypes.h.

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

compute the product with another frame on the right

Definition at line 345 of file RigidTypes.h.

References center, and getOrientation().

template<typename real >
void sofa::defaulttype::RigidCoord< 3, real >::multRight ( const RigidCoord< 3, real > &  c  )  [inline]

Apply a transformation with respect to itself.

Definition at line 338 of file RigidTypes.h.

References getCenter(), and getOrientation().

template<typename real >
real sofa::defaulttype::RigidCoord< 3, real >::norm (  )  const [inline]

Euclidean norm.

Definition at line 321 of file RigidTypes.h.

References norm2(), and sofa::helper::rsqrt().

template<typename real >
real sofa::defaulttype::RigidCoord< 3, real >::norm2 (  )  const [inline]

Squared norm.

Definition at line 312 of file RigidTypes.h.

References real.

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

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

Definition at line 304 of file RigidTypes.h.

References center, and orientation.

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

Definition at line 292 of file RigidTypes.h.

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

Definition at line 284 of file RigidTypes.h.

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

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

Definition at line 276 of file RigidTypes.h.

References getCenter().

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

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

Definition at line 271 of file RigidTypes.h.

References getCenter(), sofa::helper::Quater< Real >::inverse(), and orientation.

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

Definition at line 236 of file RigidTypes.h.

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

Const access to i-th element.

Definition at line 424 of file RigidTypes.h.

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

Access to i-th element.

Definition at line 415 of file RigidTypes.h.

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

Definition at line 410 of file RigidTypes.h.

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

Definition at line 409 of file RigidTypes.h.

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

Definition at line 412 of file RigidTypes.h.

template<typename real >
template<class Mat >
void sofa::defaulttype::RigidCoord< 3, real >::toMatrix ( Mat &  m  )  const [inline]

Write to the given matrix.

Definition at line 365 of file RigidTypes.h.

References sofa::defaulttype::Mat< L, C, real >::identity().

template<typename real >
Vec3 sofa::defaulttype::RigidCoord< 3, real >::vectorToChild ( const Vec3 &  v  )  const [inline]

compute the projection of a vector from the parent frame to the child

Definition at line 389 of file RigidTypes.h.

template<typename real >
void sofa::defaulttype::RigidCoord< 3, real >::writeOpenGlMatrix ( float  m[16]  )  const [inline]

Write the OpenGL transformation matrix.

Definition at line 381 of file RigidTypes.h.

template<typename real >
template<class Mat >
void sofa::defaulttype::RigidCoord< 3, real >::writeRotationMatrix ( Mat &  m  )  const [inline]

Definition at line 375 of file RigidTypes.h.


Friends And Related Function Documentation

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

write to an output stream

Definition at line 394 of file RigidTypes.h.

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

read from an input stream

Definition at line 399 of file RigidTypes.h.


Field Documentation

template<typename real >
Vec3 sofa::defaulttype::RigidCoord< 3, real >::center [protected]

Definition at line 219 of file RigidTypes.h.

Referenced by mult(), and operator*().

template<typename real >
Quat sofa::defaulttype::RigidCoord< 3, real >::orientation [protected]

Definition at line 220 of file RigidTypes.h.

Referenced by 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