Minor fixes

This commit is contained in:
SirLynix
2023-11-26 11:25:52 +01:00
parent 1ac992b5c7
commit 2622951144
13 changed files with 68 additions and 84 deletions

View File

@@ -23,9 +23,9 @@ namespace Nz
{
public:
constexpr BoundingVolume();
constexpr BoundingVolume(Extent Extend);
constexpr BoundingVolume(const Box<T>& box);
constexpr BoundingVolume(const OrientedBox<T>& orientedBox);
constexpr explicit BoundingVolume(Extent Extend);
constexpr explicit BoundingVolume(const Box<T>& box);
constexpr explicit BoundingVolume(const OrientedBox<T>& orientedBox);
template<typename U> constexpr explicit BoundingVolume(const BoundingVolume<U>& volume);
constexpr BoundingVolume(const BoundingVolume&) = default;
constexpr BoundingVolume(BoundingVolume&&) = default;

View File

@@ -358,7 +358,7 @@ namespace Nz
Box<T> destBox = to.obb.localBox;
destBox.Scale(interpolation);
return { destBox };
return BoundingVolume{ destBox };
}
}
@@ -379,7 +379,7 @@ namespace Nz
Box<T> fromBox = from.obb.localBox;
fromBox.Scale(T(1.0) - interpolation);
return { fromBox };
return BoundingVolume{ fromBox };
}
case Extent::Infinite:

View File

@@ -180,7 +180,7 @@ namespace Nz
case Extent::Finite:
{
if (Intersect(volume.aabb))
return Intersect(volume.obb, closestHit, furthestHit);
return true; // TODO: Should test OBB but there's currently no way of doing so (OrientedBox don't store enough info?)
return false;
}