group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
RibbonEmitter Struct Reference

Component attached to slow/arcing projectile entities (rockets, slow bolts). More...

#include <RibbonEmitter.hpp>

Collaboration diagram for RibbonEmitter:
[legend]

Classes

struct  Node
 A single recorded point along the ribbon trail. More...
 

Public Attributes

Node nodes [MaxNodes] {}
 
int count = 0
 Number of live nodes.
 
int head = 0
 Ring-buffer insertion index.
 
float width = 4.f
 Half-width of ribbon in world units.
 
float maxAge = 0.4f
 Nodes older than this are dropped.
 
float recordInterval = 0.016f
 Seconds between node recordings (~60 Hz).
 
float recordAccumulator = 0.f
 Accumulator for sub-frame node recording.
 
glm::vec4 tipColor {1.f, 0.6f, 0.1f, 1.f}
 Color at the rocket tip (newest node).
 
glm::vec4 tailColor {1.f, 0.3f, 0.0f, 0.f}
 Color at the tail (fades to transparent).
 

Static Public Attributes

static constexpr int MaxNodes = 32
 

Detailed Description

Component attached to slow/arcing projectile entities (rockets, slow bolts).

Records a ring-buffer of historical positions; the particle system expands consecutive node pairs into camera-facing ribbon quads each frame.

Member Data Documentation

◆ count

int RibbonEmitter::count = 0

Number of live nodes.

◆ head

int RibbonEmitter::head = 0

Ring-buffer insertion index.

◆ maxAge

float RibbonEmitter::maxAge = 0.4f

Nodes older than this are dropped.

◆ MaxNodes

constexpr int RibbonEmitter::MaxNodes = 32
staticconstexpr

◆ nodes

Node RibbonEmitter::nodes[MaxNodes] {}

◆ recordAccumulator

float RibbonEmitter::recordAccumulator = 0.f

Accumulator for sub-frame node recording.

◆ recordInterval

float RibbonEmitter::recordInterval = 0.016f

Seconds between node recordings (~60 Hz).

◆ tailColor

glm::vec4 RibbonEmitter::tailColor {1.f, 0.3f, 0.0f, 0.f}

Color at the tail (fades to transparent).

◆ tipColor

glm::vec4 RibbonEmitter::tipColor {1.f, 0.6f, 0.1f, 1.f}

Color at the rocket tip (newest node).

◆ width

float RibbonEmitter::width = 4.f

Half-width of ribbon in world units.


The documentation for this struct was generated from the following file: