03-30-2003, 06:13 PM

This is an easy one, I'm sure...maybe you guys can help me.

I've got my terrain represented as a linked list of triangles. I want to find out, using the coordinates of my moving object(car), which triangle it is inside of. So I want to traverse my list until I find the triangle that the car is in.

Do any of you guys know an equation or expression to represent this relationship? How can I tell if the car's (x,z) coordinates ly in the polygons area (triangle)?

This way, I can figure out what the Y coordinate of my car should be, which I don't have a problem doing. It's just figuring out which polygon (triangle) is in the region of the car.

I've got my terrain represented as a linked list of triangles. I want to find out, using the coordinates of my moving object(car), which triangle it is inside of. So I want to traverse my list until I find the triangle that the car is in.

Do any of you guys know an equation or expression to represent this relationship? How can I tell if the car's (x,z) coordinates ly in the polygons area (triangle)?

This way, I can figure out what the Y coordinate of my car should be, which I don't have a problem doing. It's just figuring out which polygon (triangle) is in the region of the car.