Minor fixes
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -28,11 +28,11 @@ namespace Nz
|
||||
virtual ~AbstractAtlas();
|
||||
|
||||
virtual void Clear() = 0;
|
||||
virtual void Free(SparsePtr<const Rectui> rects, SparsePtr<unsigned int> layers, unsigned int count) = 0;
|
||||
virtual AbstractImage* GetLayer(unsigned int layerIndex) const = 0;
|
||||
virtual void Free(SparsePtr<const Rectui> rects, SparsePtr<std::size_t> layers, std::size_t count) = 0;
|
||||
virtual AbstractImage* GetLayer(std::size_t layerIndex) const = 0;
|
||||
virtual std::size_t GetLayerCount() const = 0;
|
||||
virtual DataStoreFlags GetStorage() const = 0;
|
||||
virtual bool Insert(const Image& image, Rectui* rect, bool* flipped, unsigned int* layerIndex) = 0;
|
||||
virtual bool Insert(const Image& image, Rectui* rect, bool* flipped, std::size_t* layerIndex) = 0;
|
||||
|
||||
AbstractAtlas& operator=(const AbstractAtlas&) = delete;
|
||||
AbstractAtlas& operator=(AbstractAtlas&&) noexcept = default;
|
||||
|
||||
@@ -97,6 +97,7 @@ namespace Nz
|
||||
|
||||
struct Glyph
|
||||
{
|
||||
std::size_t layerIndex;
|
||||
Recti aabb;
|
||||
Rectui atlasRect;
|
||||
bool requireFauxBold;
|
||||
@@ -105,7 +106,6 @@ namespace Nz
|
||||
bool valid;
|
||||
float fauxOutlineThickness;
|
||||
int advance;
|
||||
unsigned int layerIndex;
|
||||
};
|
||||
|
||||
struct SizeInfo
|
||||
|
||||
@@ -27,16 +27,16 @@ namespace Nz
|
||||
|
||||
void Clear() override;
|
||||
|
||||
void Free(SparsePtr<const Rectui> rects, SparsePtr<unsigned int> layers, unsigned int count) override;
|
||||
void Free(SparsePtr<const Rectui> rects, SparsePtr<std::size_t> layers, std::size_t count) override;
|
||||
|
||||
unsigned int GetMaxLayerSize() const;
|
||||
GuillotineBinPack::FreeRectChoiceHeuristic GetRectChoiceHeuristic() const;
|
||||
GuillotineBinPack::GuillotineSplitHeuristic GetRectSplitHeuristic() const;
|
||||
AbstractImage* GetLayer(unsigned int layerIndex) const override;
|
||||
AbstractImage* GetLayer(std::size_t layerIndex) const override;
|
||||
std::size_t GetLayerCount() const override;
|
||||
DataStoreFlags GetStorage() const override;
|
||||
|
||||
bool Insert(const Image& image, Rectui* rect, bool* flipped, unsigned int* layerIndex) override;
|
||||
bool Insert(const Image& image, Rectui* rect, bool* flipped, std::size_t* layerIndex) override;
|
||||
|
||||
void SetMaxLayerSize(unsigned int maxLayerSize);
|
||||
void SetRectChoiceHeuristic(GuillotineBinPack::FreeRectChoiceHeuristic heuristic);
|
||||
|
||||
Reference in New Issue
Block a user