2006-08-0411:16 AM - last edited on 2023-08-0710:51 AM by Doreena Deng
I'm building a custom exporter for ArchiCAD 8.1 (using API Development Kit 5.1) and I'm having trouble getting the correct UV coordinates. I've been trying to use ACAPI_Goodies with APIAny_GetTextureCoordID to get the UV coordinates, but without much success.
The function takes a pointer to API_TexCoordPars and API_UVCoord. First struct specifies the body and polygon indeces and a surface point in local coordinate system.
So far what I've tried to do is:
Gather the vertices for the polygon in their local coordinate space (ie. without applying the body matrix to vertices), which are correct and verified
For each vertex, call the ACAPI_Goodies(APIAny_GetTextureCoordID, &txpars, &uv) where txpars is API_TexCoordPars filled with body and polygon indices and the vertex.
No errors happen, but the returned UV-coordinates are something other than they should be (like, really huge numbers).