summaryrefslogtreecommitdiffstats
path: root/src/Vector3f.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-12 17:59:10 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-12 17:59:10 +0100
commit3caa4a38b9a60afdda0e76cfb267c49ffac1063c (patch)
tree89bd29d89d6892a94137ebf4829dfe6a4ae3c450 /src/Vector3f.h
parentFixed comments an assert (diff)
parentFixed missing comment terminator. (diff)
downloadcuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar
cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar.gz
cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar.bz2
cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar.lz
cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar.xz
cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar.zst
cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.zip
Diffstat (limited to '')
-rw-r--r--src/Vector3f.h47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/Vector3f.h b/src/Vector3f.h
deleted file mode 100644
index adb154ad7..000000000
--- a/src/Vector3f.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#pragma once
-
-#include <math.h>
-
-class Vector3i;
-class Vector3d;
-class Vector3f // tolua_export
-{ // tolua_export
-public: // tolua_export
- Vector3f( const Vector3d & v ); // tolua_export
- Vector3f( const Vector3d * v ); // tolua_export
- Vector3f( const Vector3i & v ); // tolua_export
- Vector3f( const Vector3i * v ); // tolua_export
-
-
- Vector3f() : x(0), y(0), z(0) {} // tolua_export
- Vector3f(float a_x, float a_y, float a_z) : x(a_x), y(a_y), z(a_z) {} // tolua_export
-
- inline void Set(float a_x, float a_y, float a_z) { x = a_x, y = a_y, z = a_z; } // tolua_export
- inline void Normalize() { float l = 1.0f / Length(); x *= l; y *= l; z *= l; } // tolua_export
- inline Vector3f NormalizeCopy() const { float l = 1.0f / Length(); return Vector3f( x * l, y * l, z * l ); }// tolua_export
- inline void NormalizeCopy(Vector3f & a_V) const { float l = 1.0f / Length(); a_V.Set(x*l, y*l, z*l ); } // tolua_export
- inline float Length() const { return (float)sqrtf( x * x + y * y + z * z ); } // tolua_export
- inline float SqrLength() const { return x * x + y * y + z * z; } // tolua_export
- inline float Dot( const Vector3f & a_V ) const { return x * a_V.x + y * a_V.y + z * a_V.z; } // tolua_export
- inline Vector3f Cross( const Vector3f & v ) const { return Vector3f( y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x ); } // tolua_export
-
- inline bool Equals( const Vector3f & v ) const { return (x == v.x && y == v.y && z == v.z ); } // tolua_export
-
- void operator += ( const Vector3f& a_V ) { x += a_V.x; y += a_V.y; z += a_V.z; }
- void operator += ( Vector3f* a_V ) { x += a_V->x; y += a_V->y; z += a_V->z; }
- void operator -= ( const Vector3f& a_V ) { x -= a_V.x; y -= a_V.y; z -= a_V.z; }
- void operator -= ( Vector3f* a_V ) { x -= a_V->x; y -= a_V->y; z -= a_V->z; }
- void operator *= ( float a_f ) { x *= a_f; y *= a_f; z *= a_f; }
- void operator *= ( Vector3f* a_V ) { x *= a_V->x; y *= a_V->y; z *= a_V->z; }
- void operator *= ( const Vector3f& a_V ) { x *= a_V.x; y *= a_V.y; z *= a_V.z; }
-
- Vector3f operator + ( const Vector3f& v2 ) const { return Vector3f( x + v2.x, y + v2.y, z + v2.z ); } // tolua_export
- Vector3f operator + ( const Vector3f* v2 ) const { return Vector3f( x + v2->x, y + v2->y, z + v2->z ); } // tolua_export
- Vector3f operator - ( const Vector3f& v2 ) const { return Vector3f( x - v2.x, y - v2.y, z - v2.z ); } // tolua_export
- Vector3f operator - ( const Vector3f* v2 ) const { return Vector3f( x - v2->x, y - v2->y, z - v2->z ); } // tolua_export
- Vector3f operator * ( const float f ) const { return Vector3f( x * f, y * f, z * f ); } // tolua_export
- Vector3f operator * ( const Vector3f& v2 ) const { return Vector3f( x * v2.x, y * v2.y, z * v2.z ); } // tolua_export
-
- float x, y, z; // tolua_export
-
-};// tolua_export