HighMap library (C++)
Loading...
Searching...
No Matches
hmap::CellPath Class Reference

Ordered path of grid cell indices. More...

#include <cell_path.hpp>

Public Member Functions

 CellPath ()=default
 
 CellPath (const std::vector< glm::ivec2 > &indices)
 Construct a path by copying cell indices.
 
 CellPath (std::vector< glm::ivec2 > &&indices)
 Construct a path by moving cell indices.
 
std::vector< glm::ivec2 > & get_indices ()
 Get the cell indices.
 
const std::vector< glm::ivec2 > & get_indices () const
 Get the cell indices.
 

Detailed Description

Ordered path of grid cell indices.

Stores a sequence of 2D integer coordinates (i, j) representing a path through a grid or array.

Constructor & Destructor Documentation

◆ CellPath() [1/3]

hmap::CellPath::CellPath ( )
default

◆ CellPath() [2/3]

hmap::CellPath::CellPath ( const std::vector< glm::ivec2 > &  indices)

Construct a path by copying cell indices.

Parameters
indicesOrdered cell indices.

◆ CellPath() [3/3]

hmap::CellPath::CellPath ( std::vector< glm::ivec2 > &&  indices)

Construct a path by moving cell indices.

Parameters
indicesOrdered cell indices.

Member Function Documentation

◆ get_indices() [1/2]

std::vector< glm::ivec2 > & hmap::CellPath::get_indices ( )

Get the cell indices.

Returns
Mutable reference to the indices.

◆ get_indices() [2/2]

const std::vector< glm::ivec2 > & hmap::CellPath::get_indices ( ) const

Get the cell indices.

Returns
Const reference to the indices.

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