Sorry, This is a line / triangle intersection in a 3D world (directx). Actually what I need to find out is the y position of a landscape at a given position for x and z. so I can place an object on the landscape. A landscape is simply a huge number of vertices. 3 vertices connected to eachother (triangle) form a face. So my thought was, if I make a vertical line with known x and z values and a low and high y value I should be able to find the y value of the landscape at intersection point.

I found this piece of code: http://www.angelfire.com/fl/houseofbartlett/solutions/line2tri.html#Code

But actually this is a bit more complex. I only have access to vertice positions. If I first search for the 3 vertices of which the x and z values are closest to the x and z values of the line and if I then check whether the line is inside the triangle formed by these 3 vertices, will it be certain that these 3 triangles do actualy form a face? I think not. I guess I will have to experiment with this and see how accurate it is in bumpy areas of the landscape.