![]() |
ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
|
Class for a coordinate system object such as coordinates of the vertex or a vector. More...
#include <Coord.h>
Public Member Functions | |
Coord () | |
Coord (const double &x, const double &y=0., const double &z=0.) | |
Coord constructor. | |
~Coord () | |
void | setXYZ (const double &x, const double &y, const double &z) |
Set the values of the Coord object. | |
void | setX (const double &x) |
Set the value in the x-direction of the Coord object. | |
void | setY (const double &y) |
Set the value in the y-direction of the Coord object. | |
void | setZ (const double &z) |
Set the value in the z-direction of the Coord object. | |
const double & | getX () const |
Return the value in the x-direction of the Coord object. | |
const double & | getY () const |
Return the value in the y-direction of the Coord object. | |
const double & | getZ () const |
Return the value in the z-direction of the Coord object. | |
double | norm () const |
Return the value of the norm of the Coord object. | |
double | squaredNorm () const |
Return the value of the squared norm of the Coord object. | |
Coord | abs () const |
Return a Coord object with absolute values of each component. | |
double | scalar (const Coord &a) const |
Scalar product between the present vector and vector a. | |
Coord | scalar (const Tensor &t) const |
Scalar product between the present vector and a tensor t. | |
Coord | cross (const Coord &a) const |
Cross product between the present vector and vector a. | |
void | localProjection (const Coord &normal, const Coord &tangent, const Coord &binormal) |
Projection in the local coordinate system which is defined by the transmitted normal, tangent and binormal. | |
void | reverseProjection (const Coord &normal, const Coord &tangent, const Coord &binormal) |
Reverse projection in the absolute Cartesian coordinate system. | |
void | setFromSubtractedVectors (const Coord &a, const Coord &b) |
Set a vector from the result of the substraction of the vector a from the vector b. | |
void | changeSign () |
Change the sign if the present vector. | |
void | normalized () |
Divide the present vector by its norm. | |
void | printInfo () const |
Print the information of the vector. | |
void | buildRelativeVelForRiemannMRF (const Coord &omega, const Coord &normal, const Coord &tangent, const Coord &binormal, const Coord &position) |
Build relative velocity from absolute one (relevant with MRF only) | |
Coord & | operator= (const double &scalar) |
Coord & | operator+= (const double &scalar) |
Coord & | operator-= (const double &scalar) |
Coord & | operator*= (const double &scalar) |
Coord & | operator/= (const double &scalar) |
Coord | operator* (const double &scalar) const |
Coord | operator/ (const double &scalar) const |
Coord & | operator+= (const Coord &a) |
Coord & | operator-= (const Coord &a) |
Static Public Member Functions | |
static double | scalarProduct (const Coord &v1, const Coord &v2) |
Return the scalar product bewteen two vectors. | |
static Coord | crossProduct (const Coord &v1, const Coord &v2) |
Return the cross product bewteen two vectors. | |
static double | determinant (const Coord &v1, const Coord &v2, const Coord &v3) |
Compute the determinant of the matrix formed by the vectors v1, v2 and v3. | |
static double | cos (const Coord &v1, const Coord &v2) |
Compute some sort of cosinus between two vectors. | |
static Coord | sin (const Coord &v1, const Coord &v2) |
Compute some sort of sinus between two vectors. | |
Static Public Attributes | |
static const Coord | defaultCoord = Coord() |
Default Coord object (const version) | |
static Coord | defaultCoordNonConst = Coord() |
Default Coord object (non-const version) | |
Protected Attributes | |
double | m_x |
double | m_y |
Value in the x-direction. | |
double | m_z |
Value in the y-direction. | |
Class for a coordinate system object such as coordinates of the vertex or a vector.
Coord::Coord | ( | ) |
Coord::Coord | ( | const double & | x, |
const double & | y = 0. , |
||
const double & | z = 0. |
||
) |
Coord constructor.
x | value of the x-direction coordinate |
y | value of the y-direction coordinate (if it is not assigned it is set to 0.) |
z | value of the z-direction coordinate (if it is not assigned it is set to 0.) |
Coord::~Coord | ( | ) |
void Coord::buildRelativeVelForRiemannMRF | ( | const Coord & | omega, |
const Coord & | normal, | ||
const Coord & | tangent, | ||
const Coord & | binormal, | ||
const Coord & | position | ||
) |
Build relative velocity from absolute one (relevant with MRF only)
omega | rotating velocity |
normal | face normal |
tangent | face tangent |
binormal | face binormal |
position | face position |
void Coord::changeSign | ( | ) |
Change the sign if the present vector.
Cross product between the present vector and vector a.
a | vector (Coord) |
|
inline |
Return the value in the x-direction of the Coord object.
|
inline |
Return the value in the y-direction of the Coord object.
|
inline |
Return the value in the z-direction of the Coord object.
double Coord::norm | ( | ) | const |
Return the value of the norm of the Coord object.
void Coord::normalized | ( | ) |
Divide the present vector by its norm.
Coord Coord::operator* | ( | const double & | scalar | ) | const |
Coord & Coord::operator*= | ( | const double & | scalar | ) |
Coord & Coord::operator+= | ( | const double & | scalar | ) |
Coord & Coord::operator-= | ( | const double & | scalar | ) |
Coord Coord::operator/ | ( | const double & | scalar | ) | const |
Coord & Coord::operator/= | ( | const double & | scalar | ) |
Coord & Coord::operator= | ( | const double & | scalar | ) |
void Coord::printInfo | ( | ) | const |
Print the information of the vector.
double Coord::scalar | ( | const Coord & | a | ) | const |
Scalar product between the present vector and vector a.
a | vector (Coord) |
Scalar product between the present vector and a tensor t.
t | tensor (tensor) |
void Coord::setX | ( | const double & | x | ) |
Set the value in the x-direction of the Coord object.
x | value of the x-direction coordinate |
void Coord::setXYZ | ( | const double & | x, |
const double & | y, | ||
const double & | z | ||
) |
Set the values of the Coord object.
x | value of the x-direction coordinate |
y | value of the y-direction coordinate |
z | value of the z-direction coordinate |
void Coord::setY | ( | const double & | y | ) |
Set the value in the y-direction of the Coord object.
y | value of the y-direction coordinate |
void Coord::setZ | ( | const double & | z | ) |
Set the value in the z-direction of the Coord object.
z | value of the z-direction coordinate |
double Coord::squaredNorm | ( | ) | const |
Return the value of the squared norm of the Coord object.
|
protected |
|
protected |
Value in the x-direction.
|
protected |
Value in the y-direction.