DHART
Loading...
Searching...
No Matches
HF::SpatialStructures::Edge Struct Reference

A connection to a child node. More...

#include <Edge.h>

+ Collaboration diagram for HF::SpatialStructures::Edge:

Public Member Functions

 Edge (const Node &Child, float Score=0, STEP Step_Type=NONE)
 Construct a new edge to child. More...
 
 Edge ()
 Default Constructor. More...
 

Public Attributes

Node child
 The child node for this edge. More...
 
STEP step_type
 Step required to traverse this edge. More...
 
float score
 The cost required to traverse this edge. More...
 

Detailed Description

A connection to a child node.

Remarks
To save memory, edge contains no parent node. This is usually because edges can be placed in arrays to match the order of parent nodes.

Definition at line 29 of file Edge.h.

Constructor & Destructor Documentation

◆ Edge() [1/2]

HF::SpatialStructures::Edge::Edge ( const Node Child,
float  Score = 0,
STEP  Step_Type = NONE 
)

Construct a new edge to child.

Parameters
ChildThe node being traversed to.
ScoreThe cost to traverse from parent to child.
Step_TypeThe type of step required to traverse from parent to child.
// be sure to #include "Edge.h"
HF::SpatialStructures::Node node(12.0, 23.1, 34.2, 456);
float score = 4.3f;
@ NOT_CONNECTED
No connection between parent and child.
Definition: Edge.h:16
A connection to a child node.
Definition: Edge.h:29
float score
The cost required to traverse this edge.
Definition: Edge.h:32
A point in space with an ID.
Definition: node.h:38

Definition at line 12 of file edge.cpp.

◆ Edge() [2/2]

HF::SpatialStructures::Edge::Edge ( )
inline

Default Constructor.

Definition at line 53 of file Edge.h.

Member Data Documentation

◆ child

Node HF::SpatialStructures::Edge::child

The child node for this edge.

Definition at line 30 of file Edge.h.

◆ score

float HF::SpatialStructures::Edge::score

The cost required to traverse this edge.

Definition at line 32 of file Edge.h.

◆ step_type

STEP HF::SpatialStructures::Edge::step_type

Step required to traverse this edge.

See also
STEP for info on every step type.

Definition at line 31 of file Edge.h.


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