Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

transform.h File Reference

#include "vec3.h"
#include "emobject.h"
#include <cstdio>

Include dependency graph for transform.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  EMAN

Classes

class  EMAN::Transform
 A Transform object is a somewhat specialized object designed specifically for EMAN2/Sparx storage of alignment parameters and euler orientations. More...

Defines

#define eman__transform_h__   1
 
Id
transform.h,v 1.180 2012/12/12 21:33:32 cailin Exp


Functions

Transform operator * (const Transform &M2, const Transform &M1)
 Matrix times Matrix, a pure mathematical operation.
template<typename Type>
Vec3f operator * (const Transform &M, const Vec3< Type > &v)
 Matrix times Vector, a pure mathematical operation.
template<typename Type>
Vec2f operator * (const Transform &M, const Vec2< Type > &v)
 Matrix times Vector, a pure mathematical operation.
template<typename Type>
Vec3f operator * (const Vec3< Type > &v, const Transform &M)
 Vector times a matrix.


Define Documentation

#define eman__transform_h__   1
 

Id
transform.h,v 1.180 2012/12/12 21:33:32 cailin Exp

Definition at line 38 of file transform.h.


Function Documentation

template<typename Type>
Vec3f operator * const Vec3< Type > &  v,
const Transform &  M
 

Vector times a matrix.

Highly specialized. Useful when the upper 3x3 only contains rotations and you want to quickly multiply by the rotation matrix inverse (transpose)

Definition at line 550 of file transform.h.

References v, EMAN::Vec3f, x, and y.

00551         {
00552                 float x = v[0] * M[0][0] + v[1] * M[1][0] + v[2] * M[2][0] ;
00553                 float y = v[0] * M[0][1] + v[1] * M[1][1] + v[2] * M[2][1];
00554                 float z = v[0] * M[0][2] + v[1] * M[1][2] + v[2] * M[2][2];
00555                 return Vec3f(x, y, z);
00556         }

template<typename Type>
Vec2f operator * const Transform &  M,
const Vec2< Type > &  v
 

Matrix times Vector, a pure mathematical operation.

Definition at line 541 of file transform.h.

References EMAN::Transform::transform(), v, and EMAN::Vec2f.

00542         {
00543                 return M.transform(v);
00544         }

template<typename Type>
Vec3f operator * const Transform &  M,
const Vec3< Type > &  v
 

Matrix times Vector, a pure mathematical operation.

Definition at line 534 of file transform.h.

References EMAN::Transform::transform(), v, and EMAN::Vec3f.

00535         {
00536                 return M.transform(v);
00537         }

Transform EMAN::operator * const Transform M2,
const Transform M1
 

Matrix times Matrix, a pure mathematical operation.

Definition at line 1306 of file transform.cpp.

01307 {
01308         Transform result;
01309         for (int i=0; i<3; i++) {
01310                 for (int j=0; j<4; j++) {
01311                         result[i][j] = M2[i][0] * M1[0][j] +  M2[i][1] * M1[1][j] + M2[i][2] * M1[2][j];
01312                 }
01313                 result[i][3] += M2[i][3];
01314         }
01315 
01316         return result;
01317 }


Generated on Tue Jun 11 13:41:37 2013 for EMAN2 by  doxygen 1.3.9.1