3D Collision Detection
  In the last project, Condenado, the people ask me about the collision detection. Now Sorgo I.D. makes a universal function   to all programming language. In this document I explaining to your.
 All 3D objects are made by triangles, in this easy function your need input the triangles vertex and the vector origin                  and direction, the function returns the collision coordinates.
 Firs your need define on the function head the parameters that not are define in the body function, the parameters are:
 To input
  VO.x, VO.y, VO.z -Origin Vector Coordinates.
  VD.x, VD.y, VD.z  -Direction Vector Coordinates.

  VE1.x, VE1.y, VE1.z  -Triangle vertex coordinate.
  VE2.x, VE2.y, VE2.z  -Triangle vertex coordinate.               
  VE3.x, VE3.y, VE3.z  -Triangle vertex coordinate.           

 To output
  ve11.x, ve11.y, ve11.z  -To returns point collision values.

Collision Simple
. .
Collision multiple
The vector is only a infinite line section, is possible that the vector orientation across 2 or more triangles if your have multiple objects .The function only return the last coordinate intersection.

Remember ,to have a vector only needs a star position and a vector direction, the use possibilities are infinites.

. .
  The body function:

       R1,R2,R3,L1,L2,L3,LR,NL,TL // Define this variables to type FLOAT, for better  Precision.

       R1=((VE2.y - VE1.y)*(VE3.z - VE1.z)) ((VE2.z - VE1.z)*(VE3.y VE1.y))
       R2=((VE2.x - VE1.x)*(VE3.z - VE1.z)) ((VE2.z - VE1.z)*(VE3.x VE1.x))
       R3=((VE2.x - VE1.x)*(VE3.y - VE1.y)) ((VE2.y - VE1.y)*(VE3.x VE1.x))

       L1=(VD.x VO.x)
       L3=(VD.y VO.y)
       L3=(VD.z VO.z)

       LR=(R1*L1) (R2*L2) + (R3*L3)
       NL=(R1*(VO.x - VE1.x)) (R2*(VO.y VE1.y)) + (R3*(VO.z VE1.z))


       ve11.x=VO.x + TL*(L1)
       ve11.y=VO.y + TL*(L2)
       ve11.z=VO.z + TL*(L3)

  I hope you like this function .

by Necro  

Warning: include(../../sorgonetcounter.php): failed to open stream: No such file or directory in /home/content/66/4455066/html/directx/collision/index.php on line 139

Warning: include(): Failed opening '../../sorgonetcounter.php' for inclusion (include_path='.:/usr/local/php5_6/lib/php') in /home/content/66/4455066/html/directx/collision/index.php on line 139

Fatal error: Call to undefined function SumarVisita() in /home/content/66/4455066/html/directx/collision/index.php on line 140