Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Common - Geometry 3D - Box - Axis Aligned.h_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 ============================================================================================================================================================ */

TgINLINE TgBOOL                                 V(tgGM_BA_Is_Empty)( V(CPCU_TgBOXAA) );
TgINLINE TgVOID                                 V(tgGM_BA_Union_PT)( V(PCU_TgBOXAA), V(CPCU_TgVEC) );
TgINLINE TgVOID                                 V(tgGM_BA_Union_SP)( V(PCU_TgBOXAA), V(CPCU_TgVEC), const TYPE );
TgINLINE TgVOID                                 V(tgGM_BA_Union_BA)( V(PCU_TgBOXAA), V(CPCU_TgBOXAA) );
TgINLINE TgVOID                                 V(tgGM_BA_Sweep)( V(PCU_TgBOXAA), V(CPCU_TgVEC) );
TgINLINE TgVOID                                 V(tgGM_BA_Expand)( V(PCU_TgBOXAA), const TYPE ); /*« Extend by scalar along each direction. */
TgINLINE TgVOID                                 V(tgGM_BA_Scale)( V(PCU_TgBOXAA), const TYPE ); /*« Scale the size of the box by scalar. */
TgINLINE V(TgVEC)                               V(tgGM_BA_Query_Centre)( V(CPCU_TgBOXAA) );

TgINLINE TgVOID                                 V(tgGM_BA_Reset)( V(PCU_TgBOXAA) ); /*« Releases all memory, and initializes object. */
TgINLINE TgVOID                                 V(tgGM_BA_Zero)( V(PCU_TgBOXAA) );
TgINLINE TgBOOL                                 V(tgGM_BA_Is_Valid)( V(CPCU_TgBOXAA) );
TgINLINE V(TgVEC)                               V(tgGM_BA_Support_Point)( V(CPCU_TgBOXAA), V(CPCU_TgVEC) );
TgINLINE TYPE                                   V(tgGM_BA_Volume)( V(CPCU_TgBOXAA) );
TgINLINE TYPE                                   V(tgGM_BA_Area)( V(CPCU_TgBOXAA) );
TgINLINE TgVOID                                 V(tgGM_BA_BA)( V(PCU_TgBOXAA), V(CPCU_TgBOXAA) );
TgINLINE TgVOID                                 V(tgGM_BA_Sweep_BA)( V(PCU_TgBOXAA), V(CPCU_TgBOXAA), V(CPCU_TgVEC) );
TgINLINE TgVOID                                 V(tgGM_BA_Project)( PCU_TYPE, PCU_TYPE, V(CPCU_TgBOXAA), V(CPCU_TgVEC) );
TgINLINE TgBOOL                                 V(tgGM_BA_Is_Contained)( V(CPCU_TgBOXAA), V(CPCU_TgVEC) );
TgINLINE TgVOID                                 V(tgGM_BA_TX)( V(PCU_TgBOXAA), M34(CPCU_TgMAT) );
TgINLINE TgVOID                                 V(tgGM_BA_Copy_TX)( V(PCU_TgBOXAA), V(CPCU_TgBOXAA), M34(CPCU_TgMAT) );

TgINLINE TgVOID                                 V(tgGM_BA_Init)( V(PCU_TgBOXAA), V(CPCU_TgVEC), V(CPCU_TgVEC) ); /*« Min and Max */
TgINLINE TgVOID                                 V(tgGM_BA_Init_PT)( V(PCU_TgBOXAA), V(CPCU_TgVEC) ); /*« Single Point */
TgINLINE TgVOID                                 V(tgGM_BA_Init_SP)( V(PCU_TgBOXAA), V(CPCU_TgVEC), const TYPE ); /*« Single Point and Radius */
TgINLINE TgVOID                                 V(tgGM_BA_Copy)( V(PCU_TgBOXAA), V(CPCU_TgBOXAA) );
TgINLINE TgVOID                                 V(tgGM_BA_Set_Invalid)( V(PCU_TgBOXAA) );
TgINLINE TgVOID                                 V(tgGM_BA_Set_Min)( V(PCU_TgBOXAA), V(CPCU_TgVEC) );
TgINLINE TgVOID                                 V(tgGM_BA_Set_Max)( V(PCU_TgBOXAA), V(CPCU_TgVEC) );
TgINLINE TgVOID                                 V(tgGM_BA_Set_MinX)( V(PCU_TgBOXAA), const TYPE );
TgINLINE TgVOID                                 V(tgGM_BA_Set_MinY)( V(PCU_TgBOXAA), const TYPE );
TgINLINE TgVOID                                 V(tgGM_BA_Set_MinZ)( V(PCU_TgBOXAA), const TYPE );
TgINLINE TgVOID                                 V(tgGM_BA_Set_MaxX)( V(PCU_TgBOXAA), const TYPE );
TgINLINE TgVOID                                 V(tgGM_BA_Set_MaxY)( V(PCU_TgBOXAA), const TYPE );
TgINLINE TgVOID                                 V(tgGM_BA_Set_MaxZ)( V(PCU_TgBOXAA), const TYPE );

TgINLINE V(CP_TgVEC)                            V(tgGM_BA_Query_Min)( V(CPCU_TgBOXAA) );
TgINLINE V(CP_TgVEC)                            V(tgGM_BA_Query_Max)( V(CPCU_TgBOXAA) );
TgINLINE TYPE                                   V(tgGM_BA_Query_MinX)( V(CPCU_TgBOXAA) );
TgINLINE TYPE                                   V(tgGM_BA_Query_MinY)( V(CPCU_TgBOXAA) );
TgINLINE TYPE                                   V(tgGM_BA_Query_MinZ)( V(CPCU_TgBOXAA) );
TgINLINE TYPE                                   V(tgGM_BA_Query_MaxX)( V(CPCU_TgBOXAA) );
TgINLINE TYPE                                   V(tgGM_BA_Query_MaxY)( V(CPCU_TgBOXAA) );
TgINLINE TYPE                                   V(tgGM_BA_Query_MaxZ)( V(CPCU_TgBOXAA) );
TgINLINE TYPE                                   V(tgGM_BA_Query_SizeX)( V(CPCU_TgBOXAA) );
TgINLINE TYPE                                   V(tgGM_BA_Query_SizeY)( V(CPCU_TgBOXAA) );
TgINLINE TYPE                                   V(tgGM_BA_Query_SizeZ)( V(CPCU_TgBOXAA) );