Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Friends | List of all members
Vector3 Class Reference

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...
 
Vector3operator= (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...
 

Detailed Description

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.

Definition at line 43 of file Vector3.h.

Constructor & Destructor Documentation

Vector3::Vector3 ( )
inline

default constructor

Definition at line 52 of file Vector3.h.

Referenced by operator/().

Vector3::Vector3 ( double  a,
double  b,
double  c 
)
inline

constructor with initialisation

Definition at line 55 of file Vector3.h.

Vector3::Vector3 ( const Vector3 v)
inline

copy contructor

Definition at line 58 of file Vector3.h.

References x, y, and z.

Member Function Documentation

Vector3 Vector3::Cross ( const Vector3 v) const
inline

cross product

Definition at line 163 of file Vector3.h.

References x, y, and z.

Referenced by HuginBase::StraightenPanorama::calcStraighteningRotation(), and PanosphereOverviewToolHelper::MouseMoved().

double Vector3::Dot ( const Vector3 v) const
inline

dot product

Definition at line 169 of file Vector3.h.

References x, y, and z.

Referenced by HuginBase::StraightenPanorama::calcStraighteningRotation().

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

comparison : nearly equal

Definition at line 45 of file Vector3.cpp.

References EPSILON, x, y, and z.

bool Vector3::IsNearlyZero ( ) const

comparison : nearly zero

Definition at line 39 of file Vector3.cpp.

References EPSILON, x, y, and z.

bool Vector3::IsZero ( ) const

comparison : zero

Definition at line 33 of file Vector3.cpp.

References x, y, and z.

double Vector3::Norm ( ) const

euclidien norm

Definition at line 68 of file Vector3.cpp.

References x, y, and z.

Referenced by GetRotationAroundU().

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

squared norm

Definition at line 74 of file Vector3.cpp.

References x, y, and z.

bool Vector3::operator!= ( const Vector3 v) const
inline

comparison : not equal

Definition at line 79 of file Vector3.h.

Vector3 Vector3::operator* ( double  Scale) const
inline

operator *(double)

Definition at line 112 of file Vector3.h.

Vector3 Vector3::operator*= ( double  Scale)
inline

double multiply

Definition at line 145 of file Vector3.h.

Vector3 Vector3::operator+ ( const Vector3 v) const
inline

operator +

Definition at line 100 of file Vector3.h.

References x, y, and z.

Vector3 Vector3::operator+= ( const Vector3 v)
inline

operator +=

Definition at line 127 of file Vector3.h.

References x, y, and z.

Vector3 Vector3::operator- ( const Vector3 v) const
inline

operator -

Definition at line 106 of file Vector3.h.

References x, y, and z.

Vector3 Vector3::operator- ( ) const
inline

Unary minus.

Definition at line 121 of file Vector3.h.

Vector3 Vector3::operator-= ( const Vector3 v)
inline

operator -=

Definition at line 136 of file Vector3.h.

References x, y, and z.

Vector3 Vector3::operator/ ( double  Scale) const

operator /(double)

Definition at line 51 of file Vector3.cpp.

References Vector3(), x, y, and z.

Vector3 Vector3::operator/= ( double  Scale)

double divide

Definition at line 58 of file Vector3.cpp.

References x, y, and z.

Vector3& Vector3::operator= ( const Vector3 v)
inline

copy operator

Definition at line 61 of file Vector3.h.

References x, y, and z.

bool Vector3::operator== ( const Vector3 v) const
inline

comparison : equality

Definition at line 73 of file Vector3.h.

References x, y, and z.

void Vector3::Set ( double  a,
double  b,
double  c 
)

set

Definition at line 30 of file Vector3.cpp.

References x, y, and z.

Friends And Related Function Documentation

Vector3 operator* ( double  Scale,
const Vector3 v 
)
friend

operator *

Definition at line 94 of file Vector3.h.

Member Data Documentation

double Vector3::x
double Vector3::y
double Vector3::z

The documentation for this class was generated from the following files: