Fixed debug-mode compilation

-Also added multiplication operator and equality comparison to Cube and
Rect


Former-commit-id: b4194a50fbe3025d3be1fc25d48a85d5a05fc5ac
This commit is contained in:
Lynix
2012-10-08 23:08:46 +02:00
parent 94268ae6b2
commit 5bbc8d0fa4
8 changed files with 190 additions and 16 deletions

View File

@@ -35,6 +35,8 @@ class NzRect
bool IsValid() const;
void MakeZero();
void Set(T X, T Y, T Width, T Height);
void Set(const T rect[4]);
void Set(const NzVector2<T>& vec1, const NzVector2<T>& vec2);
@@ -47,7 +49,15 @@ class NzRect
T& operator[](unsigned int i);
T operator[](unsigned int i) const;
NzRect operator*(T scalar) const;
NzRect& operator*=(T scalar);
bool operator==(const NzRect& rect) const;
bool operator!=(const NzRect& rect) const;
static NzRect Lerp(const NzRect& from, const NzRect& to, T interpolation);
static NzRect Zero();
T x, y, width, height;
};