CONFIG LIB 1.5
Configuration Files Library (by TGG 2020)
|
Vector 3D class and functions. More...
#include <cmath>
#include <cstdio>
#include <iostream>
Go to the source code of this file.
Classes | |
class | VECTOR_3D |
Vector 3D class - vector manipulation. More... | |
Functions | |
double | operator* (const VECTOR_3D &A, const VECTOR_3D &B) |
Arithmetic operator - dot (scalar) product of two vectors. | |
VECTOR_3D | operator% (const VECTOR_3D &A, const VECTOR_3D &B) |
Arithmetic operator - cross (vector) product of two vectors. | |
VECTOR_3D | operator* (const VECTOR_3D &A, const double &s) |
Arithmetic operator - product of vector and scalar. | |
VECTOR_3D | operator* (const double &s, const VECTOR_3D &A) |
Arithmetic operator - product of scalar and vector. | |
VECTOR_3D | operator/ (const VECTOR_3D &A, const double &s) |
Arithmetic operator - vector divided by scalar (product of vector and reciprocal scalar) | |
VECTOR_3D | operator+ (const VECTOR_3D &A, const VECTOR_3D &B) |
Arithmetic operator - sum of two vectors. | |
VECTOR_3D | operator+ (const VECTOR_3D &A) |
Arithmetic operator - sum of two vectors. | |
VECTOR_3D | operator- (const VECTOR_3D &A, const VECTOR_3D &B) |
Arithmetic operator - subtraction of two vectors (sum of A and -B) | |
VECTOR_3D | operator- (const VECTOR_3D &A) |
Arithmetic operator - reverse of vector (-A) | |
VECTOR_3D | operator& (const VECTOR_3D &A, const VECTOR_3D &B) |
Arithmetic operator - coordinates products (AxBx, AyBy, AzBz) | |
void | operator%= (VECTOR_3D &A, const VECTOR_3D &B) |
Arithmetic operator - cross product assigment. | |
void | operator+= (VECTOR_3D &A, const VECTOR_3D &B) |
Arithmetic operator - addition assigment. | |
void | operator-= (VECTOR_3D &A, const VECTOR_3D &B) |
Arithmetic operator - subtraction assigment. | |
void | operator&= (VECTOR_3D &A, const VECTOR_3D &B) |
Arithmetic operator - multiplication assigment (coordiante by coordiante) | |
void | operator*= (VECTOR_3D &A, const double &s) |
Arithmetic operator - multiplication assigment. | |
void | operator/= (VECTOR_3D &A, const double &s) |
Arithmetic operator - division assigment. | |
bool | operator== (const VECTOR_3D &A, const VECTOR_3D &B) |
Boolean operator - compares two vectors - true if all appropriate coordinates are equal. | |
void | v_printf (char *name, const VECTOR_3D &vec) |
print to stdout name and vector components | |
void | v_printf (char *fmt, char *name, const VECTOR_3D &vec) |
print to stdout name and vector components according to given format "fmt" | |
void | v_sprintf (char *dest, char *name, const VECTOR_3D &vec) |
print to string "dest" name and vector components | |
void | v_sprintf (char *dest, char *fmt, char *name, const VECTOR_3D &vec) |
print to string "dest" name and vector components according to given format "fmt" | |
void | v_fprintf (FILE *dest, char *name, const VECTOR_3D &vec) |
print to stream "dest" name and vector components | |
void | v_fprintf (FILE *dest, char *fmt, char *name, const VECTOR_3D &vec) |
print to sstream "dest" name and vector components according to given format "fmt" | |
std::ostream & | operator<< (std::ostream &out, const VECTOR_3D &v) |
print to std:ostream | |
void | vout (FILE *ff, VECTOR_3D vec) |
printf vector components (x,y,z) to stream ff | |
void | voutn (FILE *ff, VECTOR_3D vec) |
printf vector components (x,-y,z) to stream ff | |
void | vout0 (FILE *ff, VECTOR_3D vec) |
printf vector components (x,0,z) to stream ff | |
VECTOR_3D | VECTOR_3__E0 (void) |
returns vector (0,0,0) | |
VECTOR_3D | VECTOR_3__E1 (void) |
returns vector (1,1,1) | |
VECTOR_3D | VECTOR_3__Ex (void) |
returns vector (1,0,0) | |
VECTOR_3D | VECTOR_3__Ey (void) |
returns vector (0,1,0) | |
VECTOR_3D | VECTOR_3__Ez (void) |
returns vector (0,0,1) | |
Vector 3D class and functions.
Definition in file vector3d.h.
Arithmetic operator - cross (vector) product of two vectors.
Definition at line 209 of file vector3d.cpp.
void operator*= | ( | VECTOR_3D & | A, |
const double & | s ) |
Arithmetic operator - multiplication assigment.
Definition at line 337 of file vector3d.cpp.
void operator/= | ( | VECTOR_3D & | A, |
const double & | s ) |
Arithmetic operator - division assigment.
Definition at line 344 of file vector3d.cpp.
void v_fprintf | ( | FILE * | dest, |
char * | fmt, | ||
char * | name, | ||
const VECTOR_3D & | vec ) |
print to sstream "dest" name and vector components according to given format "fmt"
Definition at line 412 of file vector3d.cpp.
void v_fprintf | ( | FILE * | dest, |
char * | name, | ||
const VECTOR_3D & | vec ) |
print to stream "dest" name and vector components
Definition at line 407 of file vector3d.cpp.
void v_printf | ( | char * | fmt, |
char * | name, | ||
const VECTOR_3D & | vec ) |
print to stdout name and vector components according to given format "fmt"
Definition at line 392 of file vector3d.cpp.
void v_printf | ( | char * | name, |
const VECTOR_3D & | vec ) |
print to stdout name and vector components
Definition at line 387 of file vector3d.cpp.
void v_sprintf | ( | char * | dest, |
char * | fmt, | ||
char * | name, | ||
const VECTOR_3D & | vec ) |
print to string "dest" name and vector components according to given format "fmt"
Definition at line 402 of file vector3d.cpp.
void v_sprintf | ( | char * | dest, |
char * | name, | ||
const VECTOR_3D & | vec ) |
print to string "dest" name and vector components
Definition at line 397 of file vector3d.cpp.
VECTOR_3D VECTOR_3__E0 | ( | void | ) |
returns vector (0,0,0)
Definition at line 360 of file vector3d.cpp.
VECTOR_3D VECTOR_3__E1 | ( | void | ) |
returns vector (1,1,1)
Definition at line 365 of file vector3d.cpp.
VECTOR_3D VECTOR_3__Ex | ( | void | ) |
returns vector (1,0,0)
Definition at line 370 of file vector3d.cpp.
VECTOR_3D VECTOR_3__Ey | ( | void | ) |
returns vector (0,1,0)
Definition at line 375 of file vector3d.cpp.
VECTOR_3D VECTOR_3__Ez | ( | void | ) |
returns vector (0,0,1)
Definition at line 380 of file vector3d.cpp.
void vout | ( | FILE * | ff, |
VECTOR_3D | vec ) |
printf vector components (x,y,z) to stream ff
Definition at line 425 of file vector3d.cpp.
void vout0 | ( | FILE * | ff, |
VECTOR_3D | vec ) |
printf vector components (x,0,z) to stream ff
Definition at line 439 of file vector3d.cpp.