vkmEngine 1.0.15
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
terrain_frame.h
1#pragma once
2
3#include <array>
4#include <cstdint>
5#include <vector>
6
7#include <glm/glm.hpp>
8
9#include "core/math/bounds.h"
10#include "ecs/entity.h"
11#include "resource/asset/material_asset.h"
12#include "resource/asset/mesh_asset.h"
13#include "system/terrain/terrain_chunks.h"
14
15namespace Vkm::Engine {
16
23 std::array<MeshHandle, TerrainChunks::LEVELS> levels;
24 MaterialHandle material;
25 glm::mat4 model{1.0f};
27 float width = 0.0f;
28 bool castShadows = true;
29};
30
36 MeshHandle mesh;
37 MaterialHandle material;
38 glm::mat4 model{1.0f};
40 float maxDistance = 0.0f;
41 bool castShadows = false;
42};
43
48 uint32_t first = 0;
49 uint32_t count = 0;
51 float maxDistance = 0.0f;
52};
53
61 std::vector<TerrainChunk> chunks;
62 std::vector<TerrainPlantDraw> plants;
63 std::vector<TerrainPlantGroup> plantGroups;
64 uint64_t plantsRevision = 0;
65};
66
67} // namespace Vkm::Engine
Names one entity of one Scene, for as long as that slot holds it.
Definition entity.h:23
An axis-aligned box.
Definition bounds.h:17
One chunk of a terrain in the world: its levels' meshes and where it lies, for the cull to list besid...
Definition terrain_frame.h:21
std::array< MeshHandle, TerrainChunks::LEVELS > levels
Finest first.
Definition terrain_frame.h:23
float width
Metres it spans.
Definition terrain_frame.h:27
Math::AABB bounds
World, its skirt in it.
Definition terrain_frame.h:26
MaterialHandle material
The terrain's layered one.
Definition terrain_frame.h:24
EntityId entity
The terrain's.
Definition terrain_frame.h:22
The scene's terrains as chunks and plants this frame (TerrainSystem): FrameContext::terrain.
Definition terrain_frame.h:60
uint64_t plantsRevision
Moves whenever the plants do.
Definition terrain_frame.h:64
std::vector< TerrainPlantGroup > plantGroups
Every plant in one, in order.
Definition terrain_frame.h:63
One part of one plant a terrain grows, in the world.
Definition terrain_frame.h:34
EntityId entity
The terrain's.
Definition terrain_frame.h:35
float maxDistance
Metres from the eye past which it is not drawn.
Definition terrain_frame.h:40
Math::AABB bounds
World.
Definition terrain_frame.h:39
The plants of one chunk, a run of TerrainFrame::plants, for the cull to pass over whole.
Definition terrain_frame.h:47
Math::AABB bounds
World, every plant in it.
Definition terrain_frame.h:50
float maxDistance
The farthest any of them is drawn.
Definition terrain_frame.h:51
uint32_t first
Into TerrainFrame::plants.
Definition terrain_frame.h:48