Column3Vector Class Reference

#include <ZLinAlg.h>

List of all members.


Detailed Description

A class of 3-vectors and a number of linear algebra methods and operators.


Public Member Functions

 Column3Vector ()
 ~Column3Vector ()
float getX ()
float getY ()
float getZ ()
void setvalues (float X, float Y, float Z)
void setX (float X)
void setY (float Y)
void setZ (float Z)
bool normalize ()
float norm ()
Column3Vector operator+ (Column3Vector Vright)
Column3Vector operator- (Column3Vector Vright)
Column3Vector operator * (Column3Vector Vright)
Column3Vector operator * (float)
Column3Vector operator/ (float)
Column3Vectoroperator= (Column3Vector)
void PrintSelf ()


Constructor & Destructor Documentation

Column3Vector::Column3Vector  ) 
 

Constructor method. The vector elements are initialized to zero.

Returns:
none

Column3Vector::~Column3Vector  ) 
 

Destructor method. Nothing to do here.

Returns:
none


Member Function Documentation

float Column3Vector::getX  ) 
 

Get the first element of the 3-vector.

Returns:
first element of the 3-vector.

float Column3Vector::getY  ) 
 

Get the second element of the 3-vector.

Returns:
second element of the 3-vector.

float Column3Vector::getZ  ) 
 

Get the third element of the 3-vector.

Returns:
third element of the 3-vector.

float Column3Vector::norm  ) 
 

Compute the norm of the 3-vector.

Returns:
The norm of the 3-vector.

bool Column3Vector::normalize  ) 
 

Normalize the 3-vector.

Returns:
True if successfully normalized, false if vector cannot be normalized.

Column3Vector Column3Vector::operator * float  scalefactor  ) 
 

An overloaded operator for multiplying a 3-vector by a scalar value.

Parameters:
scalefactor A scalar coefficient.
Returns:
The resulting scaled 3-vector.

Column3Vector Column3Vector::operator * Column3Vector  Vright  ) 
 

An overloaded operator for computing the NORMALIZED cross product of two 3-vectors.

Parameters:
vector2 The 3-vector that multiplies this one in the cross product.
Returns:
The resulting normalized cross product 3-vector.

Column3Vector Column3Vector::operator+ Column3Vector  Vright  ) 
 

An overloaded operator for summing two 3-vectors.

Parameters:
vector2 3-vector that is to be added to this one.
Returns:
The sum of the two 3-vectors.

Column3Vector Column3Vector::operator- Column3Vector  Vright  ) 
 

An overloaded operator for subtracting a 3-vector.

Parameters:
vector2 The 3-vector that is to be subtracted from this one.
Returns:
The difference of the two 3-vectors.

Column3Vector Column3Vector::operator/ float  divisor  ) 
 

An overloaded operator for dividing a 3-vector by a scalar value.

Parameters:
divisor A scalar value to divide the 3-vector.
Returns:
The resulting 3-vector quotient.

Column3Vector & Column3Vector::operator= Column3Vector  Vnew  ) 
 

An overloaded operator to assign a 3-vector value.

Parameters:
AssignedVector The 3-vector to be assigned to this one.
Returns:
true

void Column3Vector::PrintSelf  ) 
 

Print the contents of the 3-vector to the console.

void Column3Vector::setvalues float  X,
float  Y,
float  Z
 

Set the vector elements using the X, Y and Z values provided.

Parameters:
X The first scalar element of the 3-vector.
Y The second scalar element of the 3-vector.
Z The third scalar element of the 3-vector.

void Column3Vector::setX float  X  ) 
 

Get the specified element of the 3-vector.

Parameters:
X The new value of the first element of the 3-vector.

void Column3Vector::setY float  Y  ) 
 

Get the specified element of the 3-vector.

Parameters:
Y The new value of the second element of the 3-vector.

void Column3Vector::setZ float  Z  ) 
 

Get the specified element of the 3-vector.

Parameters:
Z The new value of the third element of the 3-vector.


The documentation for this class was generated from the following files:
Generated on Wed Feb 28 15:27:09 2007 for NaviTrack by  doxygen 1.4.6