Home

Resume

Blog

Teikitu


// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //
//  »Project«   Teikitu Gaming System (TgS) (∂)
//  »File«      TgS Collision - F - Ray.h_inc
//  »Author«    Andrew Aye (EMail: mailto:andrew.aye@gmail.com, Web: http://www.andrewaye.com)
//  »Version«   4.0
//  »Keywords«  Collision;Distance;Closest;Intersect;Penetrate;Sweep;Ray;
// ------------------------------------------------------------------------------------------------------------------------------ //
//  Copyright: © 2002-2010, 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: 
//    Redistributions of source code must retain this copyright notice, this list of conditions and the following disclaimers. 
//    Redistributions 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. 
//  Neither the names of the copyright owner nor the names of its contributors may 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".
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //
// == Collision ================================================================================================================= //

// -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. //
//  Public Functions - Scalar Functions
// -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. //

// Ray - Point
TgINLINE TYPE                               V(tgCO_F_DistSq_RY_VT)( V(CPCU_TgRAY), V(CPCU_TgVEC) );
TgINLINE TYPE                               V(tgCO_F_Dist_RY_VT)( V(CPCU_TgRAY), V(CPCU_TgVEC) );
TgINLINE TYPE                               V(tgCO_F_ClosestSq_RY_VT)( V(PCU_TgVEC), V(CPCU_TgRAY), V(CPCU_TgVEC) );
TgINLINE TYPE                               V(tgCO_F_Closest_RY_VT)( V(PCU_TgVEC), V(CPCU_TgRAY), V(CPCU_TgVEC) );
TgINLINE TYPE                               V(tgCO_F_ParamSq_RY_VT)( PCU_TYPE, V(CPCU_TgRAY), V(CPCU_TgVEC) );
TgINLINE TYPE                               V(tgCO_F_Param_RY_VT)( PCU_TYPE, V(CPCU_TgRAY), V(CPCU_TgVEC) );
TgINLINE TYPE                               V(tgCO_F_ParamSq_LR10_VT)( PCU_TYPE, V(CPCU_TgVEC), V(CPCU_TgVEC), V(CPCU_TgVEC) );

// Ray - Line
TgINLINE TYPE                               V(tgCO_F_DistSq_RY_LN)( V(CPCU_TgRAY), V(CPCU_TgLINE) );
TgINLINE TYPE                               V(tgCO_F_Dist_RY_LN)( V(CPCU_TgRAY), V(CPCU_TgLINE) );
TgINLINE TYPE                               V(tgCO_F_ClosestSq_RY_LN)( V(PCU_TgVEC), V(PCU_TgVEC), V(CPCU_TgRAY), V(CPCU_TgLINE) );
TgINLINE TYPE                               V(tgCO_F_Closest_RY_LN)( V(PCU_TgVEC), V(PCU_TgVEC), V(CPCU_TgRAY), V(CPCU_TgLINE) );
TgINLINE TYPE                               V(tgCO_F_ParamSq_RY_LN)( PCU_TYPE, PCU_TYPE, V(CPCU_TgRAY), V(CPCU_TgLINE) );
TgINLINE TYPE                               V(tgCO_F_Param_RY_LN)( PCU_TYPE, PCU_TYPE, V(CPCU_TgRAY), V(CPCU_TgLINE) );
TgINLINE TgBOOL                             V(tgCO_F_Test_RY_LN)( V(CPCU_TgRAY), V(CPCU_TgLINE) );
extern TYPE                                 V(tgCO_F_ParamSq_LR10_LR00)(
                                                PCU_TYPE, PCU_TYPE, V(CPCU_TgVEC), V(CPCU_TgVEC), V(CPCU_TgVEC), V(CPCU_TgVEC) );

// Ray - Ray
TgINLINE TYPE                               V(tgCO_F_DistSq_RY_RY)( V(CPCU_TgRAY), V(CPCU_TgRAY) );
TgINLINE TYPE                               V(tgCO_F_Dist_RY_RY)( V(CPCU_TgRAY), V(CPCU_TgRAY) );
TgINLINE TYPE                               V(tgCO_F_ClosestSq_RY_RY)( V(PCU_TgVEC), V(PCU_TgVEC), V(CPCU_TgRAY), V(CPCU_TgRAY) );
TgINLINE TYPE                               V(tgCO_F_Closest_RY_RY)( V(PCU_TgVEC), V(PCU_TgVEC), V(CPCU_TgRAY), V(CPCU_TgRAY) );
TgINLINE TYPE                               V(tgCO_F_ParamSq_RY_RY)( PCU_TYPE, PCU_TYPE, V(CPCU_TgRAY), V(CPCU_TgRAY) );
TgINLINE TYPE                               V(tgCO_F_Param_RY_RY)( PCU_TYPE, PCU_TYPE, V(CPCU_TgRAY), V(CPCU_TgRAY) );
TgINLINE TgBOOL                             V(tgCO_F_Test_RY_RY)( V(CPCU_TgRAY), V(CPCU_TgRAY) );
extern TYPE                                 V(tgCO_F_ParamSq_LR10_LR10)(
                                                PCU_TYPE, PCU_TYPE, V(CPCU_TgVEC), V(CPCU_TgVEC), V(CPCU_TgVEC), V(CPCU_TgVEC) );

// Ray - Segment
TgINLINE TYPE                               V(tgCO_F_DistSq_RY_SG)( V(CPCU_TgRAY), V(CPCU_TgSEGMENT) );
TgINLINE TYPE                               V(tgCO_F_Dist_RY_SG)( V(CPCU_TgRAY), V(CPCU_TgSEGMENT) );
TgINLINE TYPE                               V(tgCO_F_ClosestSq_RY_SG)( V(PCU_TgVEC), V(PCU_TgVEC), V(CPCU_TgRAY), V(CPCU_TgSEGMENT) );
TgINLINE TYPE                               V(tgCO_F_Closest_RY_SG)( V(PCU_TgVEC), V(PCU_TgVEC), V(CPCU_TgRAY), V(CPCU_TgSEGMENT) );
TgINLINE TYPE                               V(tgCO_F_ParamSq_RY_SG)( PCU_TYPE, PCU_TYPE, V(CPCU_TgRAY), V(CPCU_TgSEGMENT) );
TgINLINE TYPE                               V(tgCO_F_Param_RY_SG)( PCU_TYPE, PCU_TYPE, V(CPCU_TgRAY), V(CPCU_TgSEGMENT) );
TgINLINE TgBOOL                             V(tgCO_F_Test_RY_SG)( V(CPCU_TgRAY), V(CPCU_TgSEGMENT) );
extern TYPE                                 V(tgCO_F_ParamSq_LR10_LR11)(
                                                PCU_TYPE, PCU_TYPE, V(CPCU_TgVEC), V(CPCU_TgVEC), V(CPCU_TgVEC), V(CPCU_TgVEC) );