diff options
author | Mattes D <github@xoft.cz> | 2014-03-10 23:13:08 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-03-10 23:13:08 +0100 |
commit | b72661681c0676b6977e95a1d58eb8e282582b73 (patch) | |
tree | 9d5e7cccb22d13dd15ad015b4765053d528ca58c /src/Vector3i.cpp | |
parent | Merge pull request #767 from worktycho/envmatrix (diff) | |
parent | Removed debugging output. (diff) | |
download | cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar.gz cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar.bz2 cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar.lz cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar.xz cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.tar.zst cuberite-b72661681c0676b6977e95a1d58eb8e282582b73.zip |
Diffstat (limited to 'src/Vector3i.cpp')
-rw-r--r-- | src/Vector3i.cpp | 52 |
1 files changed, 47 insertions, 5 deletions
diff --git a/src/Vector3i.cpp b/src/Vector3i.cpp index 4ce1e2cf3..2106aea6d 100644 --- a/src/Vector3i.cpp +++ b/src/Vector3i.cpp @@ -1,6 +1,11 @@ +// Vector3i.cpp + +// Implements the Vector3i class representing an int-based 3D vector + #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules +#include "math.h" #include "Vector3i.h" #include "Vector3d.h" @@ -8,9 +13,46 @@ -Vector3i::Vector3i( const Vector3d & v ) - : x( (int)v.x ) - , y( (int)v.y ) - , z( (int)v.z ) +Vector3i::Vector3i(const Vector3d & v) : + x((int)v.x), + y((int)v.y), + z((int)v.z) +{ +} + + + + + +Vector3i::Vector3i(void) : + x(0), + y(0), + z(0) +{ +} + + + + + +Vector3i::Vector3i(int a_x, int a_y, int a_z) : + x(a_x), + y(a_y), + z(a_z) +{ +} + + + + + +void Vector3i::Move(int a_MoveX, int a_MoveY, int a_MoveZ) { -}
\ No newline at end of file + x += a_MoveX; + y += a_MoveY; + z += a_MoveZ; +} + + + + |