载入中...
搜索中...
未找到

ECS tile layer entity. Script mutates tile GIDs / tileset / draw; TileRenderSystem batch-draws atlas quads (or solid debug colors when no texture). 更多...

#include <TileLayer.h>

类 eve::map::TileLayer 继承关系图:

类

struct  Config
 Config public API. 更多...
 
struct  Draw
 
struct  Resource
 
struct  Tiles
 
struct  Tileset
 

Public 成员函数

void release () override
 Entity.
 
void setOrigin (float x, float y)
 World origin of the layer (pixels).
 
float getX ()
 
float getY ()
 
int getMapWidth ()
 Map dimensions in tiles.
 
int getMapHeight ()
 
float getTileWidth ()
 Tile size in pixels.
 
float getTileHeight ()
 
void setTileSize (float tileW, float tileH)
 
void setCellGap (float gapX, float gapY)
 Sets extra world-space distance between projected cells.
 
void setRenderSpacing (float spacingX, float spacingY)
 Sets projected cell pitch as a multiple of the logical tile size.
 
float getCellGapX ()
 Horizontal and vertical world-space gaps between projected cells.
 
float getCellGapY ()
 
float getRenderSpacingX ()
 Horizontal and vertical projected pitch multipliers.
 
float getRenderSpacingY ()
 
void setVisualScale (float scaleX, float scaleY)
 Scales atlas-pixel tile visuals into world units when drawing.
 
float getVisualScaleX ()
 Current horizontal visual-to-world scale.
 
float getVisualScaleY ()
 Current vertical visual-to-world scale.
 
void resize (int mapW, int mapH)
 Resizes the tile grid (existing GIDs preserved where possible).
 
void setTile (int tx, int ty, int gid)
 Tile GID access; 0 = empty.
 
int getTile (int tx, int ty)
 
void fillRect (int x, int y, int width, int height, int gid)
 Fill a clipped rectangular region and publish one tile revision.
 
void fill (int gid)
 Fills the whole layer with one GID.
 
void clear ()
 Clears the layer to empty.
 
int getRevision ()
 Monotonic tile-data revision used by derived navigation/FOV caches.
 
int getChunkSize ()
 Runtime spatial-index diagnostics.
 
int getChunkCount ()
 
int getNonEmptyChunkCount ()
 
void rebuildSpatialIndex ()
 Rebuild chunk occupancy after bulk loader writes directly to gids.
 
void clearTileAnimation (int gid)
 TileSet v2 animation authoring; frames are selected during map update/render.
 
void addTileAnimationFrame (int gid, int frameGid, int durationMs)
 
int getTileAnimationFrameCount (int gid)
 
void setTileDataString (int gid, const std::string &name, const std::string &value)
 TileSet v2 typed custom data (stored losslessly as canonical text).
 
void setTileDataNumber (int gid, const std::string &name, float value)
 
void setTileDataBool (int gid, const std::string &name, bool value)
 
std::string getTileDataType (int gid, const std::string &name)
 
std::string getTileDataString (int gid, const std::string &name)
 
float getTileDataNumber (int gid, const std::string &name)
 
bool getTileDataBool (int gid, const std::string &name)
 
void setTerrainRule (int gid, int terrain, int neighborMask)
 Register an 8-neighbor terrain rule and paint with local re-resolution.
 
void defineAutotileFamily (int terrain, const std::string &kind, int seed=0)
 Defines a deterministic resolver family: terrain, shore, wall or waterfall.
 
void setAutotileRule (int gid, int terrain, int neighborMask, int weight=1)
 Adds an exact eight-neighbor rule with deterministic variant weight.
 
void clearTerrainRules ()
 
void paintTerrain (int x, int y, int terrain)
 
void paintTerrainRect (int x, int y, int width, int height, int terrain)
 Paints a clipped rectangle and resolves one dirty-region revision.
 
void fillTerrain (int terrain)
 Replaces every logical terrain cell and resolves the whole layer.
 
void eraseTerrainRect (int x, int y, int width, int height)
 Erases logical terrain and visual GIDs in a clipped rectangle.
 
int getTerrain (int x, int y)
 
