// Copyright (C) 2013 Jérôme Leclercq // This file is part of the "Nazara Engine - Mathematics module" // For conditions of distribution and use, see copyright notice in Config.hpp #ifndef NAZARA_BOUNDINGBOX_HPP #define NAZARA_BOUNDINGBOX_HPP #include #include #include #include #include #include template class NzBoundingBox { public: NzBoundingBox(); NzBoundingBox(nzExtend Extend); NzBoundingBox(T X, T Y, T Z, T Width, T Height, T Depth); NzBoundingBox(const NzCube& Cube); NzBoundingBox(const NzVector3& vec1, const NzVector3& vec2); template explicit NzBoundingBox(const NzBoundingBox& box); NzBoundingBox(const NzBoundingBox& box) = default; ~NzBoundingBox() = default; bool IsFinite() const; bool IsInfinite() const; bool IsNull() const; NzBoundingBox& MakeInfinite(); NzBoundingBox& MakeNull(); NzBoundingBox& Set(nzExtend Extend); NzBoundingBox& Set(T X, T Y, T Z, T Width, T Height, T Depth); NzBoundingBox& Set(const NzBoundingBox& box); NzBoundingBox& Set(const NzCube& Cube); NzBoundingBox& Set(const NzVector3& vec1, const NzVector3& vec2); template NzBoundingBox& Set(const NzBoundingBox& box); NzString ToString() const; void Update(const NzMatrix4& transformMatrix); NzBoundingBox operator*(T scalar) const; NzBoundingBox& operator*=(T scalar); bool operator==(const NzBoundingBox& box) const; bool operator!=(const NzBoundingBox& box) const; static NzBoundingBox Infinite(); static NzBoundingBox Lerp(const NzBoundingBox& from, const NzBoundingBox& to, T interpolation); static NzBoundingBox Null(); nzExtend extend; NzCube aabb; NzOrientedCube obb; }; template std::ostream& operator<<(std::ostream& out, const NzBoundingBox& box); typedef NzBoundingBox NzBoundingBoxd; typedef NzBoundingBox NzBoundingBoxf; #include #endif // NAZARA_BOUNDINGBOX_HPP