Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Vector Class Reference

mathematical 3d-vector. More...

#include <vector.h>

List of all members.

Public Methods

 Vector ()
 Vector (const Vector &)
 Vector (Vector &, Vector &)
 Vector (rvfloat x, rvfloat y, rvfloat z)
Vector operator- (Vector &)
Vector operator+ (Vector &)
bool operator<= (const Vector &) const
Vector operator * (rvfloat scalefac)
Vector operator/ (rvfloat scalediv)
Vector operator * (Vector &)
bool operator== (const Vector &) const
bool operator!= (const Vector &) const
rvfloat length (void) const
rvfloat lengthXZ (void) const
bool normalize (void)
bool normalizeXZ (void)
rvfloat scalarprod (const Vector &) const
rvfloat scalarprod_xz (const Vector &) const
void rotate_right_xz (void)
bool isnull () const
bool perp (const Vector &v) const
bool unidir (const Vector &v) const
rvfloatx (void)
rvfloaty (void)
rvfloatz (void)
rvfloat x (void) const
rvfloat y (void) const
rvfloat z (void) const
rvfloat x (rvfloat)
rvfloat y (rvfloat)
rvfloat z (rvfloat)
rvfloatoperator[] (int i)

Public Attributes

rvfloat coord [3]

Static Public Methods

bool right_perp_triplet (Vector &v1, Vector &v2, Vector &v3)


Detailed Description

mathematical 3d-vector.

This class is directly written to and read from files.

It may only contain the three coordinates, and nothing more that requires storage memory, like virtual functions.


Constructor & Destructor Documentation

Vector::Vector ( )
 

Vector::Vector ( const Vector & p )
 

ctor: copy from other vector

Vector::Vector ( Vector & v1,
Vector & v2 )
 

ctor: be the normal vector to those

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

ctor: spec. x,y,z


Member Function Documentation

bool Vector::isnull ( ) const [inline]
 

rvfloat Vector::length ( void ) const
 

rvfloat Vector::lengthXZ ( void ) const
 

bool Vector::normalize ( void )
 

tries to rescale a vector to have length 1.0

Returns:
true if successfull false if vector is too small for rescaling

bool Vector::normalizeXZ ( void )
 

Vector Vector::operator * ( Vector & p )
 

cross product (result is a (not the) normal vector to this and the argument vector)

Vector Vector::operator * ( rvfloat scalefac )
 

scales a vector by scalefac

bool Vector::operator!= ( const Vector & p ) const
 

Vector Vector::operator+ ( Vector & p )
 

Vector Vector::operator- ( Vector & p )
 

Vector Vector::operator/ ( rvfloat scalediv )
 

scales a vector by scalediv

bool Vector::operator<= ( const Vector & p ) const
 

Is a x1<x2 && y1<y2 && z1<z2

bool Vector::operator== ( const Vector & p ) const
 

equal op. Does return true for close vectors, too

rvfloat & Vector::operator[] ( int i ) [inline]
 

bool Vector::perp ( const Vector & v ) const [inline]
 

true if perpendicular to other vector (nullvector is always!)

bool Vector::right_perp_triplet ( Vector & v1,
Vector & v2,
Vector & v3 ) [static]
 

true if v1,v2 and v3 (in this order) form a right-handed perpendicular triplet

void Vector::rotate_right_xz ( void )
 

rotates the vector by 90 degrees in the X-Z-plane

rvfloat Vector::scalarprod ( const Vector & v ) const
 

scalar product

rvfloat Vector::scalarprod_xz ( const Vector & v ) const
 

scalar product ignoring Y

bool Vector::unidir ( const Vector & v ) const
 

true if parallel and unidirectional to other vector (never to nullvector)

rvfloat Vector::x ( rvfloat f )
 

rvfloat Vector::x ( void ) const
 

rvfloat & Vector::x ( void )
 

rvfloat Vector::y ( rvfloat f )
 

rvfloat Vector::y ( void ) const
 

rvfloat & Vector::y ( void )
 

rvfloat Vector::z ( rvfloat f )
 

rvfloat Vector::z ( void ) const
 

rvfloat & Vector::z ( void )
 


Member Data Documentation

rvfloat Vector::coord[3]
 


The documentation for this class was generated from the following files:
Generated at Fri Jul 26 09:34:00 2002 for rvtmod/rvglue by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000