void setTileset (graphics::Texture *texture, int firstGid, int columns, int margin=0, int spacing=0)
 Binds the atlas texture and tile table.
 
void setTilesetTileSize (int tileW, int tileH)
 Tile size in pixels of the bound tileset.
 
void setTileVisual (int gid, int x, int y, int width, int height, float pivotX, float pivotY, float sortBias=0.f)
 Defines or replaces one irregular atlas region.
 
void clearTileVisuals ()
 Removes all irregular per-GID visual metadata.
 
int getTileVisualCount ()
 Number of irregular visual records.
 
void setTileMetadata (int gid, int footprintW, int footprintH, bool walkable, float cost=1.f)
 Configures gameplay metadata kept beside a visual record.
 
void setTileNavigationProfile (int gid, bool walkable, float cost, int enterMask, int exitMask, bool opaque, int semanticFlags=0)
 Sets canonical navigation, collision and visibility metadata for one GID.
 
bool loadTilesetManifest (const std::string &path)
 Loads an extensible TileSet manifest without changing map cell data.
 
graphics::Texture * getTilesetTexture ()
 Bound tileset accessors.
 
int getTilesetFirstGid ()
 
int getTilesetColumns ()
 
void setCanvas (graphics::Canvas *canvas)
 Draw target canvas / camera.
 
void setCamera (graphics::Camera2D *camera)
 
void setLayer (int layer)
 Draw order layer / visibility / tint.
 
int getLayer ()
 
void setVisible (bool visible)
 
bool isVisible ()
 
void setReceiveLight (bool receive)
 Enable Light2D shading for this layer's tiles.
 
bool getReceiveLight ()
 Whether this layer's tiles receive Light2D.
 
void setTint (float r, float g, float b, float a=1.f)
 
bool applyConfig (const std::string &json)
 Applies a map JSON config (Config + Tiles + Tileset + Draw).
 
bool loadConfig (const std::string &path)
 Loads a config file and binds it for hot reload.
 
bool reloadConfig ()
 Re-reads the bound config file (hot reload).
 
void setAutoReload (bool enable)
 Enables/disables automatic config hot reload.
 
bool getAutoReload ()
 
std::string getConfigPath ()
 Path of the bound config file.
 
void tileToWorld (int tx, int ty, float &wx, float &wy)
 Tile-index ↔ world-pixel conversions (per layer orientation).
 
float depthY (int tx, int ty)
 Painter's-algorithm depth for 2.5D draw ordering.
 
void worldToTile (float wx, float wy, int &tx, int &ty)
 
float tileToWorldX (int tx, int ty)
 Scalar conversion helpers.
 
float tileToWorldY (int tx, int ty)
 
float depthYAt (int tx, int ty)
 
int worldToTileX (float wx, float wy)
 
int worldToTileY (float wx, float wy)
 

静态 Public 成员函数

static TileLayer * createLayer (int mapW, int mapH, float tileW=32.f, float tileH=32.f)
 

详细描述

ECS tile layer entity. Script mutates tile GIDs / tileset / draw; TileRenderSystem batch-draws atlas quads (or solid debug colors when no texture).

GID 0 = empty. Integer tile APIs preserve all 32 bits, including Tiled flip flags. A negative int is a signed transport of those bits, not an erase code. Use tileGid() to inspect the identity without flags, and 0 to erase.

在文件 TileLayer.h 第 32 行定义.

成员函数说明

◆ addTileAnimationFrame()

void eve::map::TileLayer::addTileAnimationFrame ( int  gid,
int  frameGid,
int  durationMs 
)

在文件 TileLayer.cpp 第 151 行定义.

引用了 a , 以及 animations.

◆ applyConfig()

bool eve::map::TileLayer::applyConfig ( const std::string &  json)

Applies a map JSON config (Config + Tiles + Tileset + Draw).

在文件 TileLayer.cpp 第 536 行定义.

引用了 eve::map::applyConfigText().

◆ clear()

void eve::map::TileLayer::clear ( )

Clears the layer to empty.

在文件 TileLayer.cpp 第 115 行定义.

引用了 fill().

◆ clearTerrainRules()

void eve::map::TileLayer::clearTerrainRules ( )

◆ clearTileAnimation()

void eve::map::TileLayer::clearTileAnimation ( int  gid)

TileSet v2 animation authoring; frames are selected during map update/render.

在文件 TileLayer.cpp 第 144 行定义.

引用了 a , 以及 animations.

◆ clearTileVisuals()

void eve::map::TileLayer::clearTileVisuals ( )

Removes all irregular per-GID visual metadata.

在文件 TileLayer.cpp 第 467 行定义.

引用了 tiles , 以及 eve::map::TileLayer::Tileset::visuals.

◆ createLayer()

TileLayer * eve::map::TileLayer::createLayer ( int  mapW,
int  mapH,
float  tileW = 32.f,
float  tileH = 32.f 
)
static

在文件 TileLayer.cpp 第 14 行定义.

引用了 resize(), setTileSize(), tileH , 以及 tileW.

被这些函数引用 eve::map::Map::newLayer().

◆ defineAutotileFamily()

void eve::map::TileLayer::defineAutotileFamily ( int  terrain,
const std::string &  kind,
int  seed = 0 
)

Defines a deterministic resolver family: terrain, shore, wall or waterfall.

在文件 TileLayer.cpp 第 236 行定义.

引用了 kind, seed, terrain , 以及 tiles.

◆ depthY()

float eve::map::TileLayer::depthY ( int  tx,
int  ty 
)

Painter's-algorithm depth for 2.5D draw ordering.

在文件 TileLayer.cpp 第 550 行定义.

引用了 eve::map::tileToDepthY().

被这些函数引用 depthYAt().

◆ depthYAt()

float eve::map::TileLayer::depthYAt ( int  tx,
int  ty 
)

在文件 TileLayer.cpp 第 568 行定义.

引用了 depthY().

◆ eraseTerrainRect()

void eve::map::TileLayer::eraseTerrainRect ( int  x,
int  y,
int  width,
int  height 
)

Erases logical terrain and visual GIDs in a clipped rectangle.

在文件 TileLayer.cpp 第 370 行定义.

引用了 c, cell, cx, cy, height, t, tiles, width, x , 以及 y.

◆ fill()

void eve::map::TileLayer::fill ( int  gid)

Fills the whole layer with one GID.

在文件 TileLayer.cpp 第 102 行定义.

引用了 g, rebuildSpatialIndex(), t, tiles , 以及 v.

被这些函数引用 clear().

◆ fillRect()

void eve::map::TileLayer::fillRect ( int  x,
int  y,
int  width,
int  height,
int  gid 
)

Fill a clipped rectangular region and publish one tile revision.

在文件 TileLayer.cpp 第 78 行定义.

引用了 c, height, index, rebuildSpatialIndex(), t, tiles, width, x , 以及 y.

◆ fillTerrain()

void eve::map::TileLayer::fillTerrain ( int  terrain)

Replaces every logical terrain cell and resolves the whole layer.

在文件 TileLayer.cpp 第 363 行定义.

引用了 t, terrain , 以及 tiles.

◆ getAutoReload()

bool eve::map::TileLayer::getAutoReload ( )

在文件 TileLayer.cpp 第 543 行定义.

引用了 resource.

◆ getCellGapX()

float eve::map::TileLayer::getCellGapX ( )

Horizontal and vertical world-space gaps between projected cells.

在文件 TileLayer.cpp 第 430 行定义.

◆ getCellGapY()

float eve::map::TileLayer::getCellGapY ( )

在文件 TileLayer.cpp 第 431 行定义.

◆ getChunkCount()

int eve::map::TileLayer::getChunkCount ( )

在文件 TileLayer.cpp 第 119 行定义.

引用了 tiles.

◆ getChunkSize()

int eve::map::TileLayer::getChunkSize ( )

Runtime spatial-index diagnostics.

在文件 TileLayer.cpp 第 118 行定义.

引用了 eve::map::TileLayer::Tiles::kChunkSize.

◆ getConfigPath()

std::string eve::map::TileLayer::getConfigPath ( )

Path of the bound config file.

在文件 TileLayer.cpp 第 544 行定义.

引用了 resource.

◆ getLayer()

int eve::map::TileLayer::getLayer ( )

