The model's boundingBox seems to translate and scale with the Pyramid, but doesn't rotate at all. Is this purposefull (IE it is the programmer's responsibility to rotate the bounding box everytime I rotate a model) or is this a bug?
this isn’t a bug, nor can you rotate the boundingBox. The bounding box is AABB meaning is it an Axis Aligned Bounding Box. It is aligned to the major axis, not the model axis. Future versions will have a rotatable version, but that is harder to implement…etc
As DP said it’s AABB, so it’s limited in that respect. However, the box should grow to encompass the whole pyramid as it rotates. And I’m not sure if it does or not (I haven’t tested that yet). That is, even thought it’s AABB, as the pyramid rotates, the box should alter its size to keep encompassing the entire pyramid. If not, that’s a bug that will have to be fixed.
ok, the problem is, when the bounding box is calculated for a trimesh it is using the vertices of the trimesh. (It doesn’t look at the rotation of the node). So, when you rotate, the vertices are actually not changed, so the bounding box is not altered. So, we’ll have to allow the bounding volumes to take the orientation of the node into account when calculating the volume.