#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::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 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 490 of file vec3.h. Referenced by EMAN::EMUtil::process_region_io(). |
|
|
|
Definition at line 826 of file vec3.h. References v. 00826 { 00827 // Preserve the vector type 00828 Vec2<Type> v1(v); 00829 v1 *= d; 00830 return v1; 00831 }
|
|
Definition at line 817 of file vec3.h. References v. 00818 { 00819 // Preserve the vector type 00820 Vec2<Type2> v1(v); 00821 v1 *= d; 00822 return v1; 00823 }
|
|
Definition at line 811 of file vec3.h. References EMAN::Vec2< Type >::dot(). 00812 {
00813 return v1.dot(v2);
00814 }
|
|
Definition at line 448 of file vec3.h. References v. 00448 { 00449 // Preserve the vector type 00450 Vec3<Type> v1(v); 00451 v1 *= d; 00452 return v1; 00453 }
|
|
Definition at line 439 of file vec3.h. References v. 00440 { 00441 // Preserve the vector type 00442 Vec3<Type2> v1(v); 00443 v1 *= d; 00444 return v1; 00445 }
|
|
Definition at line 433 of file vec3.h. References EMAN::Vec3< Type >::dot(). 00434 {
00435 return v1.dot(v2);
00436 }
|
|
Definition at line 859 of file vec3.h. 00859 { 00860 if (v1[0] != v2[0] || v1[1] != v2[1] ) { 00861 return true; 00862 } 00863 return false; 00864 }
|
|
Definition at line 481 of file vec3.h. 00481 { 00482 if (v1[0] != v2[0] || v1[1] != v2[1] || v1[2] != v2[2]) { 00483 return true; 00484 } 00485 return false; 00486 }
|
|
Definition at line 782 of file vec3.h. References v. 00783 {
00784 Vec2<Type> v1(v);
00785 v1 += n;
00786 return v1;
00787 }
|
|
Definition at line 776 of file vec3.h. 00777 {
00778 return Vec2<Type>(static_cast<Type>(v1[0] + v2[0]), static_cast<Type>(v1[1] + v2[1]));;
00779 }
|
|
Definition at line 388 of file vec3.h. References v. 00389 {
00390 Vec3<Type> v1(v);
00391 v1 += n;
00392 return v1;
00393 }
|
|
Definition at line 381 of file vec3.h. 00382 {
00383
00384 return Vec3<Type>(static_cast<Type>(v1[0] + v2[0]), static_cast<Type>(v1[1] + v2[1]),static_cast<Type>(v1[2] + v2[2]));;
00385 }
|
|
Definition at line 804 of file vec3.h. References v.
|
|
Definition at line 796 of file vec3.h. References v. 00797 {
00798 Vec2<Type> v1(v);
00799 v1 -= n;
00800 return v1;
00801 }
|
|
Definition at line 790 of file vec3.h. 00791 {
00792 return Vec2<Type>(static_cast<Type>(v1[0] - v2[0]), static_cast<Type>(v1[1] - v2[1]));
00793 }
|
|
Definition at line 419 of file vec3.h. References v.
|
|
Definition at line 412 of file vec3.h. References v. 00413 {
00414 Vec3<Type> v1(v);
00415 v1 -= n;
00416 return v1;
00417 }
|
|
Definition at line 404 of file vec3.h. 00405 {
00406 return Vec3<Type>(static_cast<Type>(v1[0] - v2[0]),
00407 static_cast<Type>(v1[1] - v2[1]),
00408 static_cast<Type>(v1[2] - v2[2]));
00409 }
|
|
Definition at line 843 of file vec3.h. References v. 00843 { 00844 // Preserve the vector type 00845 Vec2<Type> v1(v); 00846 v1 /= d; 00847 return v1; 00848 }
|
|
Definition at line 834 of file vec3.h. References v. 00835 { 00836 // Preserve the vector type 00837 Vec2<Type2> v1(v); 00838 v1 /= d; 00839 return v1; 00840 }
|
|
Definition at line 465 of file vec3.h. References v. 00465 { 00466 // Preserve the vector type 00467 Vec3<Type> v1(v); 00468 v1 /= d; 00469 return v1; 00470 }
|
|
Definition at line 456 of file vec3.h. References v. 00457 { 00458 // Preserve the vector type 00459 Vec3<Type2> v1(v); 00460 v1 /= d; 00461 return v1; 00462 }
|
|
Definition at line 851 of file vec3.h. 00851 { 00852 if (v1[0] == v2[0] && v1[1] == v2[1] ) { 00853 return true; 00854 } 00855 return false; 00856 }
|
|
Definition at line 473 of file vec3.h. 00473 { 00474 if (v1[0] == v2[0] && v1[1] == v2[1] && v1[2] == v2[2]) { 00475 return true; 00476 } 00477 return false; 00478 }
|