src/rcrt/math/Vec2D.h

Go to the documentation of this file.
00001 #ifndef VEC2D_H_
00002 #define VEC2D_H_
00003 
00004 namespace rcrt
00005 {
00006 
00007 class Vec2D
00008 {
00009 private:
00010         float values[2];
00011         void assign(const Vec2D& vec);
00012         
00013 public:
00014         Vec2D();
00015         Vec2D(float xc, float yc);
00016         Vec2D(const Vec2D& vec);
00017         virtual ~Vec2D();
00018         
00019         const Vec2D& operator= (const Vec2D& vec);
00020         Vec2D operator+ (const Vec2D& vec) const;
00021         Vec2D operator- (const Vec2D& vec) const;
00022         float operator* (const Vec2D& vec) const;
00023         
00024         Vec2D operator* (const float f) const;
00025         Vec2D operator/ (const float f) const;
00026         
00027         float operator[] (int i) const;
00028         float& operator[] (int i);
00029         
00030         Vec2D abs() const;
00031         const Vec2D& normalize();
00032         Vec2D normalized() const;
00033         float norm() const;
00034         float det(const Vec2D& vec) const;
00035         
00036         const float& x() const;
00037         const float& y() const;
00038 };
00039 
00040 }
00041 
00042 #endif /*VECTOR2D_H_*/

Generated on Thu Jan 31 19:26:19 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3