"Chris R" <car### [at] comcastnet> wrote:
> Thank you, as usual you are a wealth of information!
Well, I've gotten sucked into doing a lot of projects, and biting deeply into
topics which were a LOT to chew on, and just about over my head at the time I
started on them. I just know things because I've done just about everything
wrong at some point and everyone here helped explain the problem and point me in
the right direction.
> Just to be clear, I am writing java code for an external tool that will generate
> text files containing the SDL for mesh2 objects, (the way Arbaro works). So
> the meshes will definitely be written to disk and not need to be manually
> recreated every time you render the scene.
I've tested my normal calculations with a tetrahedron, cube, octahedron, and
icosahedron. I have macros to check handedness of the triangle vertex order,
correct wrong ones, and calculate face normals that always point outward.
Works in all eight octants.
I have yet to make / test a concave mesh, and some code may be superfluous,
while other parts may need a bit of extra checking.
Definitely had a few bonehead mistakes and head-scratchers that I managed to
experiment my way out of along the way.
I'm sure there's still lots more to learn if I get around to testing any of this
on a more complicated mesh like the bunny, buddha, dragon, etc.
Unlike jr, I'm terrible with data structures, so I have no idea how to go about
efficiently checking for holes, duplicates, etc.
Post a reply to this message
Download 'surfacenormals.png' (58 KB)
Preview of image 'surfacenormals.png'