From 6677a5e8ca15dcf796ba6b0dfe66d9d4b5ff8ca9 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 27 Aug 2013 19:57:37 +0200 Subject: Implemented basic physics for projectiles. --- source/Vector3d.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'source/Vector3d.h') diff --git a/source/Vector3d.h b/source/Vector3d.h index 6f28a857b..ecc72e421 100644 --- a/source/Vector3d.h +++ b/source/Vector3d.h @@ -30,12 +30,13 @@ public: // tolua_export void operator -= ( Vector3d* a_V ) { x -= a_V->x; y -= a_V->y; z -= a_V->z; } void operator *= ( double a_f ) { x *= a_f; y *= a_f; z *= a_f; } - Vector3d operator + ( const Vector3d& v2 ) const { return Vector3d( x + v2.x, y + v2.y, z + v2.z ); } // tolua_export - Vector3d operator + ( const Vector3d* v2 ) const { return Vector3d( x + v2->x, y + v2->y, z + v2->z ); } // tolua_export - Vector3d operator - ( const Vector3d& v2 ) const { return Vector3d( x - v2.x, y - v2.y, z - v2.z ); } // tolua_export - Vector3d operator - ( const Vector3d* v2 ) const { return Vector3d( x - v2->x, y - v2->y, z - v2->z ); } // tolua_export - Vector3d operator * ( const double f ) const { return Vector3d( x * f, y * f, z * f ); } // tolua_export - Vector3d operator * ( const Vector3d& v2 ) const { return Vector3d( x * v2.x, y * v2.y, z * v2.z ); } // tolua_export + Vector3d operator + (const Vector3d & v2) const { return Vector3d(x + v2.x, y + v2.y, z + v2.z ); } // tolua_export + Vector3d operator + (const Vector3d * v2) const { return Vector3d(x + v2->x, y + v2->y, z + v2->z ); } // tolua_export + Vector3d operator - (const Vector3d & v2) const { return Vector3d(x - v2.x, y - v2.y, z - v2.z ); } // tolua_export + Vector3d operator - (const Vector3d * v2) const { return Vector3d(x - v2->x, y - v2->y, z - v2->z ); } // tolua_export + Vector3d operator * (const double f) const { return Vector3d(x * f, y * f, z * f ); } // tolua_export + Vector3d operator * (const Vector3d & v2) const { return Vector3d(x * v2.x, y * v2.y, z * v2.z ); } // tolua_export + Vector3d operator / (const double f) const { return Vector3d(x / f, y / f, z / f ); } // tolua_export double x, y, z; // tolua_export -- cgit v1.2.3