Hello Marcus,

Marcus Goitowski wrote:
> I'm getting a "index out of range" exception in calcVertexTangents() on line
> 780 in OSGGeoFunctions.cpp.
> 
> [.]        
> // set value for every vertex
> int tanOffset = (imsize == 0) ? 0 : imsize-1;
> 
> for (k=0; k<3; ++k) 
> {
>     tangent[v[k]] += sdir; //<-- here
>     binormal[v[k]] += tdir;
>     normal[v[k]] = tI.getNormal(k);
>     ip->setValue(v[k], tI.getIndexIndex(k) + tanOffset); 
> }
> [.]
> 
> Maybe someone knows how to solve this.

can you share one of the models that cause this problem? There is 
perhaps some (implicit) assumption in the code that your models happen 
not satisfy, but without an example this is difficult to debug.
As far as I remember the VRML loader tends to produce multi indexed 
geometries and there might be a subtle bug in how they are handled. A 
possible workaround could be to call createSingleIndex() to remove the 
multi indexing.

        Cheers,
                Carsten

------------------------------------------------------------------------------
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to