Can someone please translate this code to C#. Can you also point me to where I can find documentation for Managed DX. Thanks!
D3DXVECTOR3 start(startx,starty,startz); // ray stop position
D3DXVECTOR3 stop(endx,endy,endz); // ray stop position
D3DXVECTOR3 ray = stop-start; // ray difference vector
// create infinite plane
D3DXPLANE vPlane;
D3DXPlaneFromPoints(&vPlane,
&D3DXVECTOR3(v0.x,v0.y,v0.z),
&D3DXVECTOR3(v1.x,v1.y,v1.z),
&D3DXVECTOR3(v2.x,v2.y,v2.z));
// infinite plane normal
D3DXVECTOR3 vPlaneNormal(vPlane.a,vPlane.b,vPlane.c);
if(D3DXVec3Dot(&vPlaneNormal,&ray)==0)
{
//nothing yet
} else {
float amount = -(D3DXPlaneDotCoord(&vPlane,&start))
/ D3DXVec3Dot(&vPlaneNormal,&ray);
D3DXVECTOR3 iPoint = start+(ray*amount);
}