Skip to content

Class endstone::MapRenderer

ClassList > endstone > MapRenderer

Represents a renderer for a map.

  • #include <endstone/map/map_renderer.h>

Public Functions

Type Name
MapRenderer (const bool is_contextual=false)
Initialize the map renderer base with the given contextual status.
virtual void initialize (MapView & map)
Initialize this MapRenderer for the given map.
bool isContextual () const
Get whether the renderer is contextual, i.e. has different canvases for different players.
virtual void render (MapView & map, MapCanvas & canvas, Player & player) = 0
Render to the given map.
virtual ~MapRenderer () = default

Public Functions Documentation

function MapRenderer

Initialize the map renderer base with the given contextual status.

inline explicit endstone::MapRenderer::MapRenderer (
    const  bool is_contextual=false
) 

Parameters:

  • is_contextual Whether the renderer is contextual. See isContextual().

function initialize

Initialize this MapRenderer for the given map.

inline virtual void endstone::MapRenderer::initialize (
    MapView & map
) 

Parameters:

  • map The MapView being initialized.

function isContextual

Get whether the renderer is contextual, i.e. has different canvases for different players.

inline bool endstone::MapRenderer::isContextual () const

Returns:

true if contextual, false otherwise.


function render

Render to the given map.

virtual void endstone::MapRenderer::render (
    MapView & map,
    MapCanvas & canvas,
    Player & player
) = 0

Parameters:

  • map The MapView being rendered to.
  • canvas The canvas to use for rendering.
  • player The player who triggered the rendering.

function ~MapRenderer

virtual endstone::MapRenderer::~MapRenderer () = default


The documentation for this class was generated from the following file include/endstone/map/map_renderer.h