unit ugluMatrixEx; {$mode objfpc}{$H+} {$macro on} {$modeswitch typehelpers} interface uses Classes, SysUtils, ugluVectorEx, ugluMatrixExHelper; const maAxisX = 0; maAxisY = 1; maAxisZ = 2; maPos = 3; type TgluMatrix2f = TgluMatrixF.TMat2; TgluMatrix3f = TgluMatrixF.TMat3; TgluMatrix4f = TgluMatrixF.TMat4; TgluMatrix2d = TgluMatrixD.TMat2; TgluMatrix3d = TgluMatrixD.TMat3; TgluMatrix4d = TgluMatrixD.TMat4; PgluMatrix2f = ^TgluMatrix2f; PgluMatrix3f = ^TgluMatrix3f; PgluMatrix4f = ^TgluMatrix4f; PgluMatrix2d = ^TgluMatrix2d; PgluMatrix3d = ^TgluMatrix3d; PgluMatrix4d = ^TgluMatrix4d; {$DEFINE __MATRIX_HELPER_INTERFACE} {$DEFINE __VEC2 := TgluVector2f} {$DEFINE __VEC3 := TgluVector3f} {$DEFINE __VEC4 := TgluVector4f} {$DEFINE __IMPL := TgluMatrixF} {$DEFINE __SIZE := 2} {$DEFINE __VEC := TgluVector2f} {$DEFINE __MAT := TgluMatrix2f} {$DEFINE __HELPER := TgluTypeHelperMatrix2f} {$I ugluMatrixEx.inc} {$DEFINE __IMPL := TgluMatrixF} {$DEFINE __SIZE := 3} {$DEFINE __VEC := TgluVector3f} {$DEFINE __MAT := TgluMatrix3f} {$DEFINE __HELPER := TgluTypeHelperMatrix3f} {$I ugluMatrixEx.inc} {$DEFINE __IMPL := TgluMatrixF} {$DEFINE __SIZE := 4} {$DEFINE __VEC := TgluVector4f} {$DEFINE __MAT := TgluMatrix4f} {$DEFINE __HELPER := TgluTypeHelperMatrix4f} {$I ugluMatrixEx.inc} {$DEFINE __VEC2 := TgluVector2d} {$DEFINE __VEC3 := TgluVector3d} {$DEFINE __VEC4 := TgluVector4d} {$DEFINE __IMPL := TgluMatrixD} {$DEFINE __SIZE := 2} {$DEFINE __VEC := TgluVector2d} {$DEFINE __MAT := TgluMatrix2d} {$DEFINE __HELPER := TgluTypeHelperMatrix2d} {$I ugluMatrixEx.inc} {$DEFINE __IMPL := TgluMatrixD} {$DEFINE __SIZE := 3} {$DEFINE __VEC := TgluVector3d} {$DEFINE __MAT := TgluMatrix3d} {$DEFINE __HELPER := TgluTypeHelperMatrix3d} {$I ugluMatrixEx.inc} {$DEFINE __IMPL := TgluMatrixD} {$DEFINE __SIZE := 4} {$DEFINE __VEC := TgluVector4d} {$DEFINE __MAT := TgluMatrix4d} {$DEFINE __HELPER := TgluTypeHelperMatrix4d} {$I ugluMatrixEx.inc} {$UNDEF __MATRIX_HELPER_INTERFACE} implementation {$DEFINE __MATRIX_HELPER_IMPL} {$DEFINE __VEC2 := TgluVector2f} {$DEFINE __VEC3 := TgluVector3f} {$DEFINE __VEC4 := TgluVector4f} {$DEFINE __IMPL := TgluMatrixF} {$DEFINE __SIZE := 2} {$DEFINE __VEC := TgluVector2f} {$DEFINE __MAT := TgluMatrix2f} {$DEFINE __HELPER := TgluTypeHelperMatrix2f} {$I ugluMatrixEx.inc} {$DEFINE __IMPL := TgluMatrixF} {$DEFINE __SIZE := 3} {$DEFINE __VEC := TgluVector3f} {$DEFINE __MAT := TgluMatrix3f} {$DEFINE __HELPER := TgluTypeHelperMatrix3f} {$I ugluMatrixEx.inc} {$DEFINE __IMPL := TgluMatrixF} {$DEFINE __SIZE := 4} {$DEFINE __VEC := TgluVector4f} {$DEFINE __MAT := TgluMatrix4f} {$DEFINE __HELPER := TgluTypeHelperMatrix4f} {$I ugluMatrixEx.inc} {$DEFINE __VEC2 := TgluVector2d} {$DEFINE __VEC3 := TgluVector3d} {$DEFINE __VEC4 := TgluVector4d} {$DEFINE __IMPL := TgluMatrixD} {$DEFINE __SIZE := 2} {$DEFINE __VEC := TgluVector2d} {$DEFINE __MAT := TgluMatrix2d} {$DEFINE __HELPER := TgluTypeHelperMatrix2d} {$I ugluMatrixEx.inc} {$DEFINE __IMPL := TgluMatrixD} {$DEFINE __SIZE := 3} {$DEFINE __VEC := TgluVector3d} {$DEFINE __MAT := TgluMatrix3d} {$DEFINE __HELPER := TgluTypeHelperMatrix3d} {$I ugluMatrixEx.inc} {$DEFINE __IMPL := TgluMatrixD} {$DEFINE __SIZE := 4} {$DEFINE __VEC := TgluVector4d} {$DEFINE __MAT := TgluMatrix4d} {$DEFINE __HELPER := TgluTypeHelperMatrix4d} {$I ugluMatrixEx.inc} {$UNDEF __MATRIX_HELPER_IMPL} end.