Manages oriented-capsule tracers for fast-bullet projectile entities.
More...
#include <TracerEffect.hpp>
|
| void | update (float dt, Registry ®istry) |
| | Update all live tracers.
|
| |
| void | attach (entt::entity e, Registry ®istry) |
| | Attach a new tracer to a projectile entity.
|
| |
| void | detach (entt::entity e) |
| | Detach the tracer from an entity (entity dying); tracer fades out.
|
| |
| void | spawnFree (glm::vec3 tip, glm::vec3 tail, float lifetime=0.12f) |
| | Spawn a standalone one-shot tracer streak not tied to any ECS entity.
|
| |
| const TracerParticle * | data () const |
| |
| uint32_t | count () const |
| |
Manages oriented-capsule tracers for fast-bullet projectile entities.
Each frame, update() polls registry entities with TracerEmitter components and updates the tip/tail of their associated TracerParticle.
◆ attach()
| void TracerEffect::attach |
( |
entt::entity |
e, |
|
|
Registry & |
registry |
|
) |
| |
Attach a new tracer to a projectile entity.
- Parameters
-
◆ count()
| uint32_t TracerEffect::count |
( |
| ) |
const |
|
inline |
◆ data()
◆ detach()
| void TracerEffect::detach |
( |
entt::entity |
e | ) |
|
Detach the tracer from an entity (entity dying); tracer fades out.
- Parameters
-
| e | Entity handle being destroyed. |
◆ spawnFree()
| void TracerEffect::spawnFree |
( |
glm::vec3 |
tip, |
|
|
glm::vec3 |
tail, |
|
|
float |
lifetime = 0.12f |
|
) |
| |
Spawn a standalone one-shot tracer streak not tied to any ECS entity.
- Parameters
-
| tip | World-space hit/end point. |
| tail | World-space origin/start point. |
| lifetime | Seconds before the streak fully fades. |
◆ update()
| void TracerEffect::update |
( |
float |
dt, |
|
|
Registry & |
registry |
|
) |
| |
Update all live tracers.
Registry is used to read projectile positions.
- Parameters
-
| dt | Frame delta time in seconds. |
| registry | ECS registry containing TracerEmitter entities. |
The documentation for this class was generated from the following files: