载入中...
搜索中...
未找到
eve::level_editing::Brush类 参考

Unity GridBrushBase-inspired tile brush. Operates on TileBuffer; exposes preview + change list for UI / undo. 更多...

#include <Brush.h>

Public 成员函数

 Brush ()
 Brush.
 
void setTool (const std::string &tool)
 Sets the tool.
 
std::string getTool () const
 Returns the tool.
 
void setSize (int size)
 Sets the size.
 
int getSize () const
 Returns the size.
 
void setShape (const std::string &shape)
 Sets the shape.
 
std::string getShape () const
 Returns the shape.
 
void setTile (int gid)
 Sets the tile.
 
int getTile () const
 Returns the tile.
 
void setEraseTile (int gid)
 Sets the erase tile.
 
int getEraseTile () const
 Returns the erase tile.
 
void setStampSize (int width, int height)
 Sets the stamp size.
 
int getStampWidth () const
 Returns the stamp width.
 
int getStampHeight () const
 Returns the stamp height.
 
void setStampTile (int lx, int ly, int gid)
 Sets the stamp tile.
 
int getStampTile (int lx, int ly) const
 Returns the stamp tile.
 
void clearStamp ()
 Clears stamp.
 
int paintAt (TileBuffer *buffer, int tx, int ty)
 Apply current tool at / between cells. Returns cells changed.
 
int eraseAt (TileBuffer *buffer, int tx, int ty)
 Erases at.
 
int floodFill (TileBuffer *buffer, int tx, int ty)
 Flood fill.
 
int paintLine (TileBuffer *buffer, int x0, int y0, int x1, int y1)
 Paint line.
 
int paintRect (TileBuffer *buffer, int x0, int y0, int x1, int y1, bool filled)
 Paint rect.
 
int previewAt (TileBuffer *buffer, int tx, int ty)
 Fill preview buffer without mutating target.
 
int previewLine (TileBuffer *buffer, int x0, int y0, int x1, int y1)
 Preview line.
 
int previewRect (TileBuffer *buffer, int x0, int y0, int x1, int y1, bool filled)
 Preview rect.
 
int getPreviewCount () const
 Returns the preview count.
 
int getPreviewX (int index) const
 Returns the preview x.
 
int getPreviewY (int index) const
 Returns the preview y.
 
int getPreviewGid (int index) const
 Returns the preview gid.
 
int getChangeCount () const
 Returns the change count.
 
int getChangeX (int index) const
 Returns the change x.
 
int getChangeY (int index) const
 Returns the change y.
 
int getChangeOldGid (int index) const
 Returns the change old gid.
 
int getChangeNewGid (int index) const
 Returns the change new gid.
 

详细描述

Unity GridBrushBase-inspired tile brush. Operates on TileBuffer; exposes preview + change list for UI / undo.

在文件 Brush.h 第 16 行定义.

构造及析构函数说明

◆ Brush()

eve::level_editing::Brush::Brush ( )
default

成员函数说明

◆ clearStamp()

void eve::level_editing::Brush::clearStamp ( )

Clears stamp.

在文件 Brush.cpp 第 59 行定义.

◆ eraseAt()

int eve::level_editing::Brush::eraseAt ( TileBuffer *  buffer,
int  tx,
int  ty 
)

Erases at.

在文件 Brush.cpp 第 201 行定义.

引用了 buffer , 以及 cells.

被这些函数引用 paintAt().

◆ floodFill()

int eve::level_editing::Brush::floodFill ( TileBuffer *  buffer,
int  tx,
int  ty 
)

Flood fill.

在文件 Brush.cpp 第 207 行定义.

引用了 buffer, d, idx, nx, ny, q, target, x , 以及 y.

被这些函数引用 paintAt().

◆ getChangeCount()

int eve::level_editing::Brush::getChangeCount ( ) const
inline

Returns the change count.

在文件 Brush.h 第 87 行定义.

◆ getChangeNewGid()

int eve::level_editing::Brush::getChangeNewGid ( int  index) const

Returns the change new gid.

在文件 Brush.cpp 第 328 行定义.

引用了 index.

◆ getChangeOldGid()

int eve::level_editing::Brush::getChangeOldGid ( int  index) const

Returns the change old gid.

在文件 Brush.cpp 第 324 行定义.

引用了 index.

◆ getChangeX()

int eve::level_editing::Brush::getChangeX ( int  index) const

Returns the change x.

在文件 Brush.cpp 第 316 行定义.

引用了 index.

◆ getChangeY()

int eve::level_editing::Brush::getChangeY ( int  index) const

Returns the change y.

在文件 Brush.cpp 第 320 行定义.

引用了 index.

◆ getEraseTile()

int eve::level_editing::Brush::getEraseTile ( ) const
inline

Returns the erase tile.

在文件 Brush.h 第 44 行定义.

