Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/core/Line3d.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _LINE_3D_H_
00004 #define _LINE_3D_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <core/Vector3d.h>
00009 
00010 namespace core
00011 {
00012 
00014 class ENGINE_PUBLIC_EXPORT line3d
00015 {
00016 public:
00017 
00018         line3d();
00019         line3d(f32 xa, f32 ya, f32 za, f32 xb, f32 yb, f32 zb);
00020         line3d(const vector3d& nstart, const vector3d& nend);
00021         line3d(const line3d& other);
00022 
00023         line3d operator+(const vector3d& point) const;
00024         line3d& operator+=(const vector3d& point);
00025 
00026         line3d operator-(const vector3d& point) const;
00027         line3d& operator-=(const vector3d& point);
00028 
00029         bool operator==(const line3d& other) const;
00030         bool operator!=(const line3d& other) const;
00031 
00032         void set(const f32& xa, const f32& ya, const f32& za, const f32& xb, const f32& yb, const f32& zb);
00033         void set(const vector3d& nstart, const vector3d& nend);
00034         void set(const line3d& other);
00035 
00038         f32 getLength() const;
00039 
00042         f32 getLengthSQ() const;
00043 
00045         vector3d getMiddle() const;
00046 
00048         vector3d getVector() const;
00049 
00052         bool isPointBetweenStartAndEnd(const vector3d& point) const;
00053 
00055         vector3d getClosestPoint(const vector3d& point) const;
00056 
00057         // member variables
00058         vector3d start;
00059         vector3d end;
00060 };
00061 
00062 } // end namespace core
00063 
00064 #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)