vector.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef GCU_VECTOR_H
00026 #define GCU_VECTOR_H
00027
00028 #include "macros.h"
00029
00030 namespace gcu
00031 {
00032
00033 class Vector3f
00034 {
00035 public:
00036 Vector3f ();
00037 Vector3f (float x, float y, float z);
00038 ~Vector3f ();
00039
00040 void normalize ();
00041 Vector3f &operator= (Vector3f const& other);
00042 Vector3f operator- (Vector3f const& other) const;
00043 Vector3f operator+ (Vector3f const& other) const;
00044 Vector3f operator* (float f) const;
00045
00046 private:
00047 GCU_PROP (float, x);
00048 GCU_PROP (float, y);
00049 GCU_PROP (float, z);
00050 };
00051
00052 Vector3f operator* (float f, Vector3f const& v);
00053
00054 }
00055
00056 #endif //GCU_VECTOR_H