Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
00001 // Copyright 2006-2011 by Kat'Oun 00002 00003 #ifndef _LINE_2D_H_ 00004 #define _LINE_2D_H_ 00005 00006 #include <EngineConfig.h> 00007 #include <core/Types.h> 00008 #include <core/Vector2d.h> 00009 00010 namespace core 00011 { 00012 00014 class ENGINE_PUBLIC_EXPORT line2d 00015 { 00016 public: 00017 00018 line2d(); 00019 line2d(f32 xa, f32 ya, f32 xb, f32 yb); 00020 line2d(const vector2d& nstart, const vector2d& nend); 00021 line2d(const line2d& other); 00022 00023 line2d operator+(const vector2d& point) const; 00024 line2d& operator+=(const vector2d& point); 00025 00026 line2d operator-(const vector2d& point) const; 00027 line2d& operator-=(const vector2d& point); 00028 00029 bool operator==(const line2d& other) const; 00030 bool operator!=(const line2d& other) const; 00031 00032 void set(const f32& xa, const f32& ya, const f32& xb, const f32& yb); 00033 void set(const vector2d& nstart, const vector2d& nend); 00034 void set(const line2d& other); 00035 00038 f32 getLength() const; 00039 00042 vector2d getVector() const; 00043 00046 vector2d getUnitVector(); 00047 00048 f32 getAngleWith(const line2d& l); 00049 00050 vector2d start; 00051 vector2d end; 00052 }; 00053 00054 } // end namespace core 00055 00056 #endif
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:04 by
Doxygen
(1.7.4)
|