|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
Procedural wind field used by glider flight, particles, and debug rendering. More...
#include <WindField.h>
Public Member Functions | |
| WindSample | sample (const glm::vec3 &worldPos, float timeSeconds) const |
| Samples the strongest wind pocket affecting a world-space point. | |
| const WindFieldConfig & | getConfig () const |
| Returns the current wind field configuration. | |
| WindFieldConfig & | getConfig () |
| Returns a mutable wind field configuration. | |
| void | setConfig (const WindFieldConfig &config) |
| Replaces the wind field configuration. | |
| void | drawDebugAround (const glm::vec3 ¢er, float timeSeconds) const |
| Draws debug visualization for wind pockets near a world-space center. | |
Private Attributes | |
| WindFieldConfig | config_ |
| Active runtime wind configuration. | |
Procedural wind field used by glider flight, particles, and debug rendering.
WindField is deterministic for a given configuration, world position, and time. It does not store generated pockets; sample() derives nearby pocket candidates from hashed grid cells.
Definition at line 75 of file WindField.h.
| void Engine::World::WindField::drawDebugAround | ( | const glm::vec3 & | center, |
| float | timeSeconds ) const |
Draws debug visualization for wind pockets near a world-space center.
Debug drawing is skipped when WindFieldConfig::debugDraw is false, when the field is disabled, or when both border and arrow drawing are disabled.
| center | World-space center of the visualization area. |
| timeSeconds | Global time in seconds used for animated wind direction. |
|
inlinenodiscard |
Returns a mutable wind field configuration.
Changes affect subsequent sample() and drawDebugAround() calls immediately.
Definition at line 104 of file WindField.h.
References config_.
|
inlinenodiscard |
Returns the current wind field configuration.
Definition at line 94 of file WindField.h.
References config_.
|
nodiscard |
Samples the strongest wind pocket affecting a world-space point.
The sampler checks the point's neighboring horizontal cells and vertical layers, then returns the strongest pocket containing the point. Pocket direction slowly rotates by WindFieldConfig::globalDirectionRotationSpeed over time.
| worldPos | World-space point to sample. |
| timeSeconds | Global time in seconds used for direction animation. |
|
inline |
Replaces the wind field configuration.
| config | New configuration copied into the wind field. |
Definition at line 113 of file WindField.h.
References config_.
|
private |
Active runtime wind configuration.
Definition at line 130 of file WindField.h.
Referenced by getConfig(), getConfig(), and setConfig().