JK2eA
 All Classes Functions Variables
CurvePath.h
00001 #pragma once
00002 
00003 #include <Vector.h>
00004 #include <vector>
00005 #include <JK2lib.h>
00006 
00010 class CCurvePath {
00011 protected:
00012         struct PATH_NODE { 
00013                 float length;   
00014                 vec       value;        
00015         };
00016         std::vector<PATH_NODE> m_nodes; 
00017 
00024         virtual float GetLengthBetweenNodes(const unsigned int uiStart,const unsigned int uiEnd) = 0;
00025         
00026 public:
00030         CCurvePath();
00034         virtual ~CCurvePath();
00035 
00042         virtual vec GetValue(const float s, bool& end) = 0;
00049         virtual vec GetDir(const float s, bool& end) = 0;
00050 
00057         vec* GetNode(const size_t index);
00058         
00064         void AddNode(const size_t index, const vec& value);
00069         void AddNode(const vec& value);
00070 
00075         void DelNode(const size_t index);               
00079         void Clear();
00084         size_t GetNodeCount() const;
00089         void Load(FileManager *f);
00094         void Save(FileManager *f);
00095 
00099         virtual void DebugDraw() = 0;
00100 
00101 };
00102