#include "vec3.h"
#include "emobject.h"
#include <cstdio>
Include dependency graph for transform.h:
This graph shows which files directly or indirectly include this file:
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 |
| |
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. |
|
Definition at line 38 of file transform.h. |
|
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 486 of file transform.h. References v, EMAN::Vec3f, x, and y. 00487 { 00488 float x = v[0] * M[0][0] + v[1] * M[1][0] + v[2] * M[2][0] ; 00489 float y = v[0] * M[0][1] + v[1] * M[1][1] + v[2] * M[2][1]; 00490 float z = v[0] * M[0][2] + v[1] * M[1][2] + v[2] * M[2][2]; 00491 return Vec3f(x, y, z); 00492 }
|
|
Matrix times Vector, a pure mathematical operation.
Definition at line 477 of file transform.h. References EMAN::Transform::transform(), v, and EMAN::Vec2f. 00478 {
00479 return M.transform(v);
00480 }
|
|
Matrix times Vector, a pure mathematical operation.
Definition at line 470 of file transform.h. References EMAN::Transform::transform(), v, and EMAN::Vec3f. 00471 {
00472 return M.transform(v);
00473 }
|
|
Matrix times Matrix, a pure mathematical operation.
Definition at line 1159 of file transform.cpp. 01160 { 01161 Transform result; 01162 for (int i=0; i<3; i++) { 01163 for (int j=0; j<4; j++) { 01164 result[i][j] = M2[i][0] * M1[0][j] + M2[i][1] * M1[1][j] + M2[i][2] * M1[2][j]; 01165 } 01166 result[i][3] += M2[i][3]; 01167 } 01168 01169 return result; 01170 }
|