Добавление функций определения поворотов (versor) между направлениями и базисами
This commit is contained in:
parent
e6a94ab8d9
commit
2a4d5522d3
12 changed files with 784 additions and 287 deletions
|
|
@ -50,6 +50,94 @@ inline void bgc_vector3_set_values_fp64(const double x1, const double x2, const
|
|||
destination->x3 = x3;
|
||||
}
|
||||
|
||||
// ================= Directions ================= //
|
||||
|
||||
inline int bgc_vector3_get_direction_fp32(const int direction, BgcVector3FP32* vector)
|
||||
{
|
||||
switch (direction) {
|
||||
case BGC_DIRECTION_X1:
|
||||
vector->x1 = 1.0f;
|
||||
vector->x2 = 0.0f;
|
||||
vector->x3 = 0.0f;
|
||||
return 1;
|
||||
|
||||
case BGC_DIRECTION_X2:
|
||||
vector->x1 = 0.0f;
|
||||
vector->x2 = 1.0f;
|
||||