VR-Forces 4.0.4 Class Documentation
include/vrfmodel/pathNode.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2005 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: pathNode.h,v $ $Revision: 1.3 $ $State: Exp $
00007 *******************************************************************************/
00008 
00012 
00014 
00015 #ifndef DtPathNode_H_
00016 #define DtPathNode_H_
00017 
00018 #include "geometry/point.h"
00019 #include <list>
00020 class DtVector;
00021 class DtList;
00022 class DtPathPlanner;
00023 class DtNetworkSegment;
00024 
00030 
00031 #include "vrfmodel/vrfmodelDefines.h"
00032 class DT_DLL_vrfmodel DtAStarNode
00033 {
00034 public:
00035    DtAStarNode(const DtPoint& point, double cost, DtPathPlanner* pathPlanner);
00036    virtual ~DtAStarNode();
00037 
00041    virtual bool expand(double valueLimit = 1e255);
00042 
00045    virtual void generateChildNodes() = 0;
00046 
00048    virtual void sortNodes();
00049 
00051    virtual void removeDeadEnds();
00052 
00053    virtual double aStarValue();
00054 
00055    virtual const DtPoint& point();
00056 
00057    virtual bool deadEnd();
00058 
00061    virtual void postSolution();
00062 
00064    virtual bool visited() = 0;
00065 
00067    virtual void markVisited() = 0;
00068 
00069    virtual void setApproachVector(const DtPoint& approachVector);
00070 
00073    virtual double turningCost(const DtPoint& destination);
00074 
00075 protected:
00079    virtual void nearbyPreferredSegments(const DtPoint& point, 
00080       std::list<const DtNetworkSegment*>& resultList);
00081 
00082 
00083 protected:
00084    DtPoint myPoint;
00085    DtPathPlanner* myPathPlanner;
00086    double myCost;
00087    double myAStarValue;
00088    DtList *myNodeList;
00089    bool myDeadEnd;
00090    bool myExpanded;
00092    DtPoint myApproachVector;
00093 };
00094 
00097 class DT_DLL_vrfmodel DtGridPathNode : public DtAStarNode
00098 {
00099 public:
00100    DtGridPathNode(const DtPoint& point, double cost, DtPathPlanner* pathPlanner);
00101    virtual ~DtGridPathNode();
00102 
00106    virtual void generateChildNodes();
00107 
00109    virtual bool visited();
00110 
00112    virtual void markVisited();
00113 
00114 };
00115 
00118 class DT_DLL_vrfmodel DtVectorPathNode : public DtAStarNode
00119 {
00120 public:
00121    DtVectorPathNode(const DtPoint& point, const DtNetworkSegment* netNode, int segmentPosition, 
00122          double cost, DtPathPlanner* pathPlanner);
00123    virtual ~DtVectorPathNode();
00124 
00128    virtual void generateChildNodes();
00129 
00131    virtual bool visited();
00132 
00134    virtual void markVisited();
00135 
00136 protected:
00137    const DtNetworkSegment* myNetworkSegment;
00138    int mySegmentPosition;
00139 
00140 };
00141 
00142 #endif
00143 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)