Hugintrunk
0.1
|
general : Vector3 is a class for handling 3D Vectors manipulation. More...
#include <Vector3.h>
Public Member Functions | |
Vector3 () | |
default constructor More... | |
Vector3 (double a, double b, double c) | |
constructor with initialisation More... | |
Vector3 (const Vector3 &v) | |
copy contructor More... | |
Vector3 & | operator= (const Vector3 &v) |
copy operator More... | |
void | Set (double a, double b, double c) |
set More... | |
bool | operator== (const Vector3 &v) const |
comparison : equality More... | |
bool | operator!= (const Vector3 &v) const |
comparison : not equal More... | |
bool | IsZero () const |
comparison : zero More... | |
bool | IsNearlyZero () const |
comparison : nearly zero More... | |
bool | IsNearlyEqual (const Vector3 &v) const |
comparison : nearly equal More... | |
Vector3 | operator+ (const Vector3 &v) const |
operator + More... | |
Vector3 | operator- (const Vector3 &v) const |
operator - More... | |
Vector3 | operator* (double Scale) const |
operator *(double) More... | |
Vector3 | operator/ (double Scale) const |
operator /(double) More... | |
Vector3 | operator- () const |
Unary minus. More... | |
Vector3 | operator+= (const Vector3 &v) |
operator += More... | |
Vector3 | operator-= (const Vector3 &v) |
operator -= More... | |
Vector3 | operator*= (double Scale) |
double multiply More... | |
Vector3 | operator/= (double Scale) |
double divide More... | |
double | Norm () const |
euclidien norm More... | |
double | NormSquared () const |
squared norm More... | |
Vector3 | Cross (const Vector3 &v) const |
cross product More... | |
double | Dot (const Vector3 &v) const |
dot product More... | |
bool | Normalize () |
Normalize. More... | |
Vector3 | GetNormalized () const |
return a normalized vector More... | |
Public Attributes | |
double | x |
x,y,z coordinates, 0 at the initialisation More... | |
double | y |
double | z |
Friends | |
Vector3 | operator* (double Scale, const Vector3 &v) |
operator * More... | |
general : Vector3 is a class for handling 3D Vectors manipulation.
We made a choose to store only a 3 dimensions vectors to speed up system when we change of view point. A general 3D transformation could be placed in a 4x4 matrix, but some of the coefficients are always null. So that's waste of time.
|
inline |
|
inline |
|
inline |
cross product
Definition at line 163 of file Vector3.h.
Referenced by HuginBase::StraightenPanorama::calcStraighteningRotation(), and PanosphereOverviewToolHelper::MouseMoved().
|
inline |
Vector3 Vector3::GetNormalized | ( | ) | const |
return a normalized vector
Definition at line 95 of file Vector3.cpp.
References EPSILON, x, y, and z.
Referenced by GetRotationAroundU(), and PanosphereOverviewToolHelper::MouseMoved().
bool Vector3::IsNearlyEqual | ( | const Vector3 & | v | ) | const |
bool Vector3::IsNearlyZero | ( | ) | const |
bool Vector3::IsZero | ( | ) | const |
double Vector3::Norm | ( | ) | const |
bool Vector3::Normalize | ( | ) |
Normalize.
Definition at line 80 of file Vector3.cpp.
References EPSILON, x, y, and z.
Referenced by HuginBase::StraightenPanorama::calcStraighteningRotation().
double Vector3::NormSquared | ( | ) | const |
|
inline |
|
inline |
|
inline |
Vector3 Vector3::operator/ | ( | double | Scale | ) | const |
Vector3 Vector3::operator/= | ( | double | Scale | ) |
|
inline |
void Vector3::Set | ( | double | a, |
double | b, | ||
double | c | ||
) |
double Vector3::x |
x,y,z coordinates, 0 at the initialisation
Definition at line 47 of file Vector3.h.
Referenced by HuginBase::StraightenPanorama::calcStraighteningRotation(), Cross(), Dot(), GetNormalized(), GetRotationAroundU(), IsNearlyEqual(), IsNearlyZero(), IsZero(), PanosphereOverviewToolHelper::MouseMoved(), DragTool::ParamStore::Move(), Norm(), Normalize(), NormSquared(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), HuginBase::Nona::persp_rect(), HuginBase::Nona::persp_sphere(), HuginBase::RotatePanorama::rotatePano(), Set(), Matrix3::TransformVector(), and Vector3().
double Vector3::y |
Definition at line 47 of file Vector3.h.
Referenced by HuginBase::StraightenPanorama::calcStraighteningRotation(), Cross(), Dot(), GetNormalized(), GetRotationAroundU(), IsNearlyEqual(), IsNearlyZero(), IsZero(), PanosphereOverviewToolHelper::MouseMoved(), DragTool::ParamStore::Move(), Norm(), Normalize(), NormSquared(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), HuginBase::Nona::persp_rect(), HuginBase::Nona::persp_sphere(), HuginBase::RotatePanorama::rotatePano(), Set(), Matrix3::TransformVector(), and Vector3().
double Vector3::z |
Definition at line 47 of file Vector3.h.
Referenced by HuginBase::StraightenPanorama::calcStraighteningRotation(), Cross(), Dot(), GetNormalized(), GetRotationAroundU(), IsNearlyEqual(), IsNearlyZero(), IsZero(), PanosphereOverviewToolHelper::MouseMoved(), DragTool::ParamStore::Move(), Norm(), Normalize(), NormSquared(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator==(), HuginBase::Nona::persp_rect(), HuginBase::Nona::persp_sphere(), HuginBase::RotatePanorama::rotatePano(), Set(), Matrix3::TransformVector(), and Vector3().