在文件 TileLayer.cpp 第 524 行定义.

引用了 draw.

被这些函数引用 eve::map::resolveDualGrid().

◆ getMapHeight()

int eve::map::TileLayer::getMapHeight ( )

◆ getMapWidth()

int eve::map::TileLayer::getMapWidth ( )

◆ getNonEmptyChunkCount()

int eve::map::TileLayer::getNonEmptyChunkCount ( )

在文件 TileLayer.cpp 第 120 行定义.

引用了 count , 以及 tiles.

◆ getReceiveLight()

bool eve::map::TileLayer::getReceiveLight ( )

Whether this layer's tiles receive Light2D.

在文件 TileLayer.cpp 第 530 行定义.

引用了 draw.

◆ getRenderSpacingX()

float eve::map::TileLayer::getRenderSpacingX ( )

Horizontal and vertical projected pitch multipliers.

在文件 TileLayer.cpp 第 432 行定义.

◆ getRenderSpacingY()

float eve::map::TileLayer::getRenderSpacingY ( )

在文件 TileLayer.cpp 第 435 行定义.

◆ getRevision()

int eve::map::TileLayer::getRevision ( )

Monotonic tile-data revision used by derived navigation/FOV caches.

在文件 TileLayer.cpp 第 117 行定义.

引用了 revision , 以及 tiles.

◆ getTerrain()

int eve::map::TileLayer::getTerrain ( int  x,
int  y 
)

在文件 TileLayer.cpp 第 270 行定义.

引用了 c, index, t, tiles, x , 以及 y.

◆ getTile()

int eve::map::TileLayer::getTile ( int  tx,
int  ty 
)

◆ getTileAnimationFrameCount()

int eve::map::TileLayer::getTileAnimationFrameCount ( int  gid)

在文件 TileLayer.cpp 第 164 行定义.

◆ getTileDataBool()

bool eve::map::TileLayer::getTileDataBool ( int  gid,
const std::string &  name 
)

在文件 TileLayer.cpp 第 227 行定义.

引用了 name.

◆ getTileDataNumber()

float eve::map::TileLayer::getTileDataNumber ( int  gid,
const std::string &  name 
)

在文件 TileLayer.cpp 第 220 行定义.

引用了 name.

◆ getTileDataString()

std::string eve::map::TileLayer::getTileDataString ( int  gid,
const std::string &  name 
)

在文件 TileLayer.cpp 第 215 行定义.

引用了 name.

◆ getTileDataType()

std::string eve::map::TileLayer::getTileDataType ( int  gid,
const std::string &  name 
)

在文件 TileLayer.cpp 第 210 行定义.

引用了 name.

◆ getTileHeight()

float eve::map::TileLayer::getTileHeight ( )

在文件 TileLayer.cpp 第 38 行定义.

被这些函数引用 eve::map::resolveDualGrid().

◆ getTilesetColumns()

int eve::map::TileLayer::getTilesetColumns ( )

在文件 TileLayer.cpp 第 518 行定义.

引用了 eve::map::TileLayer::Tileset::columns.

◆ getTilesetFirstGid()

int eve::map::TileLayer::getTilesetFirstGid ( )

在文件 TileLayer.cpp 第 517 行定义.

引用了 eve::map::TileLayer::Tileset::firstGid.

◆ getTilesetTexture()

graphics::Texture * eve::map::TileLayer::getTilesetTexture ( )

Bound tileset accessors.

在文件 TileLayer.cpp 第 516 行定义.

引用了 eve::map::TileLayer::Tileset::texture.

◆ getTileVisualCount()

int eve::map::TileLayer::getTileVisualCount ( )

Number of irregular visual records.

在文件 TileLayer.cpp 第 472 行定义.

引用了 visuals.

◆ getTileWidth()

float eve::map::TileLayer::getTileWidth ( )

Tile size in pixels.

在文件 TileLayer.cpp 第 37 行定义.

被这些函数引用 eve::map::resolveDualGrid().

◆ getVisualScaleX()

float eve::map::TileLayer::getVisualScaleX ( )

Current horizontal visual-to-world scale.

在文件 TileLayer.cpp 第 444 行定义.

引用了 draw.

◆ getVisualScaleY()

