🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
line-poly/line-line intersections...
How would I go about checking for line-line or line-poly intersections? This is for collision detection (only after checking for bounding sphere collisions of course). Detecting collisions between a line and polygon is my priority, but I also need line-line intersection for another 3D app with only 2D interaction.
Morgan
Thanks, Nate! By the way, your normals doc helped me out a lot, but I was surprised that you didn''t include the code for doing the cross product (not everybody knows this).
Morgan
Morgan
struct VERTEX
{
float x,y,z;
};
void crossproduct(VERTEX v1,VERTEX v2,VERTEX *dest)
{
dest->x = v1.y*v2.z - v1.z*v2.y;
dest->y = v1.z*v2.x - v1.x*v2.z;
dest->z = v1.x*v2.y - v1.y*v2.x;
}
I hope this helps you.
Visit our homepage: www.rarebyte.de.st
GA
Edited by - ga on May 21, 2000 5:53:44 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement