summaryrefslogtreecommitdiffstats
path: root/src/Vector3i.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-12 14:42:04 +0100
committermadmaxoft <github@xoft.cz>2014-03-12 14:42:04 +0100
commitf2df33f746936e8dd0dba69e7d77723df8c71472 (patch)
tree9a2a49460ed9cf57f69a2e9b0e07cf9a6086a02a /src/Vector3i.h
parentFixed Lua string return values. (diff)
parentVector3: Length() should always return a float (diff)
downloadcuberite-f2df33f746936e8dd0dba69e7d77723df8c71472.tar
cuberite-f2df33f746936e8dd0dba69e7d77723df8c71472.tar.gz
cuberite-f2df33f746936e8dd0dba69e7d77723df8c71472.tar.bz2
cuberite-f2df33f746936e8dd0dba69e7d77723df8c71472.tar.lz
cuberite-f2df33f746936e8dd0dba69e7d77723df8c71472.tar.xz
cuberite-f2df33f746936e8dd0dba69e7d77723df8c71472.tar.zst
cuberite-f2df33f746936e8dd0dba69e7d77723df8c71472.zip
Diffstat (limited to '')
-rw-r--r--src/Vector3i.h68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/Vector3i.h b/src/Vector3i.h
deleted file mode 100644
index 39e138683..000000000
--- a/src/Vector3i.h
+++ /dev/null
@@ -1,68 +0,0 @@
-
-// Vector3i.h
-
-// Declares the Vector3i class representing an int-based 3D vector
-
-
-
-
-
-#pragma once
-
-
-
-
-
-// fwd:
-class Vector3d;
-
-
-
-
-
-// tolua_begin
-class Vector3i
-{
-public:
- /** Creates an int vector based on the floor()-ed coords of a double vector. */
- Vector3i(const Vector3d & v);
-
- Vector3i(void);
- Vector3i(int a_x, int a_y, int a_z);
-
- inline void Set(int a_x, int a_y, int a_z) { x = a_x, y = a_y, z = a_z; }
- inline float Length() const { return sqrtf( (float)( x * x + y * y + z * z) ); }
- inline int SqrLength() const { return x * x + y * y + z * z; }
-
- inline bool Equals( const Vector3i & v ) const { return (x == v.x && y == v.y && z == v.z ); }
- inline bool Equals( const Vector3i * v ) const { return (x == v->x && y == v->y && z == v->z ); }
-
- void Move(int a_MoveX, int a_MoveY, int a_MoveZ);
-
- // tolua_end
-
- void operator += ( const Vector3i& a_V ) { x += a_V.x; y += a_V.y; z += a_V.z; }
- void operator += ( Vector3i* a_V ) { x += a_V->x; y += a_V->y; z += a_V->z; }
- void operator -= ( const Vector3i& a_V ) { x -= a_V.x; y -= a_V.y; z -= a_V.z; }
- void operator -= ( Vector3i* a_V ) { x -= a_V->x; y -= a_V->y; z -= a_V->z; }
- void operator *= ( int a_f ) { x *= a_f; y *= a_f; z *= a_f; }
-
- friend Vector3i operator + ( const Vector3i& v1, const Vector3i& v2 ) { return Vector3i( v1.x + v2.x, v1.y + v2.y, v1.z + v2.z ); }
- friend Vector3i operator + ( const Vector3i& v1, Vector3i* v2 ) { return Vector3i( v1.x + v2->x, v1.y + v2->y, v1.z + v2->z ); }
- friend Vector3i operator - ( const Vector3i& v1, const Vector3i& v2 ) { return Vector3i( v1.x - v2.x, v1.y - v2.y, v1.z - v2.z ); }
- friend Vector3i operator - ( const Vector3i& v1, Vector3i* v2 ) { return Vector3i( v1.x - v2->x, v1.y - v2->y, v1.z - v2->z ); }
- friend Vector3i operator - ( const Vector3i* v1, Vector3i& v2 ) { return Vector3i( v1->x - v2.x, v1->y - v2.y, v1->z - v2.z ); }
- friend Vector3i operator * ( const Vector3i& v, const int f ) { return Vector3i( v.x * f, v.y * f, v.z * f ); }
- friend Vector3i operator * ( const Vector3i& v1, const Vector3i& v2 ) { return Vector3i( v1.x * v2.x, v1.y * v2.y, v1.z * v2.z ); }
- friend Vector3i operator * ( const int f, const Vector3i& v ) { return Vector3i( v.x * f, v.y * f, v.z * f ); }
- friend bool operator < ( const Vector3i& v1, const Vector3i& v2 ) { return (v1.x<v2.x)||(v1.x==v2.x && v1.y<v2.y)||(v1.x==v2.x && v1.y == v2.y && v1.z<v2.z); }
-
- int x, y, z; // tolua_export
-}; // tolua_export
-
-typedef std::list<Vector3i> cVector3iList;
-typedef std::vector<Vector3i> cVector3iArray;
-
-
-
-