Dear developer:
In my project, there are 6 shapes. And I try to detect the collide sitituaiton in animation. One shape is fixed, and other shapes are keep moving. Each shape have a BVH_Box. After shapes moved, I don't want to recompute the shape's BVH, the cost is expensive. I want to apply the gp_Trsf of the shape to change the postion of BVH_Box. Is this can do? If yes, how?
Discussion
2 archived replies
Posts are displayed in their archived order.
01Commenter-1
BVH_Box defines an Axes-Aligned Bounding Box (AABB). Transformed AABB could be computed as new AABB based on transformed 8 corners of original AABB (see Bnd_Box::Transformed(), for example) - it is not the same as computing AABB from shape at new location (transformed AABB will be larger and less efficient.
Normally, one would not transform AABB or BVH, but rather implement traverse that would consider transformation in traversal math.