Hacker News new | past | comments | ask | show | jobs | submit login

> So I precompute all possible rotations of the BVHs (24 rotations)

24 times faster, or, as we say in algorithm analysis, no times faster!




I read it as though the rotations were expensive, so they were memoized. In this case, it really could be much more than 24 times faster.


O(cn) = O(n) I believe is what parent was getting at


Yep, I was making a (bad) joke on this.


oh, I was assuming that the time for the rotations was dependent on the size of the models, presumably in number of verts. This memoization would change the runtime.

E.g. if it was linear in that, then you would be going from O(mn) to O(m+n)


Right. I was doing a matrix transform on the AABB. I removed the need to do that by having a lookup table of already-rotated BVHs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: