[Bf-codereview] modeler normals don't match render normals (issue4280049)

Morten Mikkelsen mikkelsen7 at gmail.com
Tue Mar 15 15:10:45 CET 2011


No that won't work. The structures are way too different. For instance edit
mesh contains it's
data in a linked list which has forced me to make even more abstraction
actually.
I did it this way to avoid having to allocate more memory yet at the same
time
the implementation calculatenormal.c has full control.
We can change anything we want in there. Angle weighed, not angle weighted,
check for degenerate prims, whatever. Anything we might ever want to add or
remove
from the method is now confined to one place which is a huge plus.
Even if we were to do the accumulation only it would still require most of
the functions.
There are afterall big differences between the various mesh types.


On Tue, Mar 15, 2011 at 6:59 AM, <brechtvanlommel at gmail.com> wrote:

> To be honest, I don't like this SCalcNormalInterface at all, way too
> much code and abstraction.
>
> Why not simply keep the loops per mesh type, to clear vertex normals and
> normalize them, and then have one utility function that is used from all
> the face loop? Something like:
>
> void accumulate_vertex_normals(int nverts, const float verts[][3], float
> vnormals[][3], float fnormal[3]);
>
>
> http://codereview.appspot.com/4280049/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-codereview/attachments/20110315/9e69ef7d/attachment.htm 


More information about the Bf-codereview mailing list