More work for large worlds

This commit is contained in:
Wojtek Figat
2022-06-29 23:28:03 +02:00
parent 2cd244fbd3
commit 7ebdce5e42
11 changed files with 58 additions and 56 deletions

View File

@@ -3,6 +3,7 @@
#include "BoundingBox.h"
#include "BoundingSphere.h"
#include "Matrix.h"
#include "Transform.h"
#include "../Types/String.h"
const BoundingBox BoundingBox::Empty(Vector3(MAX_float), Vector3(MIN_float));
@@ -147,3 +148,11 @@ void BoundingBox::Transform(const BoundingBox& box, const Matrix& matrix, Boundi
result = FromPoints(corners, 8);
*/
}
void BoundingBox::Transform(const BoundingBox& box, const ::Transform& transform, BoundingBox& result)
{
// TODO: optimize it and support large worlds without using Matrix
Matrix matrix;
transform.GetWorld(matrix);
Transform(box, matrix, result);
}