Adding some methods to Cube class

Former-commit-id: b8a72658aa97841156910e8ec1120d109069fce1
This commit is contained in:
Lynix
2013-02-21 18:26:41 +01:00
parent a9b538de20
commit 283b551d56
2 changed files with 42 additions and 1 deletions

View File

@@ -9,7 +9,9 @@
#include <Nazara/Core/String.hpp>
#include <Nazara/Math/Enums.hpp>
#include <Nazara/Math/Matrix4.hpp>
#include <Nazara/Math/Rect.hpp>
#include <Nazara/Math/Sphere.hpp>
#include <Nazara/Math/Vector3.hpp>
template<typename T>
@@ -33,12 +35,15 @@ class NzCube
NzCube& ExtendTo(const NzVector3<T>& point);
NzCube& ExtendTo(const NzCube& cube);
NzSphere<T> GetBoundingSphere() const;
NzVector3<T> GetCorner(nzCorner corner) const;
NzVector3<T> GetCenter() const;
NzVector3<T> GetNegativeVertex(const NzVector3<T>& normal) const;
NzVector3<T> GetPosition() const;
NzVector3<T> GetPositiveVertex(const NzVector3<T>& normal) const;
T GetRadius() const;
NzVector3<T> GetSize() const;
T GetSquaredRadius() const;
bool Intersect(const NzCube& cube, NzCube* intersection = nullptr) const;
@@ -55,6 +60,8 @@ class NzCube
NzString ToString() const;
NzCube& Transform(const NzMatrix4<T>& matrix, bool applyTranslation = true);
T& operator[](unsigned int i);
T operator[](unsigned int i) const;