16#ifndef TRACKINGCA_INCLUDE_ROAD_H
17#define TRACKINGCA_INCLUDE_ROAD_H
27template <
unsigned char maxRoadSize>
41 GPUhdi() uint8_t getRoadSize()
const {
return mRoadSize; }
42 GPUhdi() bool isFakeRoad()
const {
return mIsFakeRoad; }
43 GPUhdi()
void setFakeRoad(const
bool fake) { mIsFakeRoad = fake; }
44 GPUhdi()
int& operator[](const
int&
i) {
return mCellIds[
i]; }
45 GPUhdi()
int operator[](const
int&
i)
const {
return mCellIds[
i]; }
49 for (
int i = 0;
i < maxRoadSize;
i++) {
50 mCellIds[
i] = constants::UnusedIndex;
57 if (mCellIds[cellLayer] == constants::UnusedIndex) {
61 mCellIds[cellLayer] =
cellId;
65 std::array<int, maxRoadSize> mCellIds = constants::helpers::initArray<int, maxRoadSize, constants::UnusedIndex>();
66 unsigned char mRoadSize{0};
67 bool mIsFakeRoad{
false};
GPUhdDefault() Road(const Road &)=default
GPUhdi() int operator[](const int &i) const
GPUhdi() bool isFakeRoad() const
GPUhd() Road(int cellLayer
GPUhdi() int &operator[](const int &i)
GPUhd() void addCell(int cellLayer
GPUhdi() void setFakeRoad(const bool fake)
GPUhdDefault() Road()=default
GPUhdi() uint8_t getRoadSize() const
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)