* correct calculating blocked / vistable positions

* some minor improvements / changes / fixes
This commit is contained in:
mateuszb
2007-08-11 14:58:07 +00:00
parent cc0a4c5d09
commit 548e8582ec
7 changed files with 172 additions and 37 deletions
+8 -8
View File
@@ -6,17 +6,17 @@ class int3
public:
int x,y,z;
inline int3():x(0),y(0),z(0){}; //c-tor, x/y/z initialized to 0
inline int3(const int X, const int Y, const int Z):x(X),y(Y),z(Z){}; //c-tor
inline int3(const int & X, const int & Y, const int & Z):x(X),y(Y),z(Z){}; //c-tor
inline ~int3(){} // d-tor - does nothing
inline int3 operator+(const int3 & i)
inline int3 operator+(const int3 & i) const
{return int3(x+i.x,y+i.y,z+i.z);}
inline int3 operator+(const int i) //increases all components by int
inline int3 operator+(const int i) const //increases all components by int
{return int3(x+i,y+i,z+i);}
inline int3 operator-(const int3 & i)
inline int3 operator-(const int3 & i) const
{return int3(x-i.x,y-i.y,z-i.z);}
inline int3 operator-(const int i)
inline int3 operator-(const int i) const
{return int3(x-i,y-i,z-i);}
inline int3 operator-() //increases all components by int
inline int3 operator-() const //increases all components by int
{return int3(-x,-y,-z);}
inline void operator+=(const int3 & i)
{
@@ -24,7 +24,7 @@ public:
y+=i.y;
z+=i.z;
}
inline void operator+=(const int i)
inline void operator+=(const int & i)
{
x+=i;
y+=i;
@@ -36,7 +36,7 @@ public:
y-=i.y;
z-=i.z;
}
inline void operator-=(const int i)
inline void operator-=(const int & i)
{
x+=i;
y+=i;