Hello,

about lib3ds_mesh_calculate_normals
Intresting place:

for (i=0; i<mesh->faces; ++i) {
   Lib3dsFace *f=&mesh->faceL[i];
   for (j=0; j<3; ++j) {
     // FIXME: static array needs at least check!!
   Lib3dsVector n,N[128]; // <- N[128] ???
////////////////////////////////////
First question: why 128???


And I have problem here(lib3ds_mesh_calculate_normals):

Here variable "k" can be more than 128

   if (!found) {
           if (f->smoothing & p->face->smoothing) {
             lib3ds_vector_add(n,n, p->face->normal);
       // on this line program fails... with memory
             lib3ds_vector_copy(N[k], p->face->normal);
             ++k;
           }
         }
Now, how to fix this I don't know,
because I can not understand why
128 used for the array size..
(To fix this array size should be known (maybe...))
Any solutions?
(I can send a sample 3ds file).

Tomas


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
lib3ds-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel

Reply via email to