Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/core/Vector4d.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _VECTOR_4D_H_
00004 #define _VECTOR_4D_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 
00009 namespace core
00010 {
00011 
00012 class vector3d;
00013 
00016 class ENGINE_PUBLIC_EXPORT vector4d
00017 {
00018 public:
00019 
00020         vector4d();
00021         vector4d(f32 nx, f32 ny, f32 nz, f32 nw);
00022         vector4d(const vector4d& other);
00023         vector4d(const vector3d& other);
00024 
00025         vector4d operator-() const;
00026 
00027         vector4d& operator=(const vector4d& other);
00028 
00029         vector4d operator+(const vector4d& other) const;
00030         vector4d& operator+=(const vector4d& other);
00031 
00032         vector4d operator-(const vector4d& other) const;
00033         vector4d& operator-=(const vector4d& other);
00034 
00035         vector4d operator*(const vector4d& other) const;
00036         vector4d& operator*=(const vector4d& other);
00037         vector4d operator*(const f32 v) const;
00038         vector4d& operator*=(const f32 v);
00039 
00040         vector4d operator/(const vector4d& other) const;
00041         vector4d& operator/=(const vector4d& other);
00042         vector4d operator/(const f32 v) const;
00043         vector4d& operator/=(const f32 v);
00044 
00045         bool operator==(const vector4d& other) const;
00046         bool operator!=(const vector4d& other) const;
00047 
00048         void set(const f32 nx, const f32 ny, const f32 nz, const f32 nw);
00049         void set(const vector4d& other);
00050 
00051         f32* get();
00052         const f32* get() const;
00053 
00055         void invert();
00056 
00058         vector4d& normalize();
00059 
00061         f32 getLength() const;
00062 
00066         f32 getLengthSQ() const;
00067 
00069         void setLength(f32 newLength);
00070 
00072         f32 dotProduct(const vector4d& other) const;
00073 
00076         f32 getDistanceFrom(const vector4d& other) const;
00077 
00080         f32 getDistanceFromSQ(const vector4d& other) const;
00081 
00082         f32 X, Y, Z, W;
00083 };
00084 
00085 } // end namespace core
00086 
00087 #endif

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:04 by Doxygen (1.7.4)