From 93f0de521a0e2abb9c35dfb06bd3d306c548bf1b Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 7 Mar 2014 21:43:15 +0100 Subject: Added Vector3i::Move(). --- src/Vector3i.cpp | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) (limited to 'src/Vector3i.cpp') 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; +} + + + + -- cgit v1.2.3 From b4bf13aa4f004a7819e262679a295d8ca886557b Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 11 Mar 2014 16:01:17 +0200 Subject: Unified Vector classes --- src/Vector3i.cpp | 58 -------------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 src/Vector3i.cpp (limited to 'src/Vector3i.cpp') diff --git a/src/Vector3i.cpp b/src/Vector3i.cpp deleted file mode 100644 index 2106aea6d..000000000 --- a/src/Vector3i.cpp +++ /dev/null @@ -1,58 +0,0 @@ - -// 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" - - - - - -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) -{ - x += a_MoveX; - y += a_MoveY; - z += a_MoveZ; -} - - - - -- cgit v1.2.3