Переименование проектов / Renaming of projects
This commit is contained in:
parent
da61a9bf7c
commit
beb237fd4e
44 changed files with 6588 additions and 9 deletions
585
basic-geometry/matrix3x3.h
Normal file
585
basic-geometry/matrix3x3.h
Normal file
|
|
@ -0,0 +1,585 @@
|
|||
#ifndef _GEOMETRY_MATRIX3X3_H_
|
||||
#define _GEOMETRY_MATRIX3X3_H_
|
||||
|
||||
#include "vector3.h"
|
||||
#include "matrixes.h"
|
||||
|
||||
// =================== Reset ==================== //
|
||||
|
||||
static inline void bg_fp32_matrix3x3_reset(BgFP32Matrix3x3* matrix)
|
||||
{
|
||||
matrix->r1c1 = 0.0f;
|
||||
matrix->r1c2 = 0.0f;
|
||||
matrix->r1c3 = 0.0f;
|
||||
|
||||
matrix->r2c1 = 0.0f;
|
||||
matrix->r2c2 = 0.0f;
|
||||
matrix->r2c3 = 0.0f;
|
||||
|
||||
matrix->r3c1 = 0.0f;
|
||||
matrix->r3c2 = 0.0f;
|
||||
matrix->r3c3 = 0.0f;
|
||||
}
|
||||
|
||||
static inline void bg_fp64_matrix3x3_reset(BgFP64Matrix3x3* matrix)
|
||||
{
|
||||
matrix->r1c1 = 0.0;
|
||||
matrix->r1c2 = 0.0;
|
||||
matrix->r1c3 = 0.0;
|
||||
|
||||
matrix->r2c1 = 0.0;
|
||||
matrix->r2c2 = 0.0;
|
||||
matrix->r2c3 = 0.0;
|
||||
|
||||
matrix->r3c1 = 0.0;
|
||||
matrix->r3c2 = 0.0;
|
||||
matrix->r3c3 = 0.0;
|
||||
}
|
||||
|
||||
// ================== Identity ================== //
|
||||
|
||||
static inline void bg_fp32_matrix3x3_set_to_identity(BgFP32Matrix3x3* matrix)
|
||||
{
|
||||
matrix->r1c1 = 1.0f;
|
||||
matrix->r1c2 = 0.0f;
|
||||
matrix->r1c3 = 0.0f;
|
||||
|
||||
matrix->r2c1 = 0.0f;
|
||||
matrix->r2c2 = 1.0f;
|
||||
matrix->r2c3 = 0.0f;
|
||||
|
||||
matrix->r3c1 = 0.0f;
|
||||
matrix->r3c2 = 0.0f;
|
||||
matrix->r3c3 = 1.0f;
|
||||
}
|
||||
|
||||
static inline void bg_fp64_matrix3x3_set_to_identity(BgFP64Matrix3x3* matrix)
|
||||
{
|
||||
matrix->r1c1 = 1.0;
|
||||
matrix->r1c2 = 0.0;
|
||||
matrix->r1c3 = 0.0;
|
||||
|
||||
matrix->r2c1 = 0.0;
|
||||
matrix->r2c2 = 1.0;
|
||||
matrix->r2c3 = 0.0;
|
||||
|
||||
matrix->r3c1 = 0.0;
|
||||
matrix->r3c2 = 0.0;
|
||||
matrix->r3c3 = 1.0;
|
||||
}
|
||||
|
||||
// ================ Make Diagonal =============== //
|
||||
|
||||