vec3 Class Reference

#include <vec3.h>

List of all members.

Public Member Functions

 vec3 ()
 vec3 (float x, float y, float z=0.0f)
 vec3 (const float *u)
 vec3 (const vec3 &)
float & operator[] (unsigned)
 element of the vector
vec3operator= (const vec3 &)
 assignment
vec3operator+= (const vec3 &)
 adds the vector to this one
vec3operator-= (const vec3 &)
 subtracts the vector from this one
vec3operator *= (float)
 scales this vector with the scalar
vec3operator/= (float)
 scales this vector with the inverse of the scalar
const vec3 operator+ (const vec3 &) const
 adds two vectors
const vec3 operator- (const vec3 &) const
 subtracts two vectors
const vec3 operator * (float) const
 scales the vector with the scalar
const vec3 operator/ (float) const
 scales the vector with the inverse of the scalar
bool operator== (const vec3 &) const
 returns true if the vectors are equal
bool operator!= (const vec3 &) const
 returns true if the vectors differ in at least one component
vec3operator- ()
 opposite vector
float norm () const
 norm of the vector (length*length)
float length () const
 length of the vector
vec3normalize ()
 normalizes the vector
float dist2 (const vec3 &)
 norm of the vectors' difference (dist*dist)
float dist (const vec3 &)
 length of the vectors' difference
float operator * (const vec3 &) const
 dot product
const vec3 operator^ (const vec3 &) const
 cross product
void print ()
 print the vector components

Public Attributes

float v [3]
 our vector data


Detailed Description

Definition at line 11 of file vec3.h.


Constructor & Destructor Documentation

vec3::vec3 (  ) 

Definition at line 3 of file vec3.cpp.

References v.

Referenced by operator *(), operator+(), operator-(), operator/(), and operator^().

vec3::vec3 ( float  x,
float  y,
float  z = 0.0f 
)

Definition at line 10 of file vec3.cpp.

References v.

vec3::vec3 ( const float *  u  ) 

Definition at line 17 of file vec3.cpp.

References v.

vec3::vec3 ( const vec3 u  ) 

Definition at line 25 of file vec3.cpp.

References v.


Member Function Documentation

float & vec3::operator[] ( unsigned  i  ) 

element of the vector

Definition at line 32 of file vec3.cpp.

References v.

vec3 & vec3::operator= ( const vec3 u  ) 

assignment

Definition at line 37 of file vec3.cpp.

References v.

vec3 & vec3::operator+= ( const vec3 u  ) 

adds the vector to this one

Definition at line 48 of file vec3.cpp.

References v.

vec3 & vec3::operator-= ( const vec3 u  ) 

subtracts the vector from this one

Definition at line 56 of file vec3.cpp.

References v.

vec3 & vec3::operator *= ( float  t  ) 

scales this vector with the scalar

Definition at line 64 of file vec3.cpp.

References v.

vec3 & vec3::operator/= ( float  t  ) 

scales this vector with the inverse of the scalar

Definition at line 72 of file vec3.cpp.

const vec3 vec3::operator+ ( const vec3 u  )  const

adds two vectors

Definition at line 78 of file vec3.cpp.

References vec3().

Here is the call graph for this function:

const vec3 vec3::operator- ( const vec3 u  )  const

subtracts two vectors

Definition at line 83 of file vec3.cpp.

References vec3().

Here is the call graph for this function:

const vec3 vec3::operator * ( float  t  )  const

scales the vector with the scalar

Definition at line 88 of file vec3.cpp.

References vec3().

Here is the call graph for this function:

const vec3 vec3::operator/ ( float  t  )  const

scales the vector with the inverse of the scalar

Definition at line 93 of file vec3.cpp.

References vec3().

Here is the call graph for this function:

bool vec3::operator== ( const vec3 u  )  const

returns true if the vectors are equal

Definition at line 147 of file vec3.cpp.

References v.

bool vec3::operator!= ( const vec3 u  )  const

returns true if the vectors differ in at least one component

Definition at line 152 of file vec3.cpp.

References v.

vec3 & vec3::operator- (  ) 

opposite vector

Definition at line 98 of file vec3.cpp.

float vec3::norm (  )  const [inline]

norm of the vector (length*length)

Definition at line 103 of file vec3.cpp.

References v.

Referenced by length().

float vec3::length (  )  const [inline]

length of the vector

Definition at line 108 of file vec3.cpp.

References norm().

Here is the call graph for this function:

vec3 & vec3::normalize (  ) 

normalizes the vector

Definition at line 114 of file vec3.cpp.

References v.

Referenced by FlowData::normalizeVelocityChannels().

float vec3::dist2 ( const vec3 u  ) 

norm of the vectors' difference (dist*dist)

Definition at line 127 of file vec3.cpp.

float vec3::dist ( const vec3 u  ) 

length of the vectors' difference

Definition at line 132 of file vec3.cpp.

Referenced by StreamLineGrid::getMinimalDistance().

float vec3::operator * ( const vec3 u  )  const

dot product

Definition at line 137 of file vec3.cpp.

References v.

const vec3 vec3::operator^ ( const vec3 u  )  const

cross product

Definition at line 142 of file vec3.cpp.

References v, and vec3().

Here is the call graph for this function:

void vec3::print (  ) 

print the vector components

Definition at line 157 of file vec3.cpp.


Member Data Documentation

float vec3::v[3]

our vector data

Definition at line 15 of file vec3.h.

Referenced by Arrows::draw(), FlowGeometry::getInterpolationAt(), norm(), normalize(), operator *(), operator *=(), operator!=(), operator+=(), operator-=(), operator<<(), operator=(), operator==(), operator[](), operator^(), FlowGeometry::readFromFile(), and vec3().


The documentation for this class was generated from the following files:
Generated on Mon Jan 21 14:50:33 2008 for VisLU by  doxygen 1.5.4