Vector Class Reference

#include <Vector.h>

Inheritance diagram for Vector:

Inheritance graph
[legend]
Collaboration diagram for Vector:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Vector ()
 Vector (cvrFloat x, cvrFloat y, cvrFloat z)
 Vector (XYZ &ptA, XYZ &ptB)
 Vector (XYZ &pt)
 ~Vector ()
double magnitude ()
 return the magnitude (length) of this vector
void makeUnit ()
 make this vector a unit length of 1
double dotProduct (Vector &v_in)
 return the dot product between this vector and another
double dotProduct (XYZ &v_in)
double angle (Vector &v_in)
 find the angle between two vectors on their common plane
Vectoroperator= (const Vector &vect)
Vectoroperator+= (const Vector &vect)
Vectoroperator-= (const Vector &vect)
Vectoroperator= (const XYZ &pt)
Vectoroperator+= (const XYZ &pt)
Vectoroperator-= (const XYZ &pt)
Vectoroperator/= (const double div_val)
Vectoroperator*= (const double mp_val)
Vectoroperator*= (const Vector &vect)
Vector operator+ (const Vector &vect)
 cross product
Vector operator- (const Vector &vect)
Vector operator/ (const double div_val)
Vector operator* (const double mp_val)
Vector operator* (const Vector &vect)
Vector operator+ (const XYZ &pt)
 cross product
Vector operator- (const XYZ &pt)

Static Public Member Functions

static bool linePlaneIntersect (XYZ &returned_intersect_point, Vector &normal, XYZ &point_on_plane, XYZ &segment_start, XYZ &segment_end)
 form a plane from normal and point_on_plane and test segment start->end to find returned_intersect_point
static XYZ getClosestTo (XYZ &lineA, XYZ &lineB, XYZ &pointTest)
 find point outPt on line A->B closest to point pointTest
static Vector crossProduct (const Vector &vectA, const Vector &vectB)
 return the cross product of vector A and B

Friends

bool operator== (const Vector &vect1, const Vector &vect2)
bool operator!= (const Vector &vect1, const Vector &vect2)


Constructor & Destructor Documentation

Vector::Vector (  ) 

Vector::Vector ( cvrFloat  x,
cvrFloat  y,
cvrFloat  z 
)

Vector::Vector ( XYZ ptA,
XYZ ptB 
)

Vector::Vector ( XYZ pt  ) 

Vector::~Vector (  ) 


Member Function Documentation

double Vector::magnitude (  ) 

return the magnitude (length) of this vector

void Vector::makeUnit (  ) 

make this vector a unit length of 1

Here is the call graph for this function:

double Vector::dotProduct ( Vector v_in  ) 

return the dot product between this vector and another

double Vector::dotProduct ( XYZ v_in  ) 

double Vector::angle ( Vector v_in  ) 

find the angle between two vectors on their common plane

Here is the call graph for this function:

bool Vector::linePlaneIntersect ( XYZ returned_intersect_point,
Vector normal,
XYZ point_on_plane,
XYZ segment_start,
XYZ segment_end 
) [static]

form a plane from normal and point_on_plane and test segment start->end to find returned_intersect_point

Here is the call graph for this function:

XYZ Vector::getClosestTo ( XYZ lineA,
XYZ lineB,
XYZ pointTest 
) [static]

find point outPt on line A->B closest to point pointTest

Here is the call graph for this function:

Vector Vector::crossProduct ( const Vector vectA,
const Vector vectB 
) [static]

return the cross product of vector A and B

Vector & Vector::operator= ( const Vector vect  ) 

Vector & Vector::operator+= ( const Vector vect  ) 

Vector & Vector::operator-= ( const Vector vect  ) 

Vector & Vector::operator= ( const XYZ pt  ) 

Reimplemented from XYZ.

Vector & Vector::operator+= ( const XYZ pt  ) 

Reimplemented from XYZ.

Vector & Vector::operator-= ( const XYZ pt  ) 

Reimplemented from XYZ.

Vector & Vector::operator/= ( const double  div_val  ) 

Vector & Vector::operator*= ( const double  mp_val  ) 

Vector & Vector::operator*= ( const Vector vect  ) 

Here is the call graph for this function:

Vector Vector::operator+ ( const Vector vect  ) 

cross product

Vector Vector::operator- ( const Vector vect  ) 

Vector Vector::operator/ ( const double  div_val  ) 

Vector Vector::operator* ( const double  mp_val  ) 

Vector Vector::operator* ( const Vector vect  ) 

Vector Vector::operator+ ( const XYZ pt  ) 

cross product

Reimplemented from XYZ.

Vector Vector::operator- ( const XYZ pt  ) 

Reimplemented from XYZ.


Friends And Related Function Documentation

bool operator== ( const Vector vect1,
const Vector vect2 
) [friend]

bool operator!= ( const Vector vect1,
const Vector vect2 
) [friend]


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

Generated on Thu Mar 19 19:36:13 2009 for CubicVR by  doxygen 1.5.6