◆ getPreviewCount()

int eve::level_editing::Brush::getPreviewCount ( ) const
inline

Returns the preview count.

在文件 Brush.h 第 78 行定义.

◆ getPreviewGid()

int eve::level_editing::Brush::getPreviewGid ( int  index) const

Returns the preview gid.

在文件 Brush.cpp 第 312 行定义.

引用了 index.

◆ getPreviewX()

int eve::level_editing::Brush::getPreviewX ( int  index) const

Returns the preview x.

在文件 Brush.cpp 第 304 行定义.

引用了 index.

◆ getPreviewY()

int eve::level_editing::Brush::getPreviewY ( int  index) const

Returns the preview y.

在文件 Brush.cpp 第 308 行定义.

引用了 index.

◆ getShape()

std::string eve::level_editing::Brush::getShape ( ) const
inline

Returns the shape.

在文件 Brush.h 第 34 行定义.

◆ getSize()

int eve::level_editing::Brush::getSize ( ) const
inline

Returns the size.

在文件 Brush.h 第 29 行定义.

◆ getStampHeight()

int eve::level_editing::Brush::getStampHeight ( ) const
inline

Returns the stamp height.

在文件 Brush.h 第 51 行定义.

◆ getStampTile()

int eve::level_editing::Brush::getStampTile ( int  lx,
int  ly 
) const

Returns the stamp tile.

在文件 Brush.cpp 第 52 行定义.

◆ getStampWidth()

int eve::level_editing::Brush::getStampWidth ( ) const
inline

Returns the stamp width.

在文件 Brush.h 第 49 行定义.

◆ getTile()

int eve::level_editing::Brush::getTile ( ) const
inline

Returns the tile.

在文件 Brush.h 第 39 行定义.

◆ getTool()

std::string eve::level_editing::Brush::getTool ( ) const
inline

Returns the tool.

在文件 Brush.h 第 24 行定义.

◆ paintAt()

int eve::level_editing::Brush::paintAt ( TileBuffer *  buffer,
int  tx,
int  ty 
)

Apply current tool at / between cells. Returns cells changed.

在文件 Brush.cpp 第 192 行定义.

引用了 buffer, cells, eraseAt() , 以及 floodFill().

◆ paintLine()

int eve::level_editing::Brush::paintLine ( TileBuffer *  buffer,
int  x0,
int  y0,
int  x1,
int  y1 
)

Paint line.

在文件 Brush.cpp 第 243 行定义.

引用了 buffer , 以及 cells.

◆ paintRect()

int eve::level_editing::Brush::paintRect ( TileBuffer *  buffer,
int  x0,
int  y0,
int  x1,
int  y1,
bool  filled 
)

Paint rect.

在文件 Brush.cpp 第 250 行定义.

引用了 buffer , 以及 cells.

◆ previewAt()

int eve::level_editing::Brush::previewAt ( TileBuffer *  buffer,
int  tx,
int  ty 
)

Fill preview buffer without mutating target.

在文件 Brush.cpp 第 257 行定义.

引用了 buffer, cells, ox, oy, p, x , 以及 y.

◆ previewLine()

int eve::level_editing::Brush::previewLine ( TileBuffer *  buffer,
int  x0,
int  y0,
int  x1,
int  y1 
)

Preview line.

在文件 Brush.cpp 第 283 行定义.

引用了 buffer , 以及 cells.

◆ previewRect()

int eve::level_editing::Brush::previewRect ( TileBuffer *  buffer,
int  x0,
int  y0,
int  x1,
int  y1,
bool  filled 
)

Preview rect.

在文件 Brush.cpp 第 290 行定义.

引用了 buffer , 以及 cells.

◆ setEraseTile()

void eve::level_editing::Brush::setEraseTile ( int  gid)

Sets the erase tile.

在文件 Brush.cpp 第 36 行定义.

◆ setShape()

void eve::level_editing::Brush::setShape ( const std::string &  shape)

Sets the shape.

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

引用了 shape.

◆ setSize()

void eve::level_editing::Brush::setSize ( int  size)

Sets the size.

在文件 Brush.cpp 第 22 行定义.

引用了 size.

◆ setStampSize()

void eve::level_editing::Brush::setStampSize ( int  width,
int  height 
)

Sets the stamp size.

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

引用了 height , 以及 width.

◆ setStampTile()

void eve::level_editing::Brush::setStampTile ( int  lx,
int  ly,
int  gid 
)

Sets the stamp tile.

在文件 Brush.cpp 第 45 行定义.

◆ setTile()

void eve::level_editing::Brush::setTile ( int  gid)

Sets the tile.

在文件 Brush.cpp 第 34 行定义.

◆ setTool()

void eve::level_editing::Brush::setTool ( const std::string &  tool)

Sets the tool.

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


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