Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Common - Geometry 3D - Triangle [Edge].i_inc
    »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".                                                   */
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/* == Common ============================================================================================================================================================ */

/* ---- V(tgGM_ET_Calc_Normal) ------------------------------------------------------------------------------------------------------------------------------------------ */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Calc_Normal)( V(PCU_TgETRI) psET0 )
{
    V(C_TgVEC)                          vX0 = V(F_NEG)( psET0->m_avEdge + 2 );

    psET0->m_sPT.m_vNormal = V(F_UCX)( psET0->m_avEdge + 0, &vX0 );
}


/* ---- V(tgGM_ET_Calc_Point) ------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Calc_Point)( V(P_TgVEC) pvRT, V(CPCU_TgETRI) psET1, const TYPE fT0, const TYPE fT1 )
{
    V(C_TgVEC)                          vX0 = V(F_NMS_SVV)( fT1, psET1->m_avEdge + 2, psET1->m_sPT.m_avPoint + 0 );

    TgGEOM_ASSERT_PARAM(TgTRUE == V(tgGM_ET_Is_Valid)(psET1) && TgTRUE != F(tgPM_NAN)(fT0) && TgTRUE != F(tgPM_NAN)(fT1));

    *pvRT = V(F_NMS_SVV)( fT0, psET1->m_avEdge + 0, &vX0 );
}


/* ---- V(tgGM_ET_Reset) ------------------------------------------------------------------------------------------------------------------------------------------------ */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Reset)( V(PCU_TgETRI) psET0 )
{
    V(tgGM_PT_Reset)( &psET0->m_sPT );

    psET0->m_avEdge[0] = V(FS_SETV)( MKL(0.0), MKL(0.0), MKL(0.0) );
    psET0->m_avEdge[1] = V(FS_SETV)( MKL(0.0), MKL(0.0), MKL(0.0) );
    psET0->m_avEdge[2] = V(FS_SETV)( MKL(0.0), MKL(0.0), MKL(0.0) );
}


