No that won&#39;t work. The structures are way too different. For instance edit mesh contains it&#39;s<div>data in a linked list which has forced me to make even more abstraction actually.</div><div>I did it this way to avoid having to allocate more memory yet at the same time</div>
<div>the implementation calculatenormal.c has full control.</div><div>We can change anything we want in there. Angle weighed, not angle weighted,</div><div>check for degenerate prims, whatever. Anything we might ever want to add or remove</div>
<div>from the method is now confined to one place which is a huge plus.</div><div>Even if we were to do the accumulation only it would still require most of the functions.</div><div>There are afterall big differences between the various mesh types.</div>
<div><br><br><div class="gmail_quote">On Tue, Mar 15, 2011 at 6:59 AM,  <span dir="ltr">&lt;<a href="mailto:brechtvanlommel@gmail.com">brechtvanlommel@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
To be honest, I don&#39;t like this SCalcNormalInterface at all, way too<br>
much code and abstraction.<br>
<br>
Why not simply keep the loops per mesh type, to clear vertex normals and<br>
normalize them, and then have one utility function that is used from all<br>
the face loop? Something like:<br>
<br>
void accumulate_vertex_normals(int nverts, const float verts[][3], float<br>
vnormals[][3], float fnormal[3]);<div><div></div><div class="h5"><br>
<br>
<a href="http://codereview.appspot.com/4280049/" target="_blank">http://codereview.appspot.com/4280049/</a><br>
</div></div></blockquote></div><br></div>