Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CSamplePoint Class Reference

A class that represents a samplepoint in a vectorfield. More...

#include <SamplePoint.h>

List of all members.

Public Methods

float * GetAdditional ()
void SetAdditional (float *additional)
float GetUnitZVec ()
 Returns unit vector x-component.

float GetUnitYVec ()
 Returns unit vector y-component.

float GetUnitXVec ()
 Returns unit vector z-component.

CVector3DGetUnitVec ()
 Returns unit vector.

void SetUnitVec (CVector3D &unitVec)
 Sets unit vector.

void SetMagnitude (float magnitude)
 Sets vector length.

float GetMagnitude ()
 Returns length of vector.

CSamplePoint & operator= (const CSamplePoint &samplePoint)
 Overloaded operator '='.

 CSamplePoint (const CSamplePoint &samplePoint)
 Copy-constructor.

float GetZVec ()
 Returns x-component of vector.

float GetYVec ()
 Returns y-component of vector.

float GetXVec ()
 Returns z-component of vector.

 CSamplePoint ()
 CSamplePoint (CPoint3D &pos3D, CVector3D &vector3D, float *additional)
 Constructor with position, vector and additional-array as parameters. More...

 CSamplePoint (CPoint3D &pos3D, CVector3D &unitVec3D, float magnitude, float *additional)
 Constructor with position, unit vector and additional-array as parameters. More...

virtual ~CSamplePoint ()
void SetPos (CPoint3D &pos3D)
 Sets position of samplepoint.

void SetVector (CVector3D &vector3D)
 Sets vector. More...

void SetAdditional (int index, float value)
 Sets additional information (pressure,velocity,...).

void GetVector (CVector3D &vec)
 Gets vector. Requires multiplication unit vector * vector magnitude.

float GetXPos ()
 Returns x-position of the samplepoint.

float GetYPos ()
 Returns y-position of the samplepoint.

float GetZPos ()
 Returns z-position of the samplepoint.

float GetAdditional (int i)
 Returns element i in additional information array.

float GetQuadMinDist ()
 Returns quadratic minimal distance to other samplepoints.

CPoint3DGetPos ()
 returns position of samplepoint as CPoint3D object.

float Distance (CSamplePoint *samplePoint)
 Returns euclidian distance to another samplepoint.

float GetQuadDistance (CSamplePoint *samplePoint)
 Returns quadratic euclidian distance to another samplepoint.

bool CSamplePoint::ComputeQuadMinDist (CObList *samplePoints, float minDist)
 Computes minimal quadratic euclidian distance to an array of samplepoints, false if < minDist.


Static Public Methods

int GetAdditionalSize ()
 Sets values of this samplepoint to the values of parameter.

void SetAdditionalSize (int size)
 Sets size of additional information-array.


Detailed Description

A class that represents a samplepoint in a vectorfield.

CSamplePoint consists of a position, a vector and an array of additional information like pressure. The vector is stored as unit vector + magnitude, therefore directly operating with the unit vector is fastest and requires no additional computation. Also the quadratic distance to other samplepoints can be stored.


Constructor & Destructor Documentation

CSamplePoint::CSamplePoint CPoint3D   pos3D,
CVector3D   vector3D,
float *    additional
 

Constructor with position, vector and additional-array as parameters.

For the internal representation the magnitude of the vector is computed and the vector is normalized.

CSamplePoint::CSamplePoint CPoint3D   pos3D,
CVector3D   unitVec3D,
float    magnitude,
float *    additional
 

Constructor with position, unit vector and additional-array as parameters.

Because of the internal representation this representation requires no additional computation and is the faster constructor


Member Function Documentation

void CSamplePoint::SetVector CVector3D   vector3D
 

Sets vector.

For the internal representation the magnitude of the vector is computed and the vector is normalized.


The documentation for this class was generated from the following files:
Generated on Fri Aug 9 10:12:40 2002 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002