Refactored mathematics module

Added AABBs
Added code examples
Added experimental support for texture arrays (1D/2D)
Added initialisers (new way of initialising modules)
Added global headers (Plus a global header generator script)
Added pattern support for directory
Added support for spinlocks critical section on Windows
Added NzRenderWindow::SetFramerateLimit
Core project now includes Mathematics files
Fixed color implementation using double
Fixed declaration needing renderer include
Fixed MLT not clearing nextFree(File/Line) after Free
Fixed move operators not being noexcept
Fixed thread-safety (Now working correctly - If I'm lucky)
Moved Resource to core
New interface for modules
New interface for the renderer
Put some global functions to anonymous namespace
Removed empty modules
Renamed ThreadCondition to ConditionVariable
Replaced redirect to cerr log option by duplicate to cout
Setting mouse position relative to a window will make this window ignore
the event
Shaders sending methods no longer takes the uniform variable name (it's
using ID instead)
Using new OpenGL 4.3 header
This commit is contained in:
Lynix
2012-08-08 04:44:17 +02:00
parent 06eda4eba9
commit b442ab0bd2
142 changed files with 6861 additions and 2326 deletions

View File

@@ -17,19 +17,34 @@ template<typename T> class NzVector4
NzVector4(T X, T Y, T Z, T W = 1.0);
explicit NzVector4(T scale);
NzVector4(T vec[4]);
template<typename U> explicit NzVector4(const NzVector4<U>& vec);
NzVector4(const NzVector3<T>& vec, T W = 1.0);
template<typename U> explicit NzVector4(const NzVector4<U>& vec);
NzVector4(const NzVector4& vec) = default;
~NzVector4() = default;
T AbsDotProduct(const NzVector4& vec) const;
T DotProduct(const NzVector4& vec) const;
void MakeCeil(const NzVector4& vec);
void MakeFloor(const NzVector4& vec);
void MakeUnitX();
void MakeUnitY();
void MakeUnitZ();
void MakeZero();
void Normalize();
void Set(T X, T Y, T Z, T W = 1.0);
void Set(T scale);
void Set(T vec[4]);
void Set(const NzVector3<T>& vec, T W = 1.0);
template<typename U> void Set(const NzVector4<U>& vec);
NzString ToString() const;
operator NzString() const;
operator T*();
operator const T*() const;
@@ -60,10 +75,12 @@ template<typename T> class NzVector4
bool operator>(const NzVector4& vec) const;
bool operator>=(const NzVector4& vec) const;
T x;
T y;
T z;
T w;
static NzVector4 UnitX();
static NzVector4 UnitY();
static NzVector4 UnitZ();
static NzVector4 Zero();
T x, y, z, w;
};
template<typename T> std::ostream& operator<<(std::ostream& out, const NzVector4<T>& vec);