Yes -- I am wanting to know if the four points lie on the same plane. It could be, by the naked eye, that you cannot see whether or not it is bending.
In Half-Life, you cannot have a concave bending of a face formed with 4+ vertexes. (With 3 points total, you can't have either.) If you were to make a face with a vertex at a point where you bend the face, you would have to split the face across where it bends so that the face is still valid (game engine will not accept the polygon otherwise).
^^ Pink face is the plane we're talking about
If you placed that plane flat on a table and lifted up any of the vertexes (one of them), you would be bending the face. Depending which vertex you would lift, that would also determine which pair of vertexes you would have to split the plane across (into 2 faces from that single face).
Dr Brain - Fri Jun 18, 2010 7:47 am
Post subject:
Concave is convex from the other side of the face, so you're going to have to be more explicit in your requirements.
You'll need a way to generate the normal vectors for the face. That comes about by specifying a point on the inside of the object, or by specifying the order of the vertices relative to the outside (clockwise or counterclockwise).
Samapico - Fri Jun 18, 2010 10:32 am
Post subject:
Oh right, I thought something was weird with 4 points too, but I couldn't see it for some reason...
And yeah, my next question would have went the same way as Brain: it depends from which side you're looking at it... Once you define a normal for both of your planes (a simple cross-product if your vertex are always in the same order, i.e. v1-v2 cross v2-v3 always gives you the normal, or the other way around)
And by v1-v2-v3 I'm speaking of the 3 vertex you choose to form a triangle.
Once you have 2 normals, it should be easy to figure out if the bend is convex or concave. If both normal vectors are pointing in each other's direction, it's concave, otherwise it's convex.
Something like that