 |
CONFIG LIB
1.5
Configuration Files Library (by TGG 2020)
|
40 double dlg = this->Len();
58 y = yy*cos(alfa) - zz*sin(alfa);
59 z = yy*sin(alfa) + zz*cos(alfa);
66 x = zz*sin(alfa) + xx*cos(alfa);
67 z = zz*cos(alfa) - xx*sin(alfa);
74 x = xx*cos(alfa) - yy*sin(alfa);
75 y = xx*sin(alfa) + yy*cos(alfa);
110 y = yy*cos(alfa) - zz*sin(alfa);
111 z = yy*sin(alfa) + zz*cos(alfa);
150 x = zz*sin(alfa) + (xx-dX)*cos(alfa) + dX;
151 z = zz*cos(alfa) - (xx-dX)*sin(alfa);
190 x = xx*cos(alfa) - yy*sin(alfa);
191 y = xx*sin(alfa) + yy*cos(alfa);
204 return ( A.
x * B.
x + A.
y * B.
y + A.
z * B.
z );
213 c.
x = A.
y * B.
z - A.
z * B.
y;
214 c.
y = A.
z * B.
x - A.
x * B.
z;
215 c.
z = A.
x * B.
y - A.
y * B.
x;
307 tmp.
x = A.
y * B.
z - A.
z * B.
y;
308 tmp.
y = A.
z * B.
x - A.
x * B.
z;
309 tmp.
z = A.
x * B.
y - A.
y * B.
x;
355 return ( A.
x == B.
x && A.
y == B.
y && A.
z == B.
z );
389 printf(
"%s=[%19.11f,%19.11f,%19.11f]\n", name , vec.
x , vec.
y , vec.
z );
394 printf( fmt , name , vec.
x , vec.
y , vec.
z );
399 sprintf(dest,
"%s=[%19.11f,%19.11f %19.11f]", name , vec.
x , vec.
y , vec.
z );
404 sprintf(dest , fmt , name , vec.
x , vec.
y , vec.
z );
409 fprintf(dest,
"%s=[%19.11f,%19.11f %19.11f]\n", name , vec.
x , vec.
y , vec.
z );
414 fprintf( dest , fmt , name , vec.
x , vec.
y , vec.
z );
419 out <<
"[" << vec.
x <<
" , " << vec.
y <<
" , " << vec.
z <<
"]";
427 fprintf (ff,
"% 12.7f % 12.7f % 12.7f",vec.
x,vec.
y,vec.
z);
434 fprintf (ff,
"% 12.7f % 12.7f % 12.7f",vec.
x,-vec.
y,vec.
z);
441 fprintf (ff,
"% 12.7f % 12.7f % 12.7f",vec.
x,0.,vec.
z);
MATRIX_3x3 operator-(const MATRIX_3x3 &A, const MATRIX_3x3 &B)
Arithmetic operator - subtraction of 2 matrices (sum of A and -B)
void vout(FILE *ff, VECTOR_3D vec)
printf vector components (x,y,z) to stream ff
bool operator==(const VECTOR_3D &A, const VECTOR_3D &B)
Boolean operator - compares two vectors - true if all appropriate coordinates are equal.
void v_fprintf(FILE *dest, char *name, const VECTOR_3D &vec)
print to stream "dest" name and vector components
void voutn(FILE *ff, VECTOR_3D vec)
printf vector components (x,-y,z) to stream ff
void rotY(double alpha)
rotates the vector relative to the Y axis by an alpha[rad] angle
double Normalize(void)
normalizes the vector to unit - coordiantes are divided by the vector value, returnes the vector valu...
void rotdX(double alfa)
rotates the vector relative to the X axis by an alpha[deg] angle (precise values for 0,...
void rotdZ(double alfa)
rotates the vector relative to the Z axis by an alpha[deg] angle (precise values for 0,...
void v_sprintf(char *dest, char *name, const VECTOR_3D &vec)
print to string "dest" name and vector components
VECTOR_3D operator%(const VECTOR_3D &A, const VECTOR_3D &B)
Arithmetic operator - cross (vector) product of two vectors.
void operator-=(VECTOR_3D &A, const VECTOR_3D &B)
Arithmetic operator - subtraction assigment.
VECTOR_3D VECTOR_3__E0(void)
returns vector (0,0,0)
Vector 3D class - vector manipulation.
MATRIX_3x3 operator+(const MATRIX_3x3 &A, const MATRIX_3x3 &B)
Arithmetic operator - sum of 2 matrices.
VECTOR_3D VECTOR_3__Ez(void)
returns vector (0,0,1)
void operator/=(MATRIX_3x3 &A, const double &s)
Arithmetic operator - division assignment.
VECTOR_3D & operator=(const VECTOR_3D &v)
assignment operator
Vector 3D class and functions.
VECTOR_3D VECTOR_3__Ex(void)
returns vector (1,0,0)
void rotZ(double alpha)
rotates the vector relative to the Z axis by an alpha[rad] angle
VECTOR_3D VECTOR_3__E1(void)
returns vector (1,1,1)
void rotX(double alpha)
Rotating functions rotates the vector relative to the X axis by an alpha[rad] angle
void rotdY(double alfa, double dX=0.)
rotates the vector relative to the Y axis (shifted by dX longwise X) by an alpha[deg] angle (precise ...
void v_printf(char *name, const VECTOR_3D &vec)
print to stdout name and vector components
void operator&=(VECTOR_3D &A, const VECTOR_3D &B)
Arithmetic operator - multiplication assigment (coordiante by coordiante)
void operator%=(VECTOR_3D &A, const VECTOR_3D &B)
Arithmetic operator - cross product assigment.
MATRIX_3x3 operator/(const MATRIX_3x3 &A, const double &s)
Arithmetic operator - division of matrix by scalar (product of matrix and 1/s)
void operator*=(VECTOR_3D &A, const double &s)
Arithmetic operator - multiplication assigment.
void operator+=(VECTOR_3D &A, const VECTOR_3D &B)
Arithmetic operator - addition assigment.
std::ostream & operator<<(std::ostream &out, const VECTOR_3D &v)
print to std:ostream
VECTOR_3D VECTOR_3__Ey(void)
returns vector (0,1,0)
MATRIX_3x3 operator*(const MATRIX_3x3 &A, const MATRIX_3x3 &B)
Arithmetic operator - multiplication of 2 matrices.
void vout0(FILE *ff, VECTOR_3D vec)
printf vector components (x,0,z) to stream ff