Home

Resume

Blog

Teikitu


Teikitu Gaming System
Collision [Untested]

Intersection \ Distance Tests

  PT PC LN RY SG CI DK EL PM PN RT XT BA BX CA CY MH SP TR TU  
      X X X X X   X X X X X X X     X     PT
                                          PC
PT     X X X X     X X X X   X X     X     LN
PC       X X X     X X X X   X X     X     RY
LN         X X     X X X X   X X     X     SG
RY                                         CI
SG                                         DK
CI                                         EL
DK                 X   X                   PM
EL                         X X X     X     PN
PM                     X X                 RT
PN     X X X                   X     X     XT
RT                         X         X     BA
XT     X X X                         X     BX
BA                             X           CA
BX                                         CY
CA     X X X                               MH
CY     X X X                         X     SP
MH                                         TR
SP     X X X                               TU
TR                                          
TU     X X X                                

Sweep \ Penetration Tests

  PT PC LN RY SG CI DK EL PM PN RT XT BA BX CA CY MH SP TR TU  
                              X     X     PT
                                          PC
PT                             X     X     LN
PC                             X     X     RY
LN                             X     X     SG
RY                                         CI
SG                                         DK
CI                                         EL
DK                                         PM
EL                           X X X   X     PN
PM                                         RT
PN                           X X X   X     XT
RT                                         BA
XT   X                   X       X   X     BX
BA                             X           CA
BX                       X           X     CY
CA                                         MH
CY                                   X     SP
MH                                         TR
SP X   X X X         X   X           X     TU
TR                                          
TU                                          

Each source file (.c_inc) contains the mathematical development for the corresponding collision routine, as time permitted.  This should help in understanding the implementation as well as allow for verification of the results.

The nomenclature for the functions can be daunting at first but I promise you that it is fairly simple and logical once the core syntax is understood. For reasons that would bore you, I tend to use a short naming convention using an abbreviated Hungarian notation.


Coding Standards (type and variable nomenclature)
Toggle further information



Main



WARNING: I have not had time yet to verify the accuracy of these routines. Please report any issues - and I will quickly remedy the issue.


Linear

View Derivation

Circle

View Derivation

TgS Collision - F - Circle.h_inc

Disk

View Derivation

TgS Collision - F - Disk.h_inc

TgS Collision - F - Disk-Point.i_inc

Parallelogram

View Derivation

TgS Collision - F - Parallelogram.h_inc

Plane

View Derivation

TgS Collision - F - Plane.h_inc

TgS Collision - F - Plane.c_inc

Rectangle

View Derivation

TgS Collision - F - Rectangle.h_inc

Triangle

View Derivation

TgS Collision - F - Triangle.h_inc

Convex

View Derivation

Box

View Derivation

TgS Collision - F - Box.h_inc

Box, Axis-Aligned

View Derivation

TgS Collision - F - Box - AA.h_inc

Capsule

View Derivation

TgS Collision - F - Capsule.h_inc

Cylinder

View Derivation

TgS Collision - F - Cylinder.h_inc

Sphere

View Derivation

TgS Collision - F - Sphere.h_inc

Tube

View Derivation

TgS Collision - F - Tube.h_inc



  I came to collision with a very solid mathematical background but with little actual experience in the field. The following are some of the books and web sites I used to help educate myself and to pick up methods and systems to approach a collision problem. They are all useful – however, in looking at actual implementation care must be taken since many of them are either inaccurate or simply faulty.

  Real-Time Rendering: ISBN 1568811829. This is one of the "bibles" I use when working. It is a very complete and thorough discussion on rendering and associated technologies. They keep an active page on intersection tests at www.realtimerendering.com/int

  Geometric Tools: ISBN 1558605940. David Eberly has written a few works on collision and game engine technology. I find this work to be the best since it its both exhaustive in regards to most regular geometric forms – and most importantly – discusses the solution methods from a mathematical point of view. Thus, it is a great text book to teach yourself how to solve similar problems – and the different solution techniques available. I found the strictly mathematically solutions to be correct –however, the short cuts taken sometimes proved to be wrong. Look at it as a teaching aid – not the absolute truth to finding a solution to a problem. Current source – the current implementation of his own engine project – and a list of his other books can all be found at: www.geometrictools.com