VectorEntity  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Static Public Member Functions
vctl::MCVector3D Class Reference

Class encapsulates a vector in 3D space as well as some basic arithmetic. More...

#include <mcvector3d.h>

Inheritance diagram for vctl::MCVector3D:
Inheritance graph
[legend]

List of all members.

Public Types

typedef MCCoordinate3D< doubletCoordinates
 Base class.

Public Member Functions

double Length () const
 Length of the vector.
void Make (const MCPoint3D &p1, const MCPoint3D &p2)
 Initializes the vector.
 MCVector3D ()
 Default constructor.
 MCVector3D (const MCVector3D &v)
 Constructor that initializes vector cordinates.
 MCVector3D (MCVector3D *v)
 Constructor that initializes vector cordinates.
 MCVector3D (double *_x, double *_y, double *_z)
 Constructor that initializes vector cordinates.
 MCVector3D (const double &_x, const double &_y, const double &_z)
 Constructor that initializes vector cordinates.
 MCVector3D (MCPoint3D *p1, MCPoint3D *p2)
 Constructor that initializes vector cordinates.
MCVector3DNormalization ()
 Vector normalization so that the length will be equal to one.
MCVector3D operator% (const MCVector3D &v) const
 Calculates vector product.
double operator* (const MCVector3D &v) const
 Calculates dot product.
MCVector3D operator* (double cislo) const
 Multiplies the vector coordinates by a given number.
void operator*= (double cislo)
 Multiplies the vector by a given number.
MCVector3D operator+ (const MCVector3D &v)
 Vector addition.
void operator+= (const MCVector3D &v)
 Vector addition.
MCVector3D operator- (const MCVector3D &v)
 Vector subtraction.
MCVector3D operator- ()
 Makes a counter vector having opossite direction.
void operator-= (const MCVector3D &v)
 Vector subtraction.
MCVector3D operator/ (double cislo) const
 Divides the vector coordinates by a given number.
double SquareLength () const
 Square root of the vector length.
MCVector3DVectorProduct (const MCVector3D &u, const MCVector3D &v)
 Calculates vector product.
 ~MCVector3D ()
 Destructor.

Static Public Member Functions

static double DotProduct (const MCVector3D &u, const MCVector3D &v)
 Calculates dot product.
static MCVector3DMakeNormal (MCPoint3D *p0, MCPoint3D *p1, MCPoint3D *p2, MCVector3D &normala)
 Calculates normal of a plane defined by three points.
static double VectorAngle (const MCVector3D &u, const MCVector3D &v)
 Calculate angle between two vectors, not signed, in range <0, Pi>
static double VectorAngleRotation (const MCVector3D &u, const MCVector3D &v, const MCVector3D &axis)
 Calculate angle between two vectors, for rotation purpose, signed, in range <0, Pi>

Detailed Description

Class encapsulates a vector in 3D space as well as some basic arithmetic.


Member Typedef Documentation

Base class.


Constructor & Destructor Documentation

Default constructor.

  • Initializes all coordinates to zero.
vctl::MCVector3D::MCVector3D ( const MCVector3D v) [inline]

Constructor that initializes vector cordinates.

Constructor that initializes vector cordinates.

vctl::MCVector3D::MCVector3D ( double _x,
double _y,
double _z 
) [inline]

Constructor that initializes vector cordinates.

vctl::MCVector3D::MCVector3D ( const double _x,
const double _y,
const double _z 
) [inline]

Constructor that initializes vector cordinates.

vctl::MCVector3D::MCVector3D ( MCPoint3D p1,
MCPoint3D p2 
) [inline]

Constructor that initializes vector cordinates.

Parameters:
p1- starting point.
p2- end point.

Destructor.


Member Function Documentation

static double vctl::MCVector3D::DotProduct ( const MCVector3D u,
const MCVector3D v 
) [inline, static]

Calculates dot product.

double vctl::MCVector3D::Length ( ) const [inline]

Length of the vector.

void vctl::MCVector3D::Make ( const MCPoint3D p1,
const MCPoint3D p2 
) [inline]

Initializes the vector.

Parameters:
p1- starting point.
p2- end point.
static MCVector3D& vctl::MCVector3D::MakeNormal ( MCPoint3D p0,
MCPoint3D p1,
MCPoint3D p2,
MCVector3D normala 
) [inline, static]

Calculates normal of a plane defined by three points.

Vector normalization so that the length will be equal to one.

MCVector3D vctl::MCVector3D::operator% ( const MCVector3D v) const [inline]

Calculates vector product.

double vctl::MCVector3D::operator* ( const MCVector3D v) const [inline]

Calculates dot product.

MCVector3D vctl::MCVector3D::operator* ( double  cislo) const [inline]

Multiplies the vector coordinates by a given number.

void vctl::MCVector3D::operator*= ( double  cislo) [inline]

Multiplies the vector by a given number.

MCVector3D vctl::MCVector3D::operator+ ( const MCVector3D v) [inline]

Vector addition.

void vctl::MCVector3D::operator+= ( const MCVector3D v) [inline]

Vector addition.

MCVector3D vctl::MCVector3D::operator- ( const MCVector3D v) [inline]

Vector subtraction.

MCVector3D vctl::MCVector3D::operator- ( ) [inline]

Makes a counter vector having opossite direction.

void vctl::MCVector3D::operator-= ( const MCVector3D v) [inline]

Vector subtraction.

MCVector3D vctl::MCVector3D::operator/ ( double  cislo) const [inline]

Divides the vector coordinates by a given number.

Square root of the vector length.

static double vctl::MCVector3D::VectorAngle ( const MCVector3D u,
const MCVector3D v 
) [inline, static]

Calculate angle between two vectors, not signed, in range <0, Pi>

static double vctl::MCVector3D::VectorAngleRotation ( const MCVector3D u,
const MCVector3D v,
const MCVector3D axis 
) [inline, static]

Calculate angle between two vectors, for rotation purpose, signed, in range <0, Pi>

MCVector3D& vctl::MCVector3D::VectorProduct ( const MCVector3D u,
const MCVector3D v 
) [inline]

Calculates vector product.


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