Adding some methods to Cube class
Former-commit-id: b8a72658aa97841156910e8ec1120d109069fce1
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user