nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::Grid< T > Class Template Reference

#include <terrain.h>

Public Member Functions

 Grid (T *cells, int rows, int columns)
T & operator[] (int j, int i) const

Detailed Description

template<typename T>
class nanommo::Grid< T >

A grid kept in a single array, a row after another: grid[j, i] is the i-th of row j. Like a span, it points into the array and doesn't keep it. An index outside its row or column stops the program, as a column past the end of a row would still be inside the array, in the next row.

Definition at line 16 of file terrain.h.

Constructor & Destructor Documentation

◆ Grid()

template<typename T>
nanommo::Grid< T >::Grid ( T * cells,
int rows,
int columns )
inline

Definition at line 18 of file terrain.h.

Member Function Documentation

◆ operator[]()

template<typename T>
T & nanommo::Grid< T >::operator[] ( int j,
int i ) const
inline

Definition at line 21 of file terrain.h.


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