Gamedev Framework (gf)  0.19.0
A C++17 framework for 2D games
Public Member Functions | List of all members
gf::OrthogonalHelper Class Reference

A helper for computing coordinates in an orthogonal map. More...

#include <gf/Orthogonal.h>

Public Member Functions

RectF computeBounds (Vector2i layerSize, Vector2f tileSize) const
 
RectI computeVisibleArea (const RectF &local, Vector2f tileSize) const
 
RectF computeCellBounds (Vector2i coords, Vector2f tileSize) const
 
Vector2i computeCoordinates (Vector2f position, Vector2f tileSize) const
 
Polyline computePolyline (Vector2i coords, Vector2f tileSize) const
 
void forEachNeighbor (Vector2i coords, Vector2i layerSize, std::function< void(Vector2i)> func) const
 

Detailed Description

A helper for computing coordinates in an orthogonal map.

Member Function Documentation

◆ computeBounds()

RectF gf::OrthogonalHelper::computeBounds ( Vector2i  layerSize,
Vector2f  tileSize 
) const

◆ computeCellBounds()

RectF gf::OrthogonalHelper::computeCellBounds ( Vector2i  coords,
Vector2f  tileSize 
) const

◆ computeCoordinates()

Vector2i gf::OrthogonalHelper::computeCoordinates ( Vector2f  position,
Vector2f  tileSize 
) const

◆ computePolyline()

Polyline gf::OrthogonalHelper::computePolyline ( Vector2i  coords,
Vector2f  tileSize 
) const

◆ computeVisibleArea()

RectI gf::OrthogonalHelper::computeVisibleArea ( const RectF local,
Vector2f  tileSize 
) const

◆ forEachNeighbor()

void gf::OrthogonalHelper::forEachNeighbor ( Vector2i  coords,
Vector2i  layerSize,
std::function< void(Vector2i)>  func 
) const