float eve::map::TileLayer::getVisualScaleY ( )

Current vertical visual-to-world scale.

在文件 TileLayer.cpp 第 445 行定义.

引用了 draw.

◆ getX()

float eve::map::TileLayer::getX ( )

在文件 TileLayer.cpp 第 32 行定义.

被这些函数引用 eve::map::resolveDualGrid().

◆ getY()

float eve::map::TileLayer::getY ( )

在文件 TileLayer.cpp 第 33 行定义.

被这些函数引用 eve::map::resolveDualGrid().

◆ isVisible()

bool eve::map::TileLayer::isVisible ( )

在文件 TileLayer.cpp 第 527 行定义.

引用了 draw.

◆ loadConfig()

bool eve::map::TileLayer::loadConfig ( const std::string &  path)

Loads a config file and binds it for hot reload.

在文件 TileLayer.cpp 第 538 行定义.

引用了 eve::map::loadConfigFile() , 以及 path.

◆ loadTilesetManifest()

bool eve::map::TileLayer::loadTilesetManifest ( const std::string &  path)

Loads an extensible TileSet manifest without changing map cell data.

在文件 TileLayer.cpp 第 512 行定义.

引用了 eve::map::loadTilesetManifestFile() , 以及 path.

◆ paintTerrain()

void eve::map::TileLayer::paintTerrain ( int  x,
int  y,
int  terrain 
)

在文件 TileLayer.cpp 第 341 行定义.

引用了 c, t, terrain, tiles, x , 以及 y.

◆ paintTerrainRect()

void eve::map::TileLayer::paintTerrainRect ( int  x,
int  y,
int  width,
int  height,
int  terrain 
)

Paints a clipped rectangle and resolves one dirty-region revision.

在文件 TileLayer.cpp 第 350 行定义.

引用了 c, cx, cy, height, t, terrain, tiles, width, x , 以及 y.

◆ rebuildSpatialIndex()

void eve::map::TileLayer::rebuildSpatialIndex ( )

Rebuild chunk occupancy after bulk loader writes directly to gids.

在文件 TileLayer.cpp 第 127 行定义.

引用了 c, index, eve::map::TileLayer::Tiles::kChunkSize, t, eve::map::tileGid(), tiles, x , 以及 y.

被这些函数引用 fill(), fillRect() , 以及 resize().

◆ release()

void eve::map::TileLayer::release ( )
inlineoverride

Entity.

Release.

在文件 TileLayer.h 第 38 行定义.

◆ reloadConfig()

bool eve::map::TileLayer::reloadConfig ( )

Re-reads the bound config file (hot reload).

在文件 TileLayer.cpp 第 540 行定义.

引用了 eve::map::reloadConfigFile().

◆ resize()

void eve::map::TileLayer::resize ( int  mapW,
int  mapH 
)

Resizes the tile grid (existing GIDs preserved where possible).

在文件 TileLayer.cpp 第 46 行定义.

引用了 c, n, rebuildSpatialIndex(), tiles , 以及 u.

被这些函数引用 createLayer() , 以及 eve::map::resolveDualGrid().

◆ setAutoReload()

void eve::map::TileLayer::setAutoReload ( bool  enable)

Enables/disables automatic config hot reload.

在文件 TileLayer.cpp 第 542 行定义.

引用了 resource.

◆ setAutotileRule()

void eve::map::TileLayer::setAutotileRule ( int  gid,
int  terrain,
int  neighborMask,
int  weight = 1 
)

Adds an exact eight-neighbor rule with deterministic variant weight.

在文件 TileLayer.cpp 第 251 行定义.

引用了 terrain, eve::map::TileLayer::Tileset::terrainRules, tiles , 以及 weight.

被这些函数引用 setTerrainRule().

◆ setCamera()

void eve::map::TileLayer::setCamera ( graphics::Camera2D *  camera)

在文件 TileLayer.cpp 第 521 行定义.

引用了 camera , 以及 draw.

被这些函数引用 eve::map::resolveDualGrid().

◆ setCanvas()

void eve::map::TileLayer::setCanvas ( graphics::Canvas *  canvas)

Draw target canvas / camera.

在文件 TileLayer.cpp 第 520 行定义.

