From 984202b1018a24603539e18900838de3e8f6e87e Mon Sep 17 00:00:00 2001 From: Koen Bussemaker Date: Mon, 11 Mar 2024 19:48:11 +0100 Subject: [PATCH] Codechange: Remove outdated YAPF example code --- src/pathfinder/yapf/yapf_base.hpp | 55 ------------------------------- 1 file changed, 55 deletions(-) diff --git a/src/pathfinder/yapf/yapf_base.hpp b/src/pathfinder/yapf/yapf_base.hpp index 88c875d842..de46ebb6c9 100644 --- a/src/pathfinder/yapf/yapf_base.hpp +++ b/src/pathfinder/yapf/yapf_base.hpp @@ -290,61 +290,6 @@ public: dmp.WriteStructT("m_nodes", &m_nodes); dmp.WriteValue("m_num_steps", m_num_steps); } - - /* methods that should be implemented at derived class Types::Tpf (derived from CYapfBaseT) */ - -#if 0 - /** Example: PfSetStartupNodes() - set source (origin) nodes */ - inline void PfSetStartupNodes() - { - /* example: */ - Node &n1 = *base::m_nodes.CreateNewNode(); - . - . // setup node members here - . - base::m_nodes.InsertOpenNode(n1); - } - - /** Example: PfFollowNode() - set following (child) nodes of the given node */ - inline void PfFollowNode(Node &org) - { - for (each follower of node org) { - Node &n = *base::m_nodes.CreateNewNode(); - . - . // setup node members here - . - n.m_parent = &org; // set node's parent to allow back tracking - AddNewNode(n); - } - } - - /** Example: PfCalcCost() - set path cost from origin to the given node */ - inline bool PfCalcCost(Node &n) - { - /* evaluate last step cost */ - int cost = ...; - /* set the node cost as sum of parent's cost and last step cost */ - n.m_cost = n.m_parent->m_cost + cost; - return true; // true if node is valid follower (i.e. no obstacle was found) - } - - /** Example: PfCalcEstimate() - set path cost estimate from origin to the target through given node */ - inline bool PfCalcEstimate(Node &n) - { - /* evaluate the distance to our destination */ - int distance = ...; - /* set estimate as sum of cost from origin + distance to the target */ - n.m_estimate = n.m_cost + distance; - return true; // true if node is valid (i.e. not too far away :) - } - - /** Example: PfDetectDestination() - return true if the given node is our destination */ - inline bool PfDetectDestination(Node &n) - { - bool bDest = (n.m_key.m_x == m_x2) && (n.m_key.m_y == m_y2); - return bDest; - } -#endif }; #endif /* YAPF_BASE_HPP */