|
CGVIS Utils
|
Base interface and minimal GL pipeline for point‑sprite particle systems. More...
#include "Vec3.h"#include "Mat4.h"#include "GLProgram.h"#include "GLBuffer.h"#include "GLArray.h"#include "GLTexture2D.h"Go to the source code of this file.
Classes | |
| class | AbstractParticleSystem |
| Abstract additive point‑sprite particle system with a ready‑made GL path. More... | |
Variables | |
Special color sentinels | |
Constants that tell the system to compute colors procedurally. | |
| const Vec3 | RANDOM_COLOR {-1.0f,-1.0f,-1.0f} |
| Sentinel that requests a random RGB color per particle. | |
| const Vec3 | RAINBOW_COLOR {-2.0f,-2.0f,-2.0f} |
| Sentinel that can be used by subclasses to generate a rainbow map. | |
Base interface and minimal GL pipeline for point‑sprite particle systems.
Declares AbstractParticleSystem, an abstract class that provides a small OpenGL rendering path for particles drawn as additive point sprites. Subclasses implement update(), setColor(), getData(), and getParticleCount() to define particle behavior and supply per‑vertex attributes. The renderer expects interleaved per‑particle data in the form [x,y,z,r,g,b,a] (7 floats).
The implementation creates a tiny circular sprite texture and a shader that computes perspective‑correct point sizes from a reference depth, so the same visual size can be preserved across varying distances.
| const Vec3 RAINBOW_COLOR {-2.0f,-2.0f,-2.0f} |
Sentinel that can be used by subclasses to generate a rainbow map.
| const Vec3 RANDOM_COLOR {-1.0f,-1.0f,-1.0f} |
Sentinel that requests a random RGB color per particle.