/* ---- V(tgGM_ET_Area) ------------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TYPE V(tgGM_ET_Area)( V(CPCU_TgETRI) psET1 )
{
    V(C_TgVEC)                          vX0 = V(F_CX)( psET1->m_avEdge + 0, psET1->m_avEdge + 2 );

    TgGEOM_ASSERT_PARAM(TgTRUE == V(tgGM_ET_Is_Valid)(psET1));

    return (MKL(0.5) * V(F_LEN)( &vX0) );
}


/* ---- V(tgGM_ET_BA) --------------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_BA)( V(PCU_TgBOXAA) psBA0, V(CPCU_TgETRI) psET1 )
{
    V(tgGM_PT_BA)( psBA0, &psET1->m_sPT );
}


/* ---- V(tgGM_ET_Sweep_BA) --------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Sweep_BA)( V(PCU_TgBOXAA) psBA0, V(CPCU_TgETRI) psET1, V(CPCU_TgVEC) pvDT )
{
    V(tgGM_ET_BA)( psBA0, psET1 );
    V(tgGM_BA_Sweep)( psBA0, pvDT );
}


/* ---- V(tgGM_ET_Project) ---------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Project)( PCU_TYPE fMin, PCU_TYPE fMax, V(CPCU_TgETRI) psET1, V(CPCU_TgVEC) pvDN )
{
    V(tgGM_PT_Project)( fMin, fMax, &psET1->m_sPT, pvDN );
}


/* ---- V(tgGM_ET_Is_Contained) ----------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgBOOL V(tgGM_ET_Is_Contained)( V(CPCU_TgETRI) psET1, V(CPCU_TgVEC) pvS0 )
{
    V(C_TgVEC)                          tvDT = V(F_SUB)( pvS0, psET1->m_sPT.m_avPoint + 0 );
    V(C_TgVEC)                          vN0 = V(F_CX)( &psET1->m_sPT.m_vNormal, psET1->m_avEdge + 0 );
    V(C_TgVEC)                          vN1 = V(F_CX)( &psET1->m_sPT.m_vNormal, psET1->m_avEdge + 1 );
    V(C_TgVEC)                          tvN2 = V(F_CX)( &psET1->m_sPT.m_vNormal, psET1->m_avEdge + 2 );

    if ((V(F_DOT3)(&tvDT, &vN0) < MKL(0.0)) || (V(F_DOT3)(&tvDT, &tvN2) < MKL(0.0)))
    {
        return (TgFALSE);
    }
    else
    {
        V(C_TgVEC)                          vX0 = V(F_SUB)( &tvDT, psET1->m_avEdge + 0 );

        if (V(F_DOT3)(&vX0, &vN1) < MKL(0.0))
        {
            return (TgFALSE);
        };
    };

    return (TgTRUE);
}


/* ---- V(tgGM_ET_TX) --------------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_TX)( V(PCU_TgETRI) psET0, M34(CPCU_TgMAT) pxM0 )
{
    V(tgGM_PT_TX)( &psET0->m_sPT, pxM0 );
    psET0->m_avEdge[0] = M34(F_TX_V)( pxM0, psET0->m_avEdge + 0 );
    psET0->m_avEdge[1] = M34(F_TX_V)( pxM0, psET0->m_avEdge + 1 );
    psET0->m_avEdge[2] = M34(F_TX_V)( pxM0, psET0->m_avEdge + 2 );
}


/* ---- V(tgGM_ET_Copy_TX) ---------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Copy_TX)( V(PCU_TgETRI) psET0, V(CPCU_TgETRI) psET1, M34(CPCU_TgMAT) pxM0 )
{
    V(tgGM_PT_Copy_TX)( &psET0->m_sPT, &psET1->m_sPT, pxM0 );
    psET0->m_avEdge[0] = M34(F_TX_V)( pxM0, psET1->m_avEdge + 0 );
    psET0->m_avEdge[1] = M34(F_TX_V)( pxM0, psET1->m_avEdge + 1 );
    psET0->m_avEdge[2] = M34(F_TX_V)( pxM0, psET1->m_avEdge + 2 );
}


/* ---- V(tgGM_ET_Init_PN) ---------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Init_PN)( V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvS0, V(CPCU_TgVEC) pvS1, V(CPCU_TgVEC) pvS2, V(CPCU_TgVEC) pvN )
{
    V(tgGM_PT_Init_PN)( &psET0->m_sPT, pvS0, pvS1, pvS2, pvN );
    psET0->m_avEdge[0] = V(F_SUB)( pvS1, pvS0 );
    psET0->m_avEdge[1] = V(F_SUB)( pvS2, pvS1 );
    psET0->m_avEdge[2] = V(F_SUB)( pvS0, pvS2 );
}


/* ---- V(tgGM_ET_Init_P) ----------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Init_P)( V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvS0, V(CPCU_TgVEC) pvS1, V(CPCU_TgVEC) pvS2 )
{
    V(tgGM_PT_Init_P)( &psET0->m_sPT, pvS0, pvS1, pvS2 );
    psET0->m_avEdge[0] = V(F_SUB)( pvS1, pvS0 );
    psET0->m_avEdge[1] = V(F_SUB)( pvS2, pvS1 );
    psET0->m_avEdge[2] = V(F_SUB)( pvS0, pvS2 );
    V(tgGM_ET_Calc_Normal)( psET0 );
}


/* ---- V(tgGM_ET_Init_EN) ---------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Init_EN)(  V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvS0, V(CPCU_TgVEC) pvE0, V(CPCU_TgVEC) pvE1, V(CPCU_TgVEC) pvN )
{
    V(C_TgVEC)                          vX1 = V(F_ADD)( pvS0, pvE0 );
    V(C_TgVEC)                          vX2 = V(F_ADD)( pvS0, pvE1 );

    V(tgGM_PT_Init_PN)( &psET0->m_sPT, pvS0, &vX1, &vX2, pvN );
    psET0->m_avEdge[0] = *pvE0;
    psET0->m_avEdge[1] = V(F_SUB)( pvE1, pvE0 );
    psET0->m_avEdge[2] = V(F_NEG)( pvE1 );
}


/* ---- V(tgGM_ET_Init_E) ----------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Init_E)( V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvS0, V(CPCU_TgVEC) pvE0, V(CPCU_TgVEC) pvE1 )
{
    V(C_TgVEC)                          vX1 = V(F_ADD)( pvS0, pvE0 );
    V(C_TgVEC)                          vX2 = V(F_ADD)( pvS0, pvE1 );

    V(tgGM_PT_Init_P)( &psET0->m_sPT, pvS0, &vX1, &vX2 );
    psET0->m_avEdge[0] = *pvE0;
    psET0->m_avEdge[1] = V(F_SUB)( pvE1, pvE0 );
    psET0->m_avEdge[2] = V(F_NEG)( pvE1 );
}


/* ---- V(tgGM_PT_ET_Init) ---------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_PT_ET_Init)( V(PCU_TgETRI) psET0, V(CPCU_TgPTRI) psPT1 )
{
    V(tgGM_ET_Init_PN)( psET0, psPT1->m_avPoint + 0, psPT1->m_avPoint + 1, psPT1->m_avPoint + 2, &psPT1->m_vNormal );
}


/* ---- V(tgGM_ET_Copy) ------------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Copy)( V(PCU_TgETRI) psET0, V(CPCU_TgETRI) psET1 )
{
    TgGEOM_ASSERT_PARAM(TgTRUE == V(tgGM_ET_Is_Valid)(psET1));

    V(tgGM_PT_Copy)( &psET0->m_sPT, &psET1->m_sPT );
    psET0->m_avEdge[0] = psET1->m_avEdge[0];
    psET0->m_avEdge[1] = psET1->m_avEdge[1];
    psET0->m_avEdge[2] = psET1->m_avEdge[2];
}


/* ---- V(tgGM_ET_Set_Origin) ------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Set_Origin)( V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvS0 )
{
    V(tgGM_PT_Set_Origin)( &psET0->m_sPT, pvS0 );
    psET0->m_avEdge[0] = V(F_SUB)( psET0->m_sPT.m_avPoint + 1, pvS0 );
    psET0->m_avEdge[2] = V(F_SUB)( pvS0, psET0->m_sPT.m_avPoint + 2 );
}


/* ---- V(tgGM_ET_Set_Point_0) ------------------------------------------------------------------------------------------------------------------------------------------ */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Set_Point_0)( V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvS0 )
{
    V(tgGM_PT_Set_Point_0)( &psET0->m_sPT, pvS0 );
    psET0->m_avEdge[0] = V(F_SUB)( psET0->m_sPT.m_avPoint + 1, pvS0 );
    psET0->m_avEdge[2] = V(F_SUB)( pvS0, psET0->m_sPT.m_avPoint + 2 );
}


/* ---- V(tgGM_ET_Set_Point_1) ------------------------------------------------------------------------------------------------------------------------------------------ */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Set_Point_1)( V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvS1 )
{
    V(tgGM_PT_Set_Point_1)( &psET0->m_sPT, pvS1 );
    psET0->m_avEdge[0] = V(F_SUB)( pvS1, psET0->m_sPT.m_avPoint + 0 );
    psET0->m_avEdge[1] = V(F_SUB)( psET0->m_sPT.m_avPoint + 2, pvS1 );
}


/* ---- V(tgGM_ET_Set_Point_2) ------------------------------------------------------------------------------------------------------------------------------------------ */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Set_Point_2)( V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvS2 )
{
    V(tgGM_PT_Set_Point_2)( &psET0->m_sPT, pvS2 );
    psET0->m_avEdge[1] = V(F_SUB)( pvS2, psET0->m_sPT.m_avPoint + 1 );
    psET0->m_avEdge[2] = V(F_SUB)( psET0->m_sPT.m_avPoint + 0, pvS2 );
}


/* ---- V(tgGM_ET_Set_Edge_0) ------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Set_Edge_0)( V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvE0 )
{
    TgGEOM_ASSERT_PARAM(TgTRUE == V(F_Is_Vector_Valid)(pvE0));

    psET0->m_sPT.m_avPoint[1] = V(F_ADD)( psET0->m_sPT.m_avPoint + 0, pvE0 );
    psET0->m_avEdge[0] = *pvE0;
    psET0->m_avEdge[1] = V(F_SUB)( psET0->m_sPT.m_avPoint + 2, psET0->m_sPT.m_avPoint + 1 );
    V(tgGM_ET_Calc_Normal)( psET0 );
}


/* ---- V(tgGM_ET_Set_Edge_1) ------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Set_Edge_1)( V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvE1 )
{
    TgGEOM_ASSERT_PARAM(TgTRUE == V(F_Is_Vector_Valid)(pvE1));

    psET0->m_sPT.m_avPoint[2] = V(F_ADD)( psET0->m_sPT.m_avPoint + 1, pvE1 );
    psET0->m_avEdge[1] = *pvE1;
    psET0->m_avEdge[2] = V(F_SUB)( psET0->m_sPT.m_avPoint + 0, psET0->m_sPT.m_avPoint + 2 );
    V(tgGM_ET_Calc_Normal)( psET0 );
}


/* ---- V(tgGM_ET_Set_Edge_2) ------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Set_Edge_2)( V(PCU_TgETRI) psET0, V(CPCU_TgVEC) pvE2 )
{
    TgGEOM_ASSERT_PARAM(TgTRUE == V(F_Is_Vector_Valid)(pvE2));

    psET0->m_sPT.m_avPoint[0] = V(F_ADD)( psET0->m_sPT.m_avPoint + 2, pvE2 );
    psET0->m_avEdge[0] = V(F_SUB)( psET0->m_sPT.m_avPoint + 1, psET0->m_sPT.m_avPoint + 0 );
    psET0->m_avEdge[2] = *pvE2;
    V(tgGM_ET_Calc_Normal)( psET0 );
}


/* ---- V(tgGM_ET_Query_Origin) ----------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgVEC) V(tgGM_ET_Query_Origin)( V(CPCU_TgETRI) psET1 )
{
    return (psET1->m_sPT.m_avPoint + 0);
}


/* ---- V(tgGM_ET_Query_Normal) ----------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgVEC) V(tgGM_ET_Query_Normal)( V(CPCU_TgETRI) psET1 )
{
    return (&psET1->m_sPT.m_vNormal);
}


/* ---- V(tgGM_ET_Query_Point_0) ---------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgVEC) V(tgGM_ET_Query_Point_0)( V(CPCU_TgETRI) psET1 )
{
    return (psET1->m_sPT.m_avPoint + 0);
}


/* ---- V(tgGM_ET_Query_Point_1) ---------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgVEC) V(tgGM_ET_Query_Point_1)( V(CPCU_TgETRI) psET1 )
{
    return (psET1->m_sPT.m_avPoint + 1);
}


/* ---- V(tgGM_ET_Query_Point_2) ---------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgVEC) V(tgGM_ET_Query_Point_2)( V(CPCU_TgETRI) psET1 )
{
    return (psET1->m_sPT.m_avPoint + 2);
}


/* ---- V(tgGM_ET_Query_Point) ------------------------------------------------------------------------------------------------------------------------------------------ */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgVEC) V(tgGM_ET_Query_Point)( V(CPCU_TgETRI) psET1, C_TgSINT32 iIndex )
{
    TgGEOM_ASSERT_PARAM(iIndex >= 0 && iIndex <= 2);
    return (psET1->m_sPT.m_avPoint + iIndex);
}


