Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
WindField.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <glm/vec3.hpp>
5
6namespace Engine::World
7{
12 {
13 bool enabled = true;
14
15 float cellSize = 62.0f;
16 float pocketDensity = 0.65f;
17 float radiusScale = 1.0f;
18 float windSpeed = 9.0f;
19
22 float regionalBiasStrength = 0.35f;
23 float coneHalfAngleRadians = 0.78539816339f;
24
25 float verticalRadius = 28.0f;
26 float verticalWindSpeed = 4.5f;
27 float verticalWindBias = 0.12f;
28 float visualizationRadius = 140.0f;
29
30 float windAccelerationScale = 0.45f;
31 float maxWindAddedSpeed = 10.0f;
34
35 bool debugDraw = true;
36 bool debugDrawBorders = true;
37 bool debugDrawArrows = true;
38 float debugArrowSpacing = 9.0f;
39 float debugArrowScale = 0.28f;
40 };
41
46 {
47 glm::vec3 velocity{ 0.0f };
48 float strength = 0.0f;
49 uint32_t pocketId = 0u;
50 bool isInsidePocket = false;
51 };
52
58 {
59 public:
60 [[nodiscard]] WindSample sample( const glm::vec3 & worldPos, float timeSeconds ) const;
61
62 [[nodiscard]] const WindFieldConfig & getConfig() const { return config_; }
63 [[nodiscard]] WindFieldConfig & getConfig() { return config_; }
64 void setConfig( const WindFieldConfig & config ) { config_ = config; }
65
66 void drawDebugAround( const glm::vec3 & center, float timeSeconds ) const;
67
68 private:
70 };
71} // namespace Engine::World
This is the base class for a wind field. (An area in which a vector field pushes the player glider co...
Definition WindField.h:58
const WindFieldConfig & getConfig() const
Definition WindField.h:62
WindSample sample(const glm::vec3 &worldPos, float timeSeconds) const
void drawDebugAround(const glm::vec3 &center, float timeSeconds) const
WindFieldConfig config_
Definition WindField.h:69
void setConfig(const WindFieldConfig &config)
Definition WindField.h:64
WindFieldConfig & getConfig()
Definition WindField.h:63
Holds the parameters of a wind field which can be configured through imgui.
Definition WindField.h:12
A wind sample is the wind force at one point in the wind field.
Definition WindField.h:46