Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualxlope01

Posted 10 September 2013 - 12:27 PM

Based on this tutorial I have try to make it work with triangles with no success.

this tutorial is demonstrating how to how to do picking on the a sphere, so in theory if i take the rayOrigin and rayDirection can work with a  triangle.(without the MatrixTranslation for the center of the sphere), but don't because something needs to be changed regarding the rayOrigin / rayDirection.

all i want is to get the intersection point on the triangle.
 

struct triangle {
        D3DXVECTOR3 V0;
        D3DXVECTOR3 V1;
        D3DXVECTOR3 V2;
    };
struct Ray {
            D3DXVECTOR3 P0;
            D3DXVECTOR3 P1;
    };
...
intersect3D_RayTriangle(Ray, triangle, out intersection point);//this method works fine, if you don't put the ray data that comes from this tutorial

 


#1xlope01

Posted 10 September 2013 - 12:26 PM

Based on this tutorial I have try to make it work with triangles with no success.

this tutorial is demonstrating how to how to do picking on the a sphere, so in theory if i take the rayOrigin and rayDirection can work with a  triangle.(without the MatrixTranslation for the center of the sphere), but don't because something needs to be changed regarding rayOrigin / rayDirection.

all i want is to get the intersection point on the triangle.
 

struct triangle {
        D3DXVECTOR3 V0;
        D3DXVECTOR3 V1;
        D3DXVECTOR3 V2;
    };
struct Ray {
            D3DXVECTOR3 P0;
            D3DXVECTOR3 P1;
    };
...
intersect3D_RayTriangle(Ray, triangle, out intersection point);//this method works fine, if you don't put the ray data that comes from this tutorial


 


PARTNERS