/* ---- V(tgGM_ET_Query_Edge_0) ----------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgVEC) V(tgGM_ET_Query_Edge_0)( V(CPCU_TgETRI) psET1 )
{
    return (psET1->m_avEdge + 0);
}


/* ---- V(tgGM_ET_Query_Edge_1) ----------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgVEC) V(tgGM_ET_Query_Edge_1)( V(CPCU_TgETRI) psET1 )
{
    return (psET1->m_avEdge + 1);
}


/* ---- V(tgGM_ET_Query_Edge_2) ----------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgVEC) V(tgGM_ET_Query_Edge_2)( V(CPCU_TgETRI) psET1 )
{
    return (psET1->m_avEdge + 2);
}


/* ---- V(tgGM_ET_Query_Edge) ------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgVEC) V(tgGM_ET_Query_Edge)( V(CPCU_TgETRI) psET1, C_TgSINT32 iIndex )
{
    TgGEOM_ASSERT_PARAM(iIndex >= 0 && iIndex <= 2);
    return (psET1->m_avEdge + iIndex);
}


/* ---- V(tgGM_PT_ET_Query) --------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE V(CP_TgPTRI) V(tgGM_PT_ET_Query)( V(CPCU_TgETRI) psET1 )
{
    return (&psET1->m_sPT);
}


#if defined(TgCOMPILE_NATIVE_VECTOR)

/* ---- V(tgGM_ET_M_TX) ------------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_M_TX)( V(PCU_TgETRI) psET0, M34(CPCU_TgMAT) pxM0 )
{
    V(tgGM_PT_M_TX)( &psET0->m_sPT, pxM0 );
    psET0->m_avEdge[0].m_mData = M34(M_TX_V)( pxM0, psET0->m_avEdge[0].m_mData );
    psET0->m_avEdge[1].m_mData = M34(M_TX_V)( pxM0, psET0->m_avEdge[1].m_mData );
    psET0->m_avEdge[2].m_mData = M34(M_TX_V)( pxM0, psET0->m_avEdge[2].m_mData );
}


/* ---- V(tgGM_ET_Copy_M_TX) -------------------------------------------------------------------------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
TgINLINE TgVOID V(tgGM_ET_Copy_M_TX)( V(PCU_TgETRI) psET0, V(CPCU_TgETRI) psET1, M34(CPCU_TgMAT) pxM0 )
{
    V(tgGM_PT_Copy_M_TX)( &psET0->m_sPT, &psET1->m_sPT, pxM0 );
    psET0->m_avEdge[0].m_mData = M34(M_TX_V)( pxM0, psET1->m_avEdge[0].m_mData );
    psET0->m_avEdge[1].m_mData = M34(M_TX_V)( pxM0, psET1->m_avEdge[1].m_mData );
    psET0->m_avEdge[2].m_mData = M34(M_TX_V)( pxM0, psET1->m_avEdge[2].m_mData );
}

/*# defined(TgCOMPILE_NATIVE_VECTOR) */
#endif