Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
voxel_bucket.hpp
Go to the documentation of this file.
1
7
8
#pragma once
9
#include "
voxel.hpp
"
10
11
#include <cstdint>
12
13
namespace
toast {
14
19
class
[[ToastNode, Icon(
"Bucket"
), Color(
"Magenta"
)]] TOAST_API
VoxelBucket
:
public
Voxel
{
20
public
:
22
[[nodiscard,
Reflect
]]
23
auto
getId
() const noexcept ->
int
{
24
return
id
;
25
}
26
28
[[
Reflect
]]
29
void
setId
(
int
value)
noexcept
{
30
id
= value;
31
}
32
34
[[nodiscard,
Reflect
]]
35
auto
getShape() ->
Box<Node>
;
36
37
// Backend
38
39
[[nodiscard]]
40
auto
colorId() const noexcept -> uint8_t;
41
42
protected:
43
void
updateInspectorMessages() override;
44
46
[[
Reflect
, Name(
"Color"
)]]
47
int
id
= 1;
48
};
49
50
}
toast::Box
Intrusive reference-counted handle to a Node.
Definition
box.hpp:35
toast::Reflect
Definition
reflect.hpp:244
toast::VoxelBucket
Definition
voxel_bucket.hpp:19
toast::VoxelBucket::id
int id
Definition
voxel_bucket.hpp:47
toast::VoxelBucket::setId
void setId(int value) noexcept
Definition
voxel_bucket.hpp:29
toast::VoxelBucket::getId
auto getId() const noexcept -> int
Definition
voxel_bucket.hpp:23
toast::Voxel
Definition
voxel.hpp:14
voxel.hpp
Common base of every voxel node.
engine
src
toast
voxel
nodes
voxel_bucket.hpp
Generated by
1.17.0