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.177 2011/05/19 22:39:15 john 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.177 2011/05/19 22:39:15 john 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 523 of file transform.h.

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

00524         {
00525                 float x = v[0] * M[0][0] + v[1] * M[1][0] + v[2] * M[2][0] ;
00526                 float y = v[0] * M[0][1] + v[1] * M[1][1] + v[2] * M[2][1];
00527                 float z = v[0] * M[0][2] + v[1] * M[1][2] + v[2] * M[2][2];
00528                 return Vec3f(x, y, z);
00529         }

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

Matrix times Vector, a pure mathematical operation.

Definition at line 514 of file transform.h.

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

00515         {
00516                 return M.transform(v);
00517         }

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

Matrix times Vector, a pure mathematical operation.

Definition at line 507 of file transform.h.

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

00508         {
00509                 return M.transform(v);
00510         }

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

Matrix times Matrix, a pure mathematical operation.

Definition at line 1227 of file transform.cpp.

01228 {
01229         Transform result;
01230         for (int i=0; i<3; i++) {
01231                 for (int j=0; j<4; j++) {
01232                         result[i][j] = M2[i][0] * M1[0][j] +  M2[i][1] * M1[1][j] + M2[i][2] * M1[2][j];
01233                 }
01234                 result[i][3] += M2[i][3];
01235         }
01236 
01237         return result;
01238 }


Generated on Tue Jul 12 13:50:08 2011 for EMAN2 by  doxygen 1.3.9.1