[Closed] getVertUsingFace for indexing
Hey guys, i working on a simple maxscript exporter, and i was seeing some discrepancies in my output when compared to a collada file.
My biggest issue so far, is the face indexing.
For example, if i do it straight up, go through the face list, and give me the verts of a plane…i get
0 1 3 0 2 3 – i have subtracted 1 here because i need zero based not 1 based
but collada gets this
0 1 3 3 2 0…
i would assume its something with the whole clockwise placement etc. But since max spits this out as a bit array, i’m not getting the correct order i believe, because everything is always spit out lowest to highest.
Does someone have a solution ?
Thanks.
Yes, bitarrays are always sorted due to the way the work (the position of the true bits defines the indexing).
If you read the faces one by one, you won’t have the problem. getFace() returns a Point3 value where the .x, .y and .z components contain the vertex indices, in the correct CCW order. No need for bitarrays, no problems with sorting.