mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 11:54:00 +02:00
- added caching for computeVisibleQuad
- fixed bug when in chat mode and the deub view toggle key was intercepted - added less than operators
This commit is contained in:
@@ -138,6 +138,22 @@ public:
|
||||
p[3]/scalar);
|
||||
}
|
||||
|
||||
bool operator <(const Quad2<T> &v) const {
|
||||
if(p[0] < v.p[0]) {
|
||||
return true;
|
||||
}
|
||||
if(p[1] < v.p[1]) {
|
||||
return true;
|
||||
}
|
||||
if(p[2] < v.p[2]) {
|
||||
return true;
|
||||
}
|
||||
if(p[3] < v.p[3]) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Rect2<T> computeBoundingRect() const{
|
||||
return Rect2i(
|
||||
min(p[0].x, p[1].x),
|
||||
|
@@ -261,12 +261,16 @@ public:
|
||||
}
|
||||
|
||||
Vec3<T> operator -=(const Vec3<T> &v){
|
||||
x-=v.x;
|
||||
x-=v.x;
|
||||
y-=v.y;
|
||||
z-=v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator <(const Vec3<T> &v) const {
|
||||
return x < v.x || (x == v.x && y < v.y) || (x == v.x && y == v.y && z < v.z);
|
||||
}
|
||||
|
||||
Vec3<T> lerp(T t, const Vec3<T> &v) const{
|
||||
return *this + (v - *this) * t;
|
||||
}
|
||||
@@ -455,6 +459,9 @@ public:
|
||||
w-=w.z;
|
||||
return *this;
|
||||
}
|
||||
bool operator <(const Vec4<T> &v) const {
|
||||
return x < v.x || (x == v.x && y < v.y) || (x == v.x && y == v.y && z < v.z) || (x == v.x && y == v.y && z == v.z && w < v.w);
|
||||
}
|
||||
|
||||
Vec4<T> lerp(T t, const Vec4<T> &v) const{
|
||||
return *this + (v - *this) *t;
|
||||
|
Reference in New Issue
Block a user