[ GAMB | Source | Keywords | Summary | Ancestors | All Members | Descendants ]
public: | |
// real definition. | |
typedef | Vector3::real real; |
// Contructors. | |
RigidTrans3() ; | |
RigidTrans3(const Matrix3& r, const Vector3& t, int) ; | |
RigidTrans3(const Matrix3& r, const Vector3& t) ; | |
RigidTrans3(const Rotation3& r, const Vector3& t) ; | |
RigidTrans3(const Vector3& r, const Vector3& t) ; | |
RigidTrans3(const Vector3& u, const Vector3& v, const Vector3& w); | |
RigidTrans3(const Vector3& u ,const Vector3& w ,const Vector3& base , int); | |
RigidTrans3(int , const Vector3& u ,const Vector3& w ,const Vector3& base); | |
// Inspection and propery methods | |
const Matrix3& | rotation() const ; |
Vector3 | rotationAngles() const ; |
const Vector3& | translation() const ; |
// Operators. | |
friend Vector3 | operator*(const RigidTrans3& rt, const Vector3& v) ; |
friend Vector3& | operator*=(Vector3& v,const RigidTrans3& rt) ; |
friend RigidTrans3 | operator*(const RigidTrans3& rt1, const RigidTrans3& rt2) ; |
friend RigidTrans3 | operator!(const RigidTrans3& rt) ; |
friend ostream& | operator<<(ostream& s, const RigidTrans3& rt) ; |
friend istream& | operator>>(istream& s, RigidTrans3& rt); |
void | output(FILE* outputFile) const ; |
protected: |
Back to the top of RigidTrans3
Copyright: SAMBA group, Tel-Aviv Univ. Israel, 1997.
Back to the top of RigidTrans3
Back to the top of RigidTrans3
Back to the top of RigidTrans3
RigidTrans3 T(Vector3(pi, pi, pi/2), // rotation Vector3(0, 0, 1)); // translationA second method of construction is used in reference of base construction. Given an ordered set of 3 points one can construct an axes-system based on these points. A constructor that recieves 3 points returns the RigidTrans3 that transforms the normal axes to the point-based axes system.
Rigid transformations form a group. We can talk of multiplying or applying one rigid transformation on top of the other and we can talk about the inverse of a rigid transformation. These operators are supplied.
RigidTrans3 T(Vector3(pi/2, 0, 0), Vector3(1, 0, 0)); RigidTrans3 S(Vector3(-pi/2, 0, 0), Vector3(-1, 0, 0)); RigidTrans3 I=T*S // This gives the identity rigid trans since T=!S RigidTrans3 J=!I // J should equal I (or be very close to it).
Back to the top of RigidTrans3
typedef Vector3::real real;
real is defined to be float by default. By changing real in Vector3 to
double one may change the whole library to work with double precision.
typedef Vector3::real real;
Back to the top of RigidTrans3
RigidTrans3() ;
Instantiates to a an identity rigid transformation. i.e. no rotation and
0 translation.
RigidTrans3() ;
Function is currently defined inline.
Back to the top of RigidTrans3
RigidTrans3(const Matrix3& r, const Vector3& t, int) ;
Instantiate a rigid transformation using a linear transformation as
rotation and a vector for translation. The int is a dummy int argument
used to set this constructor apart from the identically defined public
constructor. Note that the matrix itself is not used but rather
its rotational parameters, so if a non-rotational matrix is
given, a different, rotational Matrix3 will be used in the RigidTrans3 object.
Warning: This function is deprecated
RigidTrans3(const Matrix3& r, const Vector3& t, int) ;
Function is currently defined inline.
Back to the top of RigidTrans3
RigidTrans3(const Matrix3& r, const Vector3& t) ;
Instantiate a rigid transformation using a linear transformation as
rotation and a vector for translation. This constructor is used
to instantiate a RigidTrans3 with a given rotational matrix and
translational vector without verifying that the matrix is rotational.
RigidTrans3(const Matrix3& r, const Vector3& t) ;
Function is currently defined inline.
Back to the top of RigidTrans3
RigidTrans3(const Rotation3& r, const Vector3& t) ;
Instanitiates a rigid transformation using a Rotation3 object and a
translational vector.
RigidTrans3(const Rotation3& r, const Vector3& t) ;
Function is currently defined inline.
Back to the top of RigidTrans3
RigidTrans3(const Vector3& r, const Vector3& t) ;
Instanitiates a rigid transformation using the 3 angles given in the
rotational vector and the translational vector. The rotational vector is
assumes rotations are in the order: around X (Y,Z plane rotation) -
around Y (X,Z plane rotation) - around Z (X,Y plane roation).
RigidTrans3(const Vector3& r, const Vector3& t) ;
Function is currently defined inline.
Back to the top of RigidTrans3
RigidTrans3(const Vector3& u, const Vector3& v, const Vector3& w);
Returns the rigid transformations which transforms the natural axes to
the axis system created by u,v,w. The x-axis lies on c-u, (where c is the
mass center of u,v,w,). The z-axis is perpendicular to the u,v,w
plane and the y-axis is perpendicular to both x and z.
RigidTrans3(const Vector3& u, const Vector3& v, const Vector3& w);
Back to the top of RigidTrans3
RigidTrans3(const Vector3& u ,const Vector3& w ,const Vector3& base , int);
Returns the rigid transformations which transforms the natural axes to
the axis system created by u,w and base (where 'base' is the axis center).
The x-axis lies on u-base , the z-axis is
perpendicular to the u-base , w-base plane and the y-axis is perpendicular
to both x and z.(i.e the first variable is set by default as the local x-axis)
The int is a dummy int argument used to set this constructor apart from
the identically defined public constructor.
RigidTrans3(const Vector3& u ,const Vector3& w ,const Vector3& base , int);
Back to the top of RigidTrans3
RigidTrans3(int , const Vector3& u ,const Vector3& w ,const Vector3& base);
Returns the rigid transformations which transforms the new axis system
created by u,w and base (where 'base' is the axis center).
(this is just inverse of RigidTrans3(const Vector3&,const Vector3&,const Vector3&, int))
The x-axis lies on u-base , the z-axis is perpendicular to the u-trans ,
w-trans plane and the y-axis is perpendicular to both x and z
(i.e the first variable is set by default as the local x-axis)
The int is a dummy int argument used to set this constructor apart from
the identically defined public constructors.
RigidTrans3(int , const Vector3& u ,const Vector3& w ,const Vector3& base);
Back to the top of RigidTrans3
const Matrix3& rotation() const ;
Returns linear transformation representing rotation of rigid
tranformation.
const Matrix3& rotation() const ;
Function is currently defined inline.
Back to the top of RigidTrans3
Vector3 rotationAngles() const ;
Returns vector with axis rotational angles assuming the order of
rotation is x-y-z.
Vector3 rotationAngles() const ;
Function is currently defined inline.
Back to the top of RigidTrans3
const Vector3& translation() const ;
Returns translation vector of rigid transformation.
const Vector3& translation() const ;
Function is currently defined inline.
Back to the top of RigidTrans3
friend Vector3 operator*(const RigidTrans3& rt, const Vector3& v) ;
Apply the rigid transformation rn ob vector v. Apply a rotation followed
by a translation
friend Vector3 operator*(const RigidTrans3& rt, const Vector3& v) ;
Function is currently defined inline.
Back to the top of RigidTrans3
friend Vector3& operator*=(Vector3& v,const RigidTrans3& rt) ;
Apply the rigid transformation rn ob vector v. Apply a rotation followed
by a translation
friend Vector3& operator*=(Vector3& v,const RigidTrans3& rt) ;
Function is currently defined inline.
Back to the top of RigidTrans3
friend RigidTrans3 operator*(const RigidTrans3& rt1, const RigidTrans3& rt2) ;
multiply two rigid transformation such that for any vector v
(rt1*rt2)*v = rt1*(rt2*v)
friend RigidTrans3 operator*(const RigidTrans3& rt1, const RigidTrans3& rt2) ;
Function is currently defined inline.
Back to the top of RigidTrans3
friend RigidTrans3 operator!(const RigidTrans3& rt) ;
Gives the inverse of a rigid transformation such that for any vector v
(rt*!rt)*v = rt*(!rt*v) = v and rt*!rt = RigidTrans3().
friend RigidTrans3 operator!(const RigidTrans3& rt) ;
Function is currently defined inline.
Back to the top of RigidTrans3
friend ostream& operator<<(ostream& s, const RigidTrans3& rt) ;
prints 3 rotations in X-Y-Z order (see above) and translation vector.
friend ostream& operator<<(ostream& s, const RigidTrans3& rt) ;
Function is currently defined inline.
Back to the top of RigidTrans3
friend istream& operator>>(istream& s, RigidTrans3& rt);
reads 3 rotations in X-Y-Z order (see above) and translation vector.
friend istream& operator>>(istream& s, RigidTrans3& rt);
Back to the top of RigidTrans3
void output(FILE* outputFile) const ;
Prints the three rotation angles in X-Y-Z order and the translation vector
Author: Oranit Dror (oranit@tau.ac.il)
void output(FILE* outputFile) const ;
Function is currently defined inline.
Back to the top of RigidTrans3
public: | ||
---|---|---|
// real definition. | ||
typedef | Vector3::real real; | |
// Inspection and propery methods | ||
const Matrix3& | rotation() const ; | |
Vector3 | rotationAngles() const ; | |
const Vector3& | translation() const ; | |
// Operators. | ||
friend Vector3 | operator*(const RigidTrans3& rt, const Vector3& v) ; | |
friend Vector3& | operator*=(Vector3& v,const RigidTrans3& rt) ; | |
friend RigidTrans3 | operator*(const RigidTrans3& rt1, const RigidTrans3& rt2) ; | |
friend RigidTrans3 | operator!(const RigidTrans3& rt) ; | |
friend ostream& | operator<<(ostream& s, const RigidTrans3& rt) ; | |
friend istream& | operator>>(istream& s, RigidTrans3& rt); | |
void | output(FILE* outputFile) const ; | |
protected: |
Back to the top of RigidTrans3
Back to the top of RigidTrans3
Back to the top of RigidTrans3
Report problems to jkotula@unimax.com