Vector3 Class Reference

general : Vector3 is a class for handling 3D Vectors manipulation. More...

#include <Vector3.h>

List of all members.

Public Member Functions

 Vector3 ()
 default constructor
 Vector3 (double a, double b, double c)
 constructor with initialisation
 Vector3 (const Vector3 &v)
 copy contructor
Vector3operator= (const Vector3 &v)
 copy operator
void Set (double a, double b, double c)
 set
bool operator== (const Vector3 &v) const
 comparison : equality
bool operator!= (const Vector3 &v) const
 comparison : not equal
bool IsZero () const
 comparison : zero
bool IsNearlyZero () const
 comparison : nearly zero
bool IsNearlyEqual (const Vector3 &v) const
 comparison : nearly equal
Vector3 operator+ (const Vector3 &v) const
 operator +
Vector3 operator- (const Vector3 &v) const
 operator -
Vector3 operator * (double Scale) const
 operator *(double)
Vector3 operator/ (double Scale) const
 operator /(double)
Vector3 operator- () const
 Unary minus.
Vector3 operator+= (const Vector3 &v)
 operator +=
Vector3 operator-= (const Vector3 &v)
 operator -=
Vector3 operator *= (double Scale)
 double multiply
Vector3 operator/= (double Scale)
 double divide
double Norm () const
 euclidien norm
double NormSquared () const
 squared norm
Vector3 Cross (const Vector3 &v) const
 cross product
double Dot (const Vector3 &v) const
 dot product
bool Normalize ()
 Normalize.
Vector3 GetNormalized () const
 return a normalized vector

Public Attributes

double x
 x,y,z coordinates, 0 at the initialisation
double y
double z

Friends

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


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.

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.

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

comparison : not equal

Definition at line 79 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 [inline]

Unary minus.

Definition at line 121 of file Vector3.h.

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 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

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().


The documentation for this class was generated from the following files:
Generated on 23 Oct 2014 for Hugintrunk by  doxygen 1.4.7