#include <vector>
#include <cmath>
#include <iostream>
Include dependency graph for vec3.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::Vec4< Type > |
The Vec4 object is a templated object, intended to instantiated with basic types such as int, float, double etc. More... | |
class | EMAN::Vec3< Type > |
The Vec3 object is a templated object, intended to instantiated with basic types such as int, float, double etc. More... | |
class | EMAN::Vec2< Type > |
The Vec2 is precisely the same as Vec3 except it works exclusively in 2D Note there are convenient typedef so one needn't bother about using template terminology typedef Vec2<float> Vec2f; typedef Vec2<int> Vec2i; typedef Vec2double> Vec2d; // Not recommended for use unless precision is addressed in this class. More... | |
Defines | |
#define | eman__vec3_h__ 1 |
| |
Typedefs | |
typedef Vec4< float > | Vec4f |
typedef Vec4< int > | Vec4i |
typedef Vec4< double > | Vec4d |
typedef Vec3< float > | Vec3f |
typedef Vec3< int > | Vec3i |
typedef Vec3< double > | Vec3d |
typedef Vec2< float > | Vec2f |
typedef Vec2< int > | Vec2i |
typedef Vec2< double > | Vec2d |
Functions | |
template<typename Type, typename Type2> | |
Vec3< Type > | operator+ (const Vec3< Type > &v1, const Vec3< Type2 > &v2) |
template<typename Type, typename Type2> | |
Vec3< Type > | operator+ (const Vec3< Type > &v, const Type2 &n) |
template<typename Type, typename Type2> | |
Vec3< Type > | operator- (const Vec3< Type > &v1, const Vec3< Type2 > &v2) |
template<typename Type, typename Type2> | |
Vec3< Type > | operator- (const Vec3< Type > &v, const Type2 &n) |
template<typename Type> | |
Vec3< Type > | operator- (const Vec3< Type > &v) |
template<typename Type, typename Type2> | |
Type | operator * (const Vec3< Type > &v1, const Vec3< Type2 > &v2) |
template<typename Type, typename Type2> | |
Vec3< Type2 > | operator * (const Type &d, const Vec3< Type2 > &v) |
template<typename Type, typename Type2> | |
Vec3< Type > | operator * (const Vec3< Type > &v, const Type2 &d) |
template<typename Type, typename Type2> | |
Vec3< Type2 > | operator/ (const Type &d, const Vec3< Type2 > &v) |
template<typename Type, typename Type2> | |
Vec3< Type > | operator/ (const Vec3< Type > &v, const Type2 &d) |
template<typename Type, typename Type2> | |
bool | operator== (const Vec3< Type > &v1, const Vec3< Type2 > &v2) |
template<typename Type, typename Type2> | |
bool | operator!= (const Vec3< Type > &v1, const Vec3< Type2 > &v2) |
template<typename Type, typename Type2> | |
Vec2< Type > | operator+ (const Vec2< Type > &v1, const Vec2< Type2 > &v2) |
template<typename Type, typename Type2> | |
Vec2< Type > | operator+ (const Vec2< Type > &v, const Type2 &n) |
template<typename Type, typename Type2> | |
Vec2< Type > | operator- (const Vec2< Type > &v1, const Vec2< Type2 > &v2) |
template<typename Type, typename Type2> | |
Vec2< Type > | operator- (const Vec2< Type > &v, const Type2 &n) |
template<typename Type> | |
Vec2< Type > | operator- (const Vec2< Type > &v) |
template<typename Type, typename Type2> | |
Type | operator * (const Vec2< Type > &v1, const Vec2< Type2 > &v2) |
template<typename Type, typename Type2> | |
Vec2< Type2 > | operator * (const Type &d, const Vec2< Type2 > &v) |
template<typename Type, typename Type2> | |
Vec2< Type > | operator * (const Vec2< Type > &v, const Type2 &d) |
template<typename Type, typename Type2> | |
Vec2< Type2 > | operator/ (const Type &d, const Vec2< Type2 > &v) |
template<typename Type, typename Type2> | |
Vec2< Type > | operator/ (const Vec2< Type > &v, const Type2 &d) |
template<typename Type, typename Type2> | |
bool | operator== (const Vec2< Type > &v1, const Vec2< Type2 > &v2) |
template<typename Type, typename Type2> | |
bool | operator!= (const Vec2< Type > &v1, const Vec2< Type2 > &v2) |
|
|
|
|
|
|
|
|
Definition at line 699 of file vec3.h. Referenced by EMAN::EMUtil::process_region_io(). |
|
|
|
|
|
|
|
|
|
Definition at line 1035 of file vec3.h. References v. 01035 { 01036 // Preserve the vector type 01037 Vec2<Type> v1(v); 01038 v1 *= d; 01039 return v1; 01040 }
|
|
Definition at line 1026 of file vec3.h. References v. 01027 { 01028 // Preserve the vector type 01029 Vec2<Type2> v1(v); 01030 v1 *= d; 01031 return v1; 01032 }
|
|
Definition at line 1020 of file vec3.h. References EMAN::Vec2< Type >::dot(). 01021 {
01022 return v1.dot(v2);
01023 }
|
|
Definition at line 657 of file vec3.h. References v. 00657 { 00658 // Preserve the vector type 00659 Vec3<Type> v1(v); 00660 v1 *= d; 00661 return v1; 00662 }
|
|
Definition at line 648 of file vec3.h. References v. 00649 { 00650 // Preserve the vector type 00651 Vec3<Type2> v1(v); 00652 v1 *= d; 00653 return v1; 00654 }
|
|
Definition at line 642 of file vec3.h. References EMAN::Vec3< Type >::dot(). 00643 {
00644 return v1.dot(v2);
00645 }
|
|
Definition at line 1068 of file vec3.h. 01068 { 01069 if (v1[0] != v2[0] || v1[1] != v2[1] ) { 01070 return true; 01071 } 01072 return false; 01073 }
|
|
Definition at line 690 of file vec3.h. 00690 { 00691 if (v1[0] != v2[0] || v1[1] != v2[1] || v1[2] != v2[2]) { 00692 return true; 00693 } 00694 return false; 00695 }
|
|
Definition at line 991 of file vec3.h. References v. 00992 {
00993 Vec2<Type> v1(v);
00994 v1 += n;
00995 return v1;
00996 }
|
|
Definition at line 985 of file vec3.h. 00986 {
00987 return Vec2<Type>(static_cast<Type>(v1[0] + v2[0]), static_cast<Type>(v1[1] + v2[1]));;
00988 }
|
|
Definition at line 597 of file vec3.h. References v. 00598 {
00599 Vec3<Type> v1(v);
00600 v1 += n;
00601 return v1;
00602 }
|
|
Definition at line 590 of file vec3.h. 00591 {
00592
00593 return Vec3<Type>(static_cast<Type>(v1[0] + v2[0]), static_cast<Type>(v1[1] + v2[1]),static_cast<Type>(v1[2] + v2[2]));;
00594 }
|
|
Definition at line 1013 of file vec3.h. References v.
|
|
Definition at line 1005 of file vec3.h. References v. 01006 {
01007 Vec2<Type> v1(v);
01008 v1 -= n;
01009 return v1;
01010 }
|
|
Definition at line 999 of file vec3.h. 01000 {
01001 return Vec2<Type>(static_cast<Type>(v1[0] - v2[0]), static_cast<Type>(v1[1] - v2[1]));
01002 }
|
|
Definition at line 628 of file vec3.h. References v.
|
|
Definition at line 621 of file vec3.h. References v. 00622 {
00623 Vec3<Type> v1(v);
00624 v1 -= n;
00625 return v1;
00626 }
|
|
Definition at line 613 of file vec3.h. 00614 {
00615 return Vec3<Type>(static_cast<Type>(v1[0] - v2[0]),
00616 static_cast<Type>(v1[1] - v2[1]),
00617 static_cast<Type>(v1[2] - v2[2]));
00618 }
|
|
Definition at line 1052 of file vec3.h. References v. 01052 { 01053 // Preserve the vector type 01054 Vec2<Type> v1(v); 01055 v1 /= d; 01056 return v1; 01057 }
|
|
Definition at line 1043 of file vec3.h. References v. 01044 { 01045 // Preserve the vector type 01046 Vec2<Type2> v1(v); 01047 v1 /= d; 01048 return v1; 01049 }
|
|
Definition at line 674 of file vec3.h. References v. 00674 { 00675 // Preserve the vector type 00676 Vec3<Type> v1(v); 00677 v1 /= d; 00678 return v1; 00679 }
|
|
Definition at line 665 of file vec3.h. References v. 00666 { 00667 // Preserve the vector type 00668 Vec3<Type2> v1(v); 00669 v1 /= d; 00670 return v1; 00671 }
|
|
Definition at line 1060 of file vec3.h. 01060 { 01061 if (v1[0] == v2[0] && v1[1] == v2[1] ) { 01062 return true; 01063 } 01064 return false; 01065 }
|
|
Definition at line 682 of file vec3.h. 00682 { 00683 if (v1[0] == v2[0] && v1[1] == v2[1] && v1[2] == v2[2]) { 00684 return true; 00685 } 00686 return false; 00687 }
|