Удаление гомогенных векторов и матриц (возможно, в будущем будут добавлены 4-мерные векторы и матрицы 4x4)
This commit is contained in:
parent
86ea23de7d
commit
727961ad98
8 changed files with 12 additions and 420 deletions
|
|
@ -72,14 +72,6 @@
|
|||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="dual-vector3.h" />
|
||||
<Unit filename="hmg-matrix3x3.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="hmg-matrix3x3.h" />
|
||||
<Unit filename="hmg-vector3.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="hmg-vector3.h" />
|
||||
<Unit filename="matrix2x2.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@
|
|||
<ClInclude Include="dual-scalar.h" />
|
||||
<ClInclude Include="dual-quaternion.h" />
|
||||
<ClInclude Include="dual-vector3.h" />
|
||||
<ClInclude Include="hmg-matrix3x3.h" />
|
||||
<ClInclude Include="hmg-vector3.h" />
|
||||
<ClInclude Include="matrix2x2.h" />
|
||||
<ClInclude Include="matrix2x3.h" />
|
||||
<ClInclude Include="matrix3x2.h" />
|
||||
|
|
@ -52,8 +50,6 @@
|
|||
<ClCompile Include="dual-scalar.c" />
|
||||
<ClCompile Include="dual-quaternion.c" />
|
||||
<ClCompile Include="dual-vector3.c" />
|
||||
<ClCompile Include="hmg-matrix3x3.c" />
|
||||
<ClCompile Include="hmg-vector3.c" />
|
||||
<ClCompile Include="position2.c" />
|
||||
<ClCompile Include="position3.c" />
|
||||
<ClCompile Include="turn2.c" />
|
||||
|
|
|
|||
|
|
@ -54,9 +54,6 @@
|
|||
<ClInclude Include="complex.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="slerp.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="affine3.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -69,27 +66,24 @@
|
|||
<ClInclude Include="position3.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="hg-vector3.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dual-number.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dual-vector3.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dual-quaternion.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="hg-matrix3x3.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="turn2.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="turn3.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dual-scalar.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="slerp3.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="angle.c">
|
||||
|
|
@ -119,9 +113,6 @@
|
|||
<ClCompile Include="matrix3x2.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="slerp.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="affine3.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -134,26 +125,23 @@
|
|||
<ClCompile Include="position3.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="hg-vector3.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dual-number.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dual-vector3.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dual-quaternion.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="hg-matrix3x3.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="turn2.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="turn3.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dual-scalar.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="slerp3.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#include "./hmg-matrix3x3.h"
|
||||
|
||||
inline void bgc_fp32_hg_matrix3x3_reset(BGC_FP32_HmgMatrix3x3* homogeneous_matrix);
|
||||
inline void bgc_fp64_hg_matrix3x3_reset(BGC_FP64_HmgMatrix3x3* homogeneous_matrix);
|
||||
|
||||
inline void bgc_fp32_hg_matrix3x3_make(BGC_FP32_HmgMatrix3x3* homogeneous_matrix, const BGC_FP32_Matrix3x3* linear_matrix, const BGC_FP32_Vector3* shift);
|
||||
inline void bgc_fp64_hg_matrix3x3_make(BGC_FP64_HmgMatrix3x3* homogeneous_matrix, const BGC_FP64_Matrix3x3* linear_matrix, const BGC_FP64_Vector3* shift);
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
#ifndef _BGC_HG_MATRIX3X3_H_INCLUDED_
|
||||
#define _BGC_HG_MATRIX3X3_H_INCLUDED_
|
||||
|
||||
#include "./types.h"
|
||||
#include "./hmg-vector3.h"
|
||||
|
||||
// =================== Reset ==================== //
|
||||
|
||||
inline void bgc_fp32_hg_matrix3x3_reset(BGC_FP32_HmgMatrix3x3* homogeneous_matrix)
|
||||
{
|
||||
homogeneous_matrix->r1c1 = 1.0f;
|
||||
homogeneous_matrix->r1c2 = 0.0f;
|
||||
homogeneous_matrix->r1c2 = 0.0f;
|
||||
homogeneous_matrix->r1d0 = 0.0f;
|
||||
|
||||
homogeneous_matrix->r2c1 = 0.0f;
|
||||
homogeneous_matrix->r2c2 = 1.0f;
|
||||
homogeneous_matrix->r2c2 = 0.0f;
|
||||
homogeneous_matrix->r2d0 = 0.0f;
|
||||
|
||||
homogeneous_matrix->r3c1 = 0.0f;
|
||||
homogeneous_matrix->r3c2 = 0.0f;
|
||||
homogeneous_matrix->r3c2 = 1.0f;
|
||||
homogeneous_matrix->r3d0 = 0.0f;
|
||||
|
||||
homogeneous_matrix->d0c1 = 0.0f;
|
||||
homogeneous_matrix->d0c2 = 0.0f;
|
||||
homogeneous_matrix->d0c2 = 0.0f;
|
||||
homogeneous_matrix->d0d0 = 1.0f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_hg_matrix3x3_reset(BGC_FP64_HmgMatrix3x3* homogeneous_matrix)
|
||||
{
|
||||
homogeneous_matrix->r1c1 = 1.0;
|
||||
homogeneous_matrix->r1c2 = 0.0;
|
||||
homogeneous_matrix->r1c2 = 0.0;
|
||||
homogeneous_matrix->r1d0 = 0.0;
|
||||
|
||||
homogeneous_matrix->r2c1 = 0.0;
|
||||
homogeneous_matrix->r2c2 = 1.0;
|
||||
homogeneous_matrix->r2c2 = 0.0;
|
||||
homogeneous_matrix->r2d0 = 0.0;
|
||||
|
||||
homogeneous_matrix->r3c1 = 0.0;
|
||||
homogeneous_matrix->r3c2 = 0.0;
|
||||
homogeneous_matrix->r3c2 = 1.0;
|
||||
homogeneous_matrix->r3d0 = 0.0;
|
||||
|
||||
homogeneous_matrix->d0c1 = 0.0;
|
||||
homogeneous_matrix->d0c2 = 0.0;
|
||||
homogeneous_matrix->d0c2 = 0.0;
|
||||
homogeneous_matrix->d0d0 = 1.0;
|
||||
}
|
||||
|
||||
// ==================== Make ==================== //
|
||||
// ==================== Make ==================== //
|
||||
|
||||
inline void bgc_fp32_hg_matrix3x3_make(BGC_FP32_HmgMatrix3x3* homogeneous_matrix, const BGC_FP32_Matrix3x3* linear_matrix, const BGC_FP32_Vector3* shift)
|
||||
{
|
||||
homogeneous_matrix->r1c1 = linear_matrix->r1c1;
|
||||
homogeneous_matrix->r1c2 = linear_matrix->r1c2;
|
||||
homogeneous_matrix->r1c2 = linear_matrix->r1c3;
|
||||
homogeneous_matrix->r1d0 = shift->x1;
|
||||
|
||||
homogeneous_matrix->r2c1 = linear_matrix->r2c1;
|
||||
homogeneous_matrix->r2c2 = linear_matrix->r2c2;
|
||||
homogeneous_matrix->r2c2 = linear_matrix->r2c3;
|
||||
homogeneous_matrix->r2d0 = shift->x2;
|
||||
|
||||
homogeneous_matrix->r3c1 = linear_matrix->r3c1;
|
||||
homogeneous_matrix->r3c2 = linear_matrix->r3c2;
|
||||
homogeneous_matrix->r3c2 = linear_matrix->r3c3;
|
||||
homogeneous_matrix->r3d0 = shift->x3;
|
||||
|
||||
homogeneous_matrix->d0c1 = 0.0f;
|
||||
homogeneous_matrix->d0c2 = 0.0f;
|
||||
homogeneous_matrix->d0c2 = 0.0f;
|
||||
homogeneous_matrix->d0d0 = 1.0f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_hg_matrix3x3_make(BGC_FP64_HmgMatrix3x3* homogeneous_matrix, const BGC_FP64_Matrix3x3* linear_matrix, const BGC_FP64_Vector3* shift)
|
||||
{
|
||||
homogeneous_matrix->r1c1 = linear_matrix->r1c1;
|
||||
homogeneous_matrix->r1c2 = linear_matrix->r1c2;
|
||||
homogeneous_matrix->r1c2 = linear_matrix->r1c3;
|
||||
homogeneous_matrix->r1d0 = shift->x1;
|
||||
|
||||
homogeneous_matrix->r2c1 = linear_matrix->r2c1;
|
||||
homogeneous_matrix->r2c2 = linear_matrix->r2c2;
|
||||
homogeneous_matrix->r2c2 = linear_matrix->r2c3;
|
||||
homogeneous_matrix->r2d0 = shift->x2;
|
||||
|
||||
homogeneous_matrix->r3c1 = linear_matrix->r3c1;
|
||||
homogeneous_matrix->r3c2 = linear_matrix->r3c2;
|
||||
homogeneous_matrix->r3c2 = linear_matrix->r3c3;
|
||||
homogeneous_matrix->r3d0 = shift->x3;
|
||||
|
||||
homogeneous_matrix->d0c1 = 0.0;
|
||||
homogeneous_matrix->d0c2 = 0.0;
|
||||
homogeneous_matrix->d0c2 = 0.0;
|
||||
homogeneous_matrix->d0d0 = 1.0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
#include "./hmg-vector3.h"
|
||||
|
||||
extern inline void bgc_fp32_hg_vector3_reset_point(BGC_FP32_HmgVector3* homogeneous_vector);
|
||||
extern inline void bgc_fp64_hg_vector3_reset_point(BGC_FP64_HmgVector3* homogeneous_vector);
|
||||
|
||||
extern inline void bgc_fp32_hg_vector3_reset_vector(BGC_FP32_HmgVector3* homogeneous_vector);
|
||||
extern inline void bgc_fp64_hg_vector3_reset_vector(BGC_FP64_HmgVector3* homogeneous_vector);
|
||||
|
||||
extern inline void bgc_fp32_hg_vector3_make(BGC_FP32_HmgVector3* homogeneous_vector, const float x1, const float x2, const float x3, const float ratio);
|
||||
extern inline void bgc_fp64_hg_vector3_make(BGC_FP64_HmgVector3* homogeneous_vector, const double x1, const double x2, const double x3, const double ratio);
|
||||
|
||||
extern inline void bgc_fp32_hg_vector3_make_point(BGC_FP32_HmgVector3* homogeneous_vector, const BGC_FP32_Vector3* regular_vector);
|
||||
extern inline void bgc_fp64_hg_vector3_make_point(BGC_FP64_HmgVector3* homogeneous_vector, const BGC_FP64_Vector3* regular_vector);
|
||||
|
||||
extern inline void bgc_fp32_hg_vector3_make_vector(BGC_FP32_HmgVector3* homogeneous_vector, const BGC_FP32_Vector3* regular_vector);
|
||||
extern inline void bgc_fp64_hg_vector3_make_vector(BGC_FP64_HmgVector3* homogeneous_vector, const BGC_FP64_Vector3* regular_vector);
|
||||
|
||||
extern inline int bgc_fp32_hg_vector3_is_point(const BGC_FP32_HmgVector3* homogeneous_vector);
|
||||
extern inline int bgc_fp64_hg_vector3_is_point(const BGC_FP64_HmgVector3* homogeneous_vector);
|
||||
|
||||
extern inline int bgc_fp32_hg_vector3_is_vector(const BGC_FP32_HmgVector3* homogeneous_vector);
|
||||
extern inline int bgc_fp64_hg_vector3_is_vector(const BGC_FP64_HmgVector3* homogeneous_vector);
|
||||
|
||||
extern inline void bgc_fp32_hg_vector3_copy(BGC_FP32_HmgVector3* destination, const BGC_FP32_HmgVector3* source);
|
||||
extern inline void bgc_fp64_hg_vector3_copy(BGC_FP64_HmgVector3* destination, const BGC_FP64_HmgVector3* source);
|
||||
|
||||
extern inline void bgc_fp32_hg_vector3_swap(BGC_FP32_HmgVector3* first, BGC_FP32_HmgVector3* second);
|
||||
extern inline void bgc_fp64_hg_vector3_swap(BGC_FP64_HmgVector3* first, BGC_FP64_HmgVector3* second);
|
||||
|
|
@ -1,211 +0,0 @@
|
|||
#ifndef _BGC_HG_VECTOR3_H_INCLUDED_
|
||||
#define _BGC_HG_VECTOR3_H_INCLUDED_
|
||||
|
||||
#include "./types.h"
|
||||
#include "./utilities.h"
|
||||
|
||||
// ================ Reset Point ================= //
|
||||
|
||||
inline void bgc_fp32_hg_vector3_reset_point(BGC_FP32_HmgVector3* homogeneous_vector)
|
||||
{
|
||||
homogeneous_vector->x1 = 0.0f;
|
||||
homogeneous_vector->x2 = 0.0f;
|
||||
homogeneous_vector->x3 = 0.0f;
|
||||
homogeneous_vector->d0 = 1.0f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_hg_vector3_reset_point(BGC_FP64_HmgVector3* homogeneous_vector)
|
||||
{
|
||||
homogeneous_vector->x1 = 0.0;
|
||||
homogeneous_vector->x2 = 0.0;
|
||||
homogeneous_vector->x3 = 0.0;
|
||||
homogeneous_vector->d0 = 1.0;
|
||||
}
|
||||
|
||||
// ================ Reset Point ================= //
|
||||
|
||||
inline void bgc_fp32_hg_vector3_reset_vector(BGC_FP32_HmgVector3* homogeneous_vector)
|
||||
{
|
||||
homogeneous_vector->x1 = 0.0f;
|
||||
homogeneous_vector->x2 = 0.0f;
|
||||
homogeneous_vector->x3 = 0.0f;
|
||||
homogeneous_vector->d0 = 0.0f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_hg_vector3_reset_vector(BGC_FP64_HmgVector3* homogeneous_vector)
|
||||
{
|
||||
homogeneous_vector->x1 = 0.0;
|
||||
homogeneous_vector->x2 = 0.0;
|
||||
homogeneous_vector->x3 = 0.0;
|
||||
homogeneous_vector->d0 = 0.0;
|
||||
}
|
||||
|
||||
// ==================== Make ==================== //
|
||||
|
||||
inline void bgc_fp32_hg_vector3_make(BGC_FP32_HmgVector3* homogeneous_vector, const float x1, const float x2, const float x3, const float d0)
|
||||
{
|
||||
homogeneous_vector->x1 = x1;
|
||||
homogeneous_vector->x2 = x2;
|
||||
homogeneous_vector->x3 = x3;
|
||||
homogeneous_vector->d0 = d0;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_hg_vector3_make(BGC_FP64_HmgVector3* homogeneous_vector, const double x1, const double x2, const double x3, const double d0)
|
||||
{
|
||||
homogeneous_vector->x1 = x1;
|
||||
homogeneous_vector->x2 = x2;
|
||||
homogeneous_vector->x3 = x3;
|
||||
homogeneous_vector->d0 = d0;
|
||||
}
|
||||
|
||||
// ================= Make Point ================= //
|
||||
|
||||
inline void bgc_fp32_hg_vector3_make_point(BGC_FP32_HmgVector3* homogeneous_vector, const BGC_FP32_Vector3* regular_vector)
|
||||
{
|
||||
homogeneous_vector->x1 = regular_vector->x1;
|
||||
homogeneous_vector->x2 = regular_vector->x2;
|
||||
homogeneous_vector->x3 = regular_vector->x3;
|
||||
homogeneous_vector->d0 = 1.0f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_hg_vector3_make_point(BGC_FP64_HmgVector3* homogeneous_vector, const BGC_FP64_Vector3* regular_vector)
|
||||
{
|
||||
homogeneous_vector->x1 = regular_vector->x1;
|
||||
homogeneous_vector->x2 = regular_vector->x2;
|
||||
homogeneous_vector->x3 = regular_vector->x3;
|
||||
homogeneous_vector->d0 = 1.0;
|
||||
}
|
||||
|
||||
// ================ Make Vector ================= //
|
||||
|
||||
inline void bgc_fp32_hg_vector3_make_vector(BGC_FP32_HmgVector3* homogeneous_vector, const BGC_FP32_Vector3* regular_vector)
|
||||
{
|
||||
homogeneous_vector->x1 = regular_vector->x1;
|
||||
homogeneous_vector->x2 = regular_vector->x2;
|
||||
homogeneous_vector->x3 = regular_vector->x3;
|
||||
homogeneous_vector->d0 = 0.0f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_hg_vector3_make_vector(BGC_FP64_HmgVector3* homogeneous_vector, const BGC_FP64_Vector3* regular_vector)
|
||||
{
|
||||
homogeneous_vector->x1 = regular_vector->x1;
|
||||
homogeneous_vector->x2 = regular_vector->x2;
|
||||
homogeneous_vector->x3 = regular_vector->x3;
|
||||
homogeneous_vector->d0 = 0.0;
|
||||
}
|
||||
|
||||
// ================== Is Point ================== //
|
||||
|
||||
inline int bgc_fp32_hg_vector3_is_point(const BGC_FP32_HmgVector3* homogeneous_vector)
|
||||
{
|
||||
return !bgc_fp32_is_zero(homogeneous_vector->d0);
|
||||
}
|
||||
|
||||
inline int bgc_fp64_hg_vector3_is_point(const BGC_FP64_HmgVector3* homogeneous_vector)
|
||||
{
|
||||
return !bgc_fp64_is_zero(homogeneous_vector->d0);
|
||||
}
|
||||
|
||||
// ================= Is Vector ================== //
|
||||
|
||||
inline int bgc_fp32_hg_vector3_is_vector(const BGC_FP32_HmgVector3* homogeneous_vector)
|
||||
{
|
||||
return bgc_fp32_is_zero(homogeneous_vector->d0);
|
||||
}
|
||||
|
||||