• Advertisement

This topic is 1387 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

Given a plane with the vertices A, B, C, D, you can calculate the normal by taking any two connection vectors between those vertices, like AB and AC. You normalize those vectors, take the cross product, and thats your normal (which you probably want to normalize again, I can't remember for sure if this product is of uniform length). Also note that the choice and ordering of vectors in the cross-product equation are not totally arbitrary, as you might get the normal in the wrong direction. In that case, instead of e.g. AB x AC you switch to AC x AB. I'd recommend to try it out until someone gets around to put those things into definitie place (I always have a hard time remembering the theories behind that math stuff...

 

EDIT: Since you posted in graphics theory, you did mean a plane with 4 vertices and not a mathematical plane given the equation f(x) = a*x + b*x + c*x + d; right?

Edited by Juliean

Share this post


Link to post
Share on other sites


Those are called quads, not planes...

 

Ah, those damn math terms, gets me all the time. Though I'm pretty sure I remember having heard the term "plane" being used what is actually called a quad (in the context of graphics & programming), so twice the confusion! Seems I was right though due to OP, I quess good luck that I misread the term ;)

Share this post


Link to post
Share on other sites

You don't need to normalize the vectors before the cross product, the cross product will result in a vector in the normal direction of the plane anyway.

Share this post


Link to post
Share on other sites

Hi, thanks for all the help, let me make it simpler, maybe i understand it to then ?

 

Ok : i only rotate the plane/quad on 1 axis, else my collision detection algorithm does not work.

 

Maybe you guys can give now a simpler solution for me ?

thanks in advance

Edited by the incredible smoker

Share this post


Link to post
Share on other sites


Ok : i only rotate the plane/quad on 1 axis, else my collision detection algorithm does not work.

 

So you mean that the quad is locked around a certain axis, so that it only rotates around that very axis? In that case, wouldn't that axis already be the normal? Unless I don't understand your setup.

Share this post


Link to post
Share on other sites

Yeah, i only use pitch or yaw or roll or whatever its called, no combination of these.

( not that i realy use rotation, i do place the vertices in the right spot ofcourse )

 

I cannot figure out the collision detection otherwise, but thats not the problem now.

Edited by the incredible smoker

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement