#include <SamplePoint.h>
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. | |
CVector3D * | GetUnitVec () |
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. | |
CPoint3D * | GetPos () |
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. |
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 with position, vector and additional-array as parameters. For the internal representation the magnitude of the vector is computed and the vector is normalized. |
|
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 |
|
Sets vector. For the internal representation the magnitude of the vector is computed and the vector is normalized. |