Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Collision.h
    »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".                                                   */
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */

/* DEFINITION: PENETRATION TEST                                                                                                                                           */
/*  Returns the first point of contact, the normal of separation and the depth of the contact.                                                                            */
/*      Point of Contact - A point on the surface of object 1 that is suspected of being first point of contact.                                                          */
/*      Normal of Separation - The minimal direction which will separate the two bodies.                                                                                  */
/*      Depth - The minimal distance that will separate the two bodies.                                                                                                   */
/*      Concept: The values are such that if the point of contact is moved along the normal by the depth it will cause object 1 to be completely separated from object 0. */
/*               The resultant axis of separation would be the normal of penetration.  The object being moved to separate the two bodies is object 1.                     */

/* F_Sweep == First point and time of contact                                                                                                                             */
/* F_Intersect == All possible points of contact/interface (ie non-volume interactions)                                                                                   */
/* F_Penetrate == All possible points of contact with normal and depths ( ie. dual volume interactions )                                                                  */

#if !defined(TGS_COLLISION_H)
#define TGS_COLLISION_H
#pragma once

#define TGS_PLATFORM_COLLISION_H

#include "TgS COLLISION/TgS Collision - Constants.h"
#include "TgS COLLISION/TgS Collision - Type.h"


/* == Collision ========================================================================================================================================================= */

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Module Functions                                                                                                                                                      */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

TgEXTN TgRESULT                             tgCO_Module_Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgCO_Module_Boot( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgCO_Module_Stop( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgCO_Module_Free( TgVOID ); /* #IMPLEMENT */
TgEXTN TgRESULT                             tgCO_Module_Update( C_TgFLOAT32 ); /* #IMPLEMENT */

TgEXTN TgVOID                               tgCO_Load_Config( TgVOID ); /* #IMPLEMENT */
TgEXTN TgVOID                               tgCO_Save_Config( TgVOID ); /* #IMPLEMENT */

TgEXTN TgBOOL                               tgCO_Query_Init( TgVOID ); /* #IMPLEMENT */
TgEXTN TgBOOL                               tgCO_Query_Boot( TgVOID ); /* #IMPLEMENT */
TgEXTN TgSIZE                               tgCO_Query_Fixed_Memory( TgVOID ); /* #IMPLEMENT */


/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Collision Functions                                                                                                                                                   */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

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

#define TYPE TgFLOAT32
#define MKL(A) A##F
#define F(A) A##_F32
#define V(A) A##_F32_04
#define M34(A) A##_F32_34
#define M44(A) A##_F32_44

#include "TgS COLLISION/TgS Collision - F.h_inc"
#include "TgS COLLISION/TgS Collision - F.i_inc"

#undef M44
#undef M34
#undef V
#undef F
#undef MKL
#undef TYPE


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

#define TYPE TgFLOAT64
#define MKL(A) A
#define F(A) A##_F64
#define V(A) A##_F64_04
#define M34(A) A##_F64_34
#define M44(A) A##_F64_44

#include "TgS COLLISION/TgS Collision - F.h_inc"
#include "TgS COLLISION/TgS Collision - F.i_inc"

#undef M44
#undef M34
#undef V
#undef F
#undef MKL
#undef TYPE


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

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