Hi,
> In 3ds format every face has exactly three vertices, but because every 
> vertex can be shared between two or more faces, vertices are referenced 
> by their indices instead of their absolute x,y,z position.
> So we have:
> vector of vertices/points, in Your example:
>
>     for(int i=0;i<vertices.size();i++)
>     {
>         mesh->pointL[i].pos[0] = vertices[i].x;
>         mesh->pointL[i].pos[1] = vertices[i].y;
>         mesh->pointL[i].pos[2] = vertices[i].z;
>     }
>
>
> and vector of faces, in Your example:
>
>     for ( int j = 0; j < ( vertices.size() / 3 ); ++j )
>     {
>       int index = j * 3;
>         mesh->faceL[j].points[0] = index;
>         mesh->faceL[j].points[1] = index + 1;
>         mesh->faceL[j].points[2] = index + 2;
>     }
>
> I believe that should fix problem.
>   
thanks, im now able to read the files with sketchup.
> PS. It looks like Your geometry doesn't use vertices sharing or maybe 
> i'm wrong, i hope that this little info will help.
>   
the code was actually just a little test, to see if i get it working.
In the end i have trianglestrips that i have to write to 3ds.


Thanks, Johannes

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
lib3ds-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel

Reply via email to