// Copyright (C) 2014 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_BOUNDINGVOLUME_HPP #define NAZARA_BOUNDINGVOLUME_HPP #include #include #include #include #include #include template class NzBoundingVolume { public: NzBoundingVolume(); NzBoundingVolume(nzExtend Extend); NzBoundingVolume(T X, T Y, T Z, T Width, T Height, T Depth); NzBoundingVolume(const NzBox& box); NzBoundingVolume(const NzOrientedBox& orientedBox); NzBoundingVolume(const NzVector3& vec1, const NzVector3& vec2); template explicit NzBoundingVolume(const NzBoundingVolume& volume); NzBoundingVolume(const NzBoundingVolume& volume) = default; ~NzBoundingVolume() = default; bool IsFinite() const; bool IsInfinite() const; bool IsNull() const; NzBoundingVolume& MakeInfinite(); NzBoundingVolume& MakeNull(); NzBoundingVolume& Set(nzExtend Extend); NzBoundingVolume& Set(T X, T Y, T Z, T Width, T Height, T Depth); NzBoundingVolume& Set(const NzBoundingVolume& volume); NzBoundingVolume& Set(const NzBox& box); NzBoundingVolume& Set(const NzOrientedBox& orientedBox); NzBoundingVolume& Set(const NzVector3& vec1, const NzVector3& vec2); template NzBoundingVolume& Set(const NzBoundingVolume& volume); NzString ToString() const; void Update(const NzMatrix4& transformMatrix); NzBoundingVolume operator*(T scalar) const; NzBoundingVolume& operator*=(T scalar); bool operator==(const NzBoundingVolume& volume) const; bool operator!=(const NzBoundingVolume& volume) const; static NzBoundingVolume Infinite(); static NzBoundingVolume Lerp(const NzBoundingVolume& from, const NzBoundingVolume& to, T interpolation); static NzBoundingVolume Null(); nzExtend extend; NzBox aabb; NzOrientedBox obb; }; template std::ostream& operator<<(std::ostream& out, const NzBoundingVolume& volume); typedef NzBoundingVolume NzBoundingVolumed; typedef NzBoundingVolume NzBoundingVolumef; #include #endif // NAZARA_BOUNDINGVOLUME_HPP