引用了 draw.

被这些函数引用 eve::map::resolveDualGrid().

◆ setCellGap()

void eve::map::TileLayer::setCellGap ( float  gapX,
float  gapY 
)

Sets extra world-space distance between projected cells.

在文件 TileLayer.cpp 第 420 行定义.

引用了 tileH , 以及 tileW.

◆ setLayer()

void eve::map::TileLayer::setLayer ( int  layer)

Draw order layer / visibility / tint.

在文件 TileLayer.cpp 第 523 行定义.

引用了 draw , 以及 layer.

被这些函数引用 eve::map::resolveDualGrid().

◆ setOrigin()

void eve::map::TileLayer::setOrigin ( float  x,
float  y 
)

World origin of the layer (pixels).

在文件 TileLayer.cpp 第 27 行定义.

引用了 x , 以及 y.

被这些函数引用 eve::map::resolveDualGrid().

◆ setReceiveLight()

void eve::map::TileLayer::setReceiveLight ( bool  receive)

Enable Light2D shading for this layer's tiles.

参数
receiveWhen true, textured tiles use the lit2d path with a flat normal.

在文件 TileLayer.cpp 第 529 行定义.

引用了 draw.

◆ setRenderSpacing()

void eve::map::TileLayer::setRenderSpacing ( float  spacingX,
float  spacingY 
)

Sets projected cell pitch as a multiple of the logical tile size.

在文件 TileLayer.cpp 第 425 行定义.

引用了 spacingX.

◆ setTerrainRule()

void eve::map::TileLayer::setTerrainRule ( int  gid,
int  terrain,
int  neighborMask 
)

Register an 8-neighbor terrain rule and paint with local re-resolution.

在文件 TileLayer.cpp 第 232 行定义.

引用了 setAutotileRule() , 以及 terrain.

◆ setTile()

void eve::map::TileLayer::setTile ( int  tx,
int  ty,
int  gid 
)

Tile GID access; 0 = empty.

在文件 TileLayer.cpp 第 56 行定义.

引用了 c, index, eve::map::TileLayer::Tiles::kChunkSize, t, eve::map::tileGid() , 以及 tiles.

被这些函数引用 eve::map::resolveDualGrid() , 以及 eve::map_editing::TileLayerTarget::writeInt().

◆ setTileDataBool()

void eve::map::TileLayer::setTileDataBool ( int  gid,
const std::string &  name,
bool  value 
)

在文件 TileLayer.cpp 第 203 行定义.

引用了 name , 以及 value.

◆ setTileDataNumber()

void eve::map::TileLayer::setTileDataNumber ( int  gid,
const std::string &  name,
float  value 
)

在文件 TileLayer.cpp 第 194 行定义.

引用了 name , 以及 value.

◆ setTileDataString()

void eve::map::TileLayer::setTileDataString ( int  gid,
const std::string &  name,
const std::string &  value 
)

TileSet v2 typed custom data (stored losslessly as canonical text).

在文件 TileLayer.cpp 第 187 行定义.

引用了 name , 以及 value.

◆ setTileMetadata()

void eve::map::TileLayer::setTileMetadata ( int  gid,
int  footprintW,
int  footprintH,
bool  walkable,
float  cost = 1.f 
)

Configures gameplay metadata kept beside a visual record.

在文件 TileLayer.cpp 第 474 行定义.

引用了 cost, tiles, v, visuals , 以及 eve::map::TileLayer::Tileset::visuals.

◆ setTileNavigationProfile()

void eve::map::TileLayer::setTileNavigationProfile ( int  gid,
bool  walkable,
float  cost,
int  enterMask,
int  exitMask,
bool  opaque,
int  semanticFlags = 0 
)

Sets canonical navigation, collision and visibility metadata for one GID.

在文件 TileLayer.cpp 第 492 行定义.

引用了 cost, enterMask, exitMask , 以及 tiles.

◆ setTileset()

void eve::map::TileLayer::setTileset ( graphics::Texture *  texture,
int  firstGid,
int  columns,
int  margin = 0,
int  spacing = 0 
)

Binds the atlas texture and tile table.

在文件 TileLayer.cpp 第 387 行定义.

