VoxelEngine
Loading...
Searching...
No Matches
Contexts.h
1
#pragma once
2
3
#include "../input/InputTypes.h"
4
#include "../utility/Algorithms.h"
5
#include "Face.h"
6
7
8
namespace
engine {
9
10
class
Chunk;
11
class
BlockState;
12
13
struct
InteractContext
{
14
Chunk
* chunk;
16
glm::ivec3
position
;
17
glm::vec3 normal;
18
FaceTag face;
19
GLFWKey button;
20
bool
shiftPressed =
false
;
21
bool
ctrlPressed =
false
;
22
bool
altPressed =
false
;
23
void
* data =
nullptr
;
24
};
25
26
struct
BlockSetContext
{
27
Chunk
* chunk;
29
glm::ivec3
position
;
30
BlockState
* state;
31
void
* data =
nullptr
;
32
};
33
}
// namespace engine
engine::BlockState
Definition
BlockState.h:17
engine::Chunk
Definition
Chunk.h:37
engine::BlockSetContext
Definition
Contexts.h:26
engine::BlockSetContext::position
glm::ivec3 position
The position of the block in the chunk.
Definition
Contexts.h:29
engine::InteractContext
Definition
Contexts.h:13
engine::InteractContext::position
glm::ivec3 position
The position of the block in the chunk.
Definition
Contexts.h:16
src
block
Contexts.h
Generated by
1.9.8