载入中...
搜索中...
未找到
src
modules
map
level
editing
TileBuffer.h
浏览该文件的文档.
1
#pragma once
2
#include "
common/Export.h
"
3
4
5
#include <cstdint>
6
#include <vector>
7
8
namespace
eve::level_editing
{
9
11
class
EVENGINE_API_DOMAINS
TileBuffer
{
12
public
:
14
TileBuffer
(
int
width
,
int
height
);
15
17
int
getWidth
()
const
{
return
width_; }
19
int
getHeight
()
const
{
return
height_; }
20
22
void
resize(
int
width
,
int
height
);
24
void
clear();
26
void
fill(
int
gid);
27
29
void
setGid(
int
x
,
int
y
,
int
gid);
31
int
getGid(
int
x
,
int
y
)
const
;
32
34
bool
containsCell(
int
x
,
int
y
)
const
;
35
36
private
:
37
int
index
(
int
x
,
int
y
)
const
{
return
y
* width_ +
x
; }
38
39
int
width_ = 0;
40
int
height_ = 0;
41
std::vector<int> gids_;
42
};
43
44
}
// namespace eve::level_editing
y
float y
Definition
AnimClip.cpp:738
x
float x
Definition
AnimClip.cpp:738
Export.h
EVENGINE_API_DOMAINS
#define EVENGINE_API_DOMAINS
Definition
Export.h:110
height
std::uint32_t height
Definition
ImageImporter.cpp:14
width
std::uint32_t width
Definition
ImageImporter.cpp:13
index
uint32_t index
Definition
UnityVegetationMaterial.cpp:163
eve::level_editing::TileBuffer
Independent GID grid for map brushes (no hard dependency on map.TileLayer).
Definition
TileBuffer.h:11
eve::level_editing::TileBuffer::getWidth
int getWidth() const
Returns the width.
Definition
TileBuffer.h:17
eve::level_editing::TileBuffer::getHeight
int getHeight() const
Returns the height.
Definition
TileBuffer.h:19
eve::level_editing
Definition
Brush.cpp:10