引用了 columns, firstGid, margin, resource, spacing, tileH , 以及 tileW.

◆ setTilesetTileSize()

void eve::map::TileLayer::setTilesetTileSize ( int  tileW,
int  tileH 
)

Tile size in pixels of the bound tileset.

在文件 TileLayer.cpp 第 410 行定义.

引用了 tileH , 以及 tileW.

◆ setTileSize()

void eve::map::TileLayer::setTileSize ( float  tileW,
float  tileH 
)

在文件 TileLayer.cpp 第 40 行定义.

引用了 c, tileH , 以及 tileW.

被这些函数引用 createLayer() , 以及 eve::map::resolveDualGrid().

◆ setTileVisual()

void eve::map::TileLayer::setTileVisual ( int  gid,
int  x,
int  y,
int  width,
int  height,
float  pivotX,
float  pivotY,
float  sortBias = 0.f 
)

Defines or replaces one irregular atlas region.

参数
gidGlobal tile id.
xRegion left in atlas pixels.
yRegion top in atlas pixels.
widthRegion width in atlas pixels.
heightRegion height in atlas pixels.
pivotXRegion-space point aligned with the projected tile origin.
pivotYRegion-space point aligned with the projected tile origin.
sortBiasExtra painter-order offset in pixels.

在文件 TileLayer.cpp 第 447 行定义.

引用了 height, v, visuals, eve::map::TileLayer::Tileset::visuals, width, x , 以及 y.

◆ setTint()

void eve::map::TileLayer::setTint ( float  r,
float  g,
float  b,
float  a = 1.f 
)

在文件 TileLayer.cpp 第 532 行定义.

引用了 a, b, draw, g , 以及 r.

◆ setVisible()

void eve::map::TileLayer::setVisible ( bool  visible)

在文件 TileLayer.cpp 第 526 行定义.

引用了 draw , 以及 visible.

被这些函数引用 eve::map::resolveDualGrid().

◆ setVisualScale()

void eve::map::TileLayer::setVisualScale ( float  scaleX,
float  scaleY 
)

Scales atlas-pixel tile visuals into world units when drawing.

参数
scaleXHorizontal multiplier. Values <= 0 are treated as 1.
scaleYVertical multiplier. Values <= 0 are treated as 1. @cost Cheap. Applied while collecting draw items; does not rebuild the atlas.

在文件 TileLayer.cpp 第 439 行定义.

引用了 draw.

◆ tileToWorld()

void eve::map::TileLayer::tileToWorld ( int  tx,
int  ty,
float &  wx,
float &  wy 
)

Tile-index ↔ world-pixel conversions (per layer orientation).

在文件 TileLayer.cpp 第 546 行定义.

引用了 eve::map::tileToWorld(), wx , 以及 wy.

被这些函数引用 tileToWorldX() , 以及 tileToWorldY().

◆ tileToWorldX()

float eve::map::TileLayer::tileToWorldX ( int  tx,
int  ty 
)

Scalar conversion helpers.

在文件 TileLayer.cpp 第 556 行定义.

引用了 tileToWorld(), wx , 以及 wy.

◆ tileToWorldY()

float eve::map::TileLayer::tileToWorldY ( int  tx,
int  ty 
)

在文件 TileLayer.cpp 第 562 行定义.

引用了 tileToWorld(), wx , 以及 wy.

◆ worldToTile()

void eve::map::TileLayer::worldToTile ( float  wx,
float  wy,
int &  tx,
int &  ty 
)

在文件 TileLayer.cpp 第 552 行定义.

引用了 eve::map::worldToTile(), wx , 以及 wy.

被这些函数引用 worldToTileX() , 以及 worldToTileY().

◆ worldToTileX()

int eve::map::TileLayer::worldToTileX ( float  wx,
float  wy 
)

在文件 TileLayer.cpp 第 570 行定义.

引用了 worldToTile(), wx , 以及 wy.

◆ worldToTileY()

int eve::map::TileLayer::worldToTileY ( float  wx,
float  wy 
)

在文件 TileLayer.cpp 第 576 行定义.

引用了 worldToTile(), wx , 以及 wy.


该类的文档由以下文件生成: