Maya and STL – Connected vertices done right

Intro For the third and last part1)I do have an idea for an optimization related addendum to this though, so I might be lying here, there might be a part 3.5 of the whole STL thing, of which you can find the previous part here, we’re going to finally look at actually using STL instead of Maya arrays, why, and what the benefits will be. This is probably the most practically useful part, and ironically also the shortest. The whole point being made is, after all, that using STL will save you time. Enough time that there won’t be much code to it2)fluff will therefore be added freely to inspire further reading on your side!.   Neighborhood cache The first thing to look at is multi-dimensional containers. Maya does have some containers that are actually 2D containers. MPointArray, MVectorArray and so on are actually 2D Arrays of a fixed width under the hood. What Maya doesn’t provide that STL does however is arbitrary containers of anything of arbitrary dimensions3)you can work around this by using plain arrays of pointers to Maya arrays that are manually allocated on the free store, but then you also have to take care of manually … Continue Reading →