Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Common - Math API [Matrix].inl
    »Author«    Andrew Aye (EMail: mailto:andrew.aye@gmail.com, Web: http://www.andrewaye.com)
    »Version«   4.51 / »GUID« A9981407-3EC9-42AF-8B6F-8BE6DD919615                                                                                                        */
/*   -------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/*  Copyright: © 2002-2017, Andrew Aye.  All Rights Reserved.
    This software is free for non-commercial use.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
      following conditions are met:
        Redistribution of source code must retain this copyright notice, this list of conditions and the following disclaimers.
        Redistribution in binary form must reproduce this copyright notice, this list of conditions and the following disclaimers in the documentation and other materials
          provided with the distribution.
    The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
    The intellectual property rights of the algorithms used reside with Andrew Aye.
    You may not use this software, in whole or in part, in support of any commercial product without the express written consent of the author.
    There is no warranty or other guarantee of fitness of this software for any purpose. It is provided solely "as is".                                                   */
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
#if !defined(TGS_COMMON_MATH_API_MATRIX_INL)
#define TGS_COMMON_MATH_API_MATRIX_INL
#pragma once


/* == Common ============================================================================================================================================================ */

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Native Vector Type and Files for Platform definition */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

/* F32 #include "TgS COMMON/TgS Common - Math API [Matrix] [M] [F32_04].i_inc" */
/* F32_34 #include "TgS COMMON/TgS Common - Math API [Matrix] [M].i_inc" */
/* F32_34 #include "TgS COMMON/TgS Common - Math API [Matrix] [M] [F].i_inc" */
/* F32_44 #include "TgS COMMON/TgS Common - Math API [Matrix] [M].i_inc" */
/* F32_44 #include "TgS COMMON/TgS Common - Math API [Matrix] [M] [F].i_inc" */


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Public Functions                                                                                                                                                      */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */

#define MAT_03_ASSIGN_EQN                                                                                                                                                  \
    pxRet->m_avRow[0] = EQN( 0 );                                                                                                                                          \
    pxRet->m_avRow[1] = EQN( 1 );                                                                                                                                          \
    pxRet->m_avRow[2] = EQN( 2 );

#define MAT_04_ASSIGN_EQN                                                                                                                                                  \
    pxRet->m_avRow[0] = EQN( 0 );                                                                                                                                          \
    pxRet->m_avRow[1] = EQN( 1 );                                                                                                                                          \
    pxRet->m_avRow[2] = EQN( 2 );                                                                                                                                          \
    pxRet->m_avRow[3] = EQN( 3 );

#define MAT_03_ASSIGN_EQN_M                                                                                                                                                \
    pxRet->m_avRow[0].m_mData = EQN( 0 );                                                                                                                                  \
    pxRet->m_avRow[1].m_mData = EQN( 1 );                                                                                                                                  \
    pxRet->m_avRow[2].m_mData = EQN( 2 );

#define MAT_04_ASSIGN_EQN_M                                                                                                                                                \
    pxRet->m_avRow[0].m_mData = EQN( 0 );                                                                                                                                  \
    pxRet->m_avRow[1].m_mData = EQN( 1 );                                                                                                                                  \
    pxRet->m_avRow[2].m_mData = EQN( 2 );                                                                                                                                  \
    pxRet->m_avRow[3].m_mData = EQN( 3 );

/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/* F32 34 Matrix */

#define MAT_ASSIGN  MAT_03_ASSIGN_EQN
#define TYPE        TgFLOAT32
#define MKL(A)      A##F
#define V(A)        A##_F32_04
#define M(A)        A##_F32_34
#define F(A)        A##_F32
#define ROW         3
#define COL         4
#define M44(A)      A##_F32_44

#include "TgS COMMON/TgS Common - Math API [Matrix].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [F].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [F] [34].i_inc"

#undef MAT_ASSIGN
#define MAT_ASSIGN  MAT_03_ASSIGN_EQN_M

#if !defined(TGS_COMMON_MATH_VECTOR_SPECIALIZATION) && !defined(TGS_COMMON_MATH_API_MATRIX_SPECIALIZATION_INL)
#include "TgS COMMON/TgS Common - Math API [Matrix] [M].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [M] [F].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [M] [F] [34].i_inc"
/*# !defined(TGS_COMMON_MATH_VECTOR_SPECIALIZATION) && !defined(TGS_COMMON_MATH_API_MATRIX_SPECIALIZATION_INL) */
#endif

#undef M44
#undef COL
#undef ROW
#undef F
#undef M
#undef V
#undef MKL
#undef TYPE
#undef MAT_ASSIGN

/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/* F32 44 Matrix */

#define MAT_ASSIGN  MAT_04_ASSIGN_EQN
#define TYPE        TgFLOAT32
#define MKL(A)      A##F
#define V(A)        A##_F32_04
#define M(A)        A##_F32_44
#define F(A)        A##_F32
#define ROW         4
#define COL         4
#define M34(A)      A##_F32_34

#include "TgS COMMON/TgS Common - Math API [Matrix].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [F].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [F] [44].i_inc"

#undef MAT_ASSIGN
#define MAT_ASSIGN  MAT_04_ASSIGN_EQN_M

#if !defined(TGS_COMMON_MATH_VECTOR_SPECIALIZATION) && !defined(TGS_COMMON_MATH_API_MATRIX_SPECIALIZATION_INL)
#include "TgS COMMON/TgS Common - Math API [Matrix] [M].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [M] [F].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [M] [F] [44].i_inc"
/*# !defined(TGS_COMMON_MATH_VECTOR_SPECIALIZATION) && !defined(TGS_COMMON_MATH_API_MATRIX_SPECIALIZATION_INL) */
#endif

#undef M34
#undef COL
#undef ROW
#undef F
#undef M
#undef V
#undef MKL
#undef TYPE
#undef MAT_ASSIGN

/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/* F64 34 Matrix */

#define MAT_ASSIGN  MAT_03_ASSIGN_EQN
#define TYPE        TgFLOAT64
#define MKL(A)      A
#define V(A)        A##_F64_04
#define M(A)        A##_F64_34
#define F(A)        A##_F64
#define ROW         3
#define COL         4
#define M44(A)      A##_F64_44

#include "TgS COMMON/TgS Common - Math API [Matrix].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [F].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [F] [34].i_inc"

#undef M44
#undef COL
#undef ROW
#undef F
#undef M
#undef V
#undef MKL
#undef TYPE
#undef MAT_ASSIGN

/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/* F64 44 Matrix */

#define MAT_ASSIGN  MAT_04_ASSIGN_EQN
#define TYPE        TgFLOAT64
#define MKL(A)      A
#define V(A)        A##_F64_04
#define M(A)        A##_F64_44
#define F(A)        A##_F64
#define ROW         4
#define COL         4
#define M34(A)      A##_F64_34

#include "TgS COMMON/TgS Common - Math API [Matrix].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [F].i_inc"
#include "TgS COMMON/TgS Common - Math API [Matrix] [F] [44].i_inc"

#undef M34
#undef COL
#undef ROW
#undef F
#undef M
#undef V
#undef MKL
#undef TYPE
#undef MAT_ASSIGN

/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */

/* ====================================================================================================================================================================== */
#endif