Need to pull this down and test, but otherwise mostly stylistic / small comments.
Do we also need to check for factors[i] == 0.0f
and set r_distances
accordingly?
Probably worth adding the same asserts as above to this function
Do we have a better explanation for what square means in this context?
temp
, area_co
, displace
, and area_co
can be moved to just above here
I think it's probably worth cleaning up some of these short names during this.
Might be worth modernizing the vectors and matricies here where we can
Not sure if we want to do this now or later, but maybe it's worth pulling these "write" functions out into a common helper? I don't see this particular block of calls changing much.
I think we should extract most of the code before here into a separate static
helper function that just returns the mat
, since most other variables just seem to be for temporary calculation.
Updated to use two separate vectors to try to make this a bit clearer, no real performance changes.