|
Confetti
0.1.0
A C++ particle system using Vulkan
|
An EmitterVolume that emits particles from the interior of a rectangle. More...
#include <Confetti/EmitterVolume.h>

Public Member Functions | |
| EmitterRectangle (float w, float h) | |
| Constructor. More... | |
| virtual | ~EmitterRectangle () override=default |
| Destructor. | |
Overrides EmitterVolume | |
| glm::vec3 | operator() (std::minstd_rand &rng) const override |
| Returns a value used to specify a particle's point of emission. More... | |
Public Member Functions inherited from Confetti::EmitterVolume | |
| virtual | ~EmitterVolume ()=default |
| Destructor. | |
An EmitterVolume that emits particles from the interior of a rectangle.
The points are distributed uniformly in the volume using this function:
Given the value [a,b] and the random values t:[0,1) and u:[0,1),
x = a * t - a/2
y = b * u - b/2
z = 0
| Confetti::EmitterRectangle::EmitterRectangle | ( | float | w, |
| float | h | ||
| ) |
Constructor.
| w | Size of the rectangle along the X axis. |
| h | Size of the rectangle along the Z axis. |
|
overridevirtual |
Returns a value used to specify a particle's point of emission.
| rng | Random number generator. |
Implements Confetti::EmitterVolume.
1.8.14