VirtualPhysics the realtime dynamics simulation library

Vec3 Class Reference

3 dimensional vector More...

#include <LieGroup.h>

List of all members.

Public Member Functions

 Vec3 (scalar c0, scalar c1, scalar c2)
 Vec3 (int c)
 Vec3 (scalar c)
 Vec3 (const scalar v[])
scalar Normalize (void)
Operators
const Vec3operator+ (void) const
Vec3 operator- (void) const
scalar & operator[] (int idx)
const scalar & operator[] (int) const
const Vec3operator= (const Vec3 &)
const Vec3operator= (scalar c)
const Vec3operator= (const SE3 &T)
const Vec3operator+= (const Vec3 &)
const Vec3operator-= (const Vec3 &)
const Vec3operator*= (scalar)
Vec3 operator* (scalar) const
Vec3 operator+ (const Vec3 &) const
Vec3 operator- (const Vec3 &) const

Friends

ostream & operator<< (ostream &, const Vec3 &)
Vec3 operator* (scalar c, const Vec3 &p)
scalar Norm (const Vec3 &p)
Vec3 Normalize (const Vec3 &p)
Vec3 Cross (const Vec3 &p, const Vec3 &a)
scalar Inner (const Vec3 &p, const Vec3 &a)
scalar SquareSum (const Vec3 &)
dse3 dAd (const SE3 &T, const Vec3 &F)
dse3 InvdAd (const Vec3 &p, const Vec3 &F)
Vec3 InvAd (const SE3 &T, const Vec3 &v)
SE3 EulerZYX (const Vec3 &)
SE3 EulerZYX (const Vec3 &angle, const Vec3 &position)
SE3 EulerZYZ (const Vec3 &)
SE3 EulerZYZ (const Vec3 &angle, const Vec3 &position)
Vec3 Rotate (const SE3 &T, const Vec3 &q)
Vec3 InvRotate (const SE3 &T, const Vec3 &q)
Vec3 ad (const Vec3 &v, const se3 &S)


Detailed Description

Vec3 is a class for representing 3 dimensional vector.
Examples:

pendulum.cpp.


Constructor & Destructor Documentation

Vec3::Vec3 ( scalar  c0,
scalar  c1,
scalar  c2 
) [explicit]

constructor : (c0, c1, c2)

Vec3::Vec3 ( int  c  )  [explicit]

constructor : (c, c, c)

Vec3::Vec3 ( scalar  c  )  [explicit]

constructor : (c, c, c)

Vec3::Vec3 ( const scalar  v[]  )  [explicit]

constructor : (v[0], v[1], v[2])


Member Function Documentation

const Vec3 & Vec3::operator+ ( void   )  const

unary plus operator

Vec3 Vec3::operator- ( void   )  const

unary minus operator

scalar & Vec3::operator[] ( int  idx  ) 

access to the idx th element.

const Vec3 & Vec3::operator= ( const Vec3 v  ) 

substitution operator

const Vec3 & Vec3::operator= ( scalar  c  ) 

substitute operator set all the elements to be c.

const Vec3 & Vec3::operator= ( const SE3 T  ) 

substitute operator set elements from the position part of T.

const Vec3 & Vec3::operator+= ( const Vec3 v  ) 

addition and substitution operator

const Vec3 & Vec3::operator-= ( const Vec3 v  ) 

-= operator

const Vec3 & Vec3::operator*= ( scalar  d  ) 

= operator

Vec3 Vec3::operator* ( scalar  d  )  const

multiplication operator

Vec3 Vec3::operator+ ( const Vec3 v  )  const

addition operator

Vec3 Vec3::operator- ( const Vec3 v  )  const

subtraction operator

scalar Vec3::Normalize ( void   ) 

normalize the vector.

Returns:
length of the vector.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  ,
const Vec3  
) [friend]

standard output operator

Vec3 operator* ( scalar  c,
const Vec3 p 
) [friend]

scalar multiplication

scalar Norm ( const Vec3 p  )  [friend]

get a magnitude of p.

Vec3 Normalize ( const Vec3 p  )  [friend]

get a normalized vector from p.

Vec3 Cross ( const Vec3 p,
const Vec3 a 
) [friend]

get a cross product of p and q.

scalar Inner ( const Vec3 p,
const Vec3 a 
) [friend]

get an inner product of p and q.

scalar SquareSum ( const Vec3 p  )  [friend]

get a squared sum of all the elements in p.

dse3 dAd ( const SE3 T,
const Vec3 F 
) [friend]

fast version of Ad(Inv(T), dse3(Vec3(0), F))

dse3 InvdAd ( const Vec3 p,
const Vec3 F 
) [friend]

fast version of dAd(Inv(SE3(p)), dse3(Vec3(0), F))

Vec3 InvAd ( const SE3 T,
const Vec3 v 
) [friend]

fast version of Ad(Inv(T), se3(Vec3(0), v))

SE3 EulerZYX ( const Vec3 angle  )  [friend]

get a transformation matrix given by the Euler ZYX angle, where the positional part is set to be zero.

See also:
SE3::iEulerZYX

SE3 EulerZYX ( const Vec3 angle,
const Vec3 position 
) [friend]

get a transformation matrix given by the Euler ZYX angle and position, where the positional part is set to be zero.

SE3 EulerZYZ ( const Vec3 angle  )  [friend]

get a transformation matrix given by the Euler ZYZ angle, where the positional part is set to be zero.

See also:
SE3::iEulerZYZ

SE3 EulerZYZ ( const Vec3 angle,
const Vec3 position 
) [friend]

get a transformation matrix given by the Euler ZYZ angle and position, where the positional part is set to be zero.

Vec3 Rotate ( const SE3 T,
const Vec3 q 
) [friend]

rotate q by T.

Returns:
$R q$, where $T=(R,p)$.

Vec3 InvRotate ( const SE3 T,
const Vec3 q 
) [friend]

rotate q by Inv(T).

Vec3 ad ( const Vec3 v,
const se3 S 
) [friend]

fast version of ad(se3(Vec3(0), v), S)


Generated on Wed Jun 11 23:11:49 2008 for VirtualPhysics by  doxygen 1.5.5