Horizon Official Technical Documentation
Horizon::Zone::AStar::Node Struct Reference

#include <AStar.hpp>

+ Collaboration diagram for Horizon::Zone::AStar::Node:

Public Member Functions

 Node (MapCoords coord_, std::shared_ptr< Node > parent_=nullptr)
 
uint32_t getFScore () const
 

Public Attributes

uint32_t G
 
uint32_t H
 
MapCoords coordinates
 
std::shared_ptr< Nodeparent
 

Constructor & Destructor Documentation

◆ Node()

Horizon::Zone::AStar::Node::Node ( MapCoords  coord_,
std::shared_ptr< Node parent_ = nullptr 
)
inlineexplicit
87 {
88 parent = parent_;
89 coordinates = coord_;
90 G = H = 0;
91 }
uint32_t G
Definition: AStar.hpp:82
MapCoords coordinates
Definition: AStar.hpp:83
uint32_t H
Definition: AStar.hpp:82
std::shared_ptr< Node > parent
Definition: AStar.hpp:84

References coordinates, G, H, and parent.

Member Function Documentation

◆ getFScore()

uint32_t Horizon::Zone::AStar::Node::getFScore ( ) const
inline
93{ return G + H; }

References G, and H.

Member Data Documentation

◆ coordinates

MapCoords Horizon::Zone::AStar::Node::coordinates

Referenced by Node().

◆ G

uint32_t Horizon::Zone::AStar::Node::G

Referenced by getFScore(), and Node().

◆ H

uint32_t Horizon::Zone::AStar::Node::H

Referenced by getFScore(), and Node().

◆ parent

std::shared_ptr<Node> Horizon::Zone::AStar::Node::parent

Referenced by Node().


The documentation for this struct was generated from the following file: