Entity flatness

Blitz3D Forums/Blitz3D Programming/Entity flatness

Picklesworth(Posted 2004) [#1]
The paper discussion in OT reminded me of this little problem I have :)

I am trying to make a function that decides whether or not an entity will work as a convex hull, because the convex hull program doesn't like flat meshes and the bloody user never remembers this. So basically, it decides if a mesh is flat (regardless of its angle, etc.).

So, here is my function which doesn't work:


Sorry, there aren't many comments, but the debuglog entries help a bit.

I also haven't looked at this code recently and I sort of gave up halfway through so that's my early excuse for any stupid mistakes.

So, do you have a better way to do this or a way to fix this function?


Picklesworth(Posted 2004) [#2]
If you don't know, say 'no' so that I know that this post was useless (but don't say 'no' if it's a dead post when you read this)


Beaker(Posted 2004) [#3]
I would contruct a plane from every triangle, and then check every vert against each plane. If a vert is 'above' a plane (or on the plane maybe in your case) then the object is concave.

Is that what you want?


Picklesworth(Posted 2004) [#4]
Sorry, I'm not entirely sure what you mean, Beaker...