celGraph almost ready

2007-06-23

Permalink 12:35:03 am, Categories: Pathfinding  

celGraph almost ready

Hello!

I will paste here the interfacte of CelGraph and its components. At the moment I am finishing some details on A* and I will soon be finishing an application for testing CelGraph and pathfinding.

include/celhraph.h:


struct iCelNode;

struct iCelEdge : public virtual iBase
{
SCF_INTERFACE (iCelEdge, 0, 0, 1);


virtual void SetState(bool open) = 0;



virtual void SetSuccessor(iCelNode* node) = 0;




virtual bool GetState() = 0;


virtual iCelNode* GetSuccessor() = 0;
};


struct iCelNode : public virtual iBase
{
SCF_INTERFACE (iCelNode, 0, 0, 1);

virtual void AddSuccessor(iCelNode* node, bool state) = 0;

virtual void SetMapNode(iMapNode* node);

virtual void Heuristic(int cost, iCelNode* goal)= 0;

virtual csVector3 GetPosition() = 0;

virtual csArray iCelNode* GetSuccessors() = 0;

virtual csArray iCelNode* GetAllSuccessors() = 0;

virtual int GetHeuristic () = 0;

virtual int GetCost () = 0;

};

struct iCelPath : public virtual iBase
{
SCF_INTERFACE (iCelPath, 0, 0, 1);

virtual void AddNode(iMapNode* node) = 0;

virtual void InsertNode(size_t pos, iMapNode* node) = 0;

virtual iMapNode* Next() = 0;

virtual iMapNode* Previous() = 0;

virtual bool HasNext();

virtual bool HasPrevious();

};

struct iCelGraph : public virtual iBase
{
SCF_INTERFACE (iCelGraph, 0, 0, 1);

virtual void AddNode(iCelNode* node) = 0;

virtual void AddEdge(iCelNode* from, iCelNode* to, bool state) = 0;

virtual iCelNode* GetClosest(csVector3 position) = 0;

virtual iCelPath* ShortestPath(iCelNode* from, iCelNode* goal) = 0;

Trackback address for this post:

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Comments, Trackbacks, Pingbacks:

No Comments/Trackbacks/Pingbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

February 2012
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29        

Search

Archives

Misc

XML Feeds

What is this?

powered by
b2evolution