resonance 1.0.1
Loading...
Searching...
No Matches
tnlgem.h
Go to the documentation of this file.
1#pragma once
2
3#include <iosfwd>
4#include <list>
5
6#include "math/transform.h"
7
8class AppTunnel;
10class TnlGemManager;
11class TnlGemMeshKind;
12namespace Rnd {
13struct Particle;
14} // namespace Rnd
15
28class TnlGem {
29public:
36
54 TnlGem(char nKind,
55 char nTrack,
56 char nColor,
57 bool bFlash,
58 float flFrame,
59 float flBlend,
60 float flAppearFrame);
61
77 float Place(TnlGemManager *pManager, float flFrame);
78
87 void Release();
88
99 void Flash(AppTunnel *pTunnel);
100
101 char mKind;
102 char mTrack;
103 char mState;
104 char mColor;
105 float mFrame;
106 float mBlend;
114 std::list<Transform>::iterator mInstance;
116};
117
129std::ostream &operator<<(std::ostream &stream, const TnlGem &gem);
Game-side driver of the tunnel the in-game renderer draws.
Definition apptunnel.h:88
A gem kind that TnlGemManager draws as one particle of a particle system per gem.
Definition tnlgemeffectkind.h:15
Keeper of every gem on the tunnel, which it draws within a per-frame cost budget.
Definition tnlgemmanager.h:27
One level of detail of a gem kind that TnlGemManager draws as instances of a multi-mesh.
Definition tnlgemmeshkind.h:16
One gem on the tunnel, as TnlGemManager keeps it sorted by mFrame.
Definition tnlgem.h:28
void Flash(AppTunnel *pTunnel)
Start a gem flash at the position of the gem's instance or particle.
float mAppearFrame
Definition tnlgem.h:107
TnlGem(char nKind, char nTrack, char nColor, bool bFlash, float flFrame, float flBlend, float flAppearFrame)
Describe a gem that holds no drawing resource and never expires.
float mFrame
Definition tnlgem.h:105
State
Progress of the flash a gem shows as the playhead arrives.
Definition tnlgem.h:31
@ kStateFlashed
Definition tnlgem.h:34
@ kStateFlashPending
Definition tnlgem.h:33
@ kStateNone
Definition tnlgem.h:32
float mExpireFrame
Definition tnlgem.h:110
TnlGemMeshKind * mMeshKind
Definition tnlgem.h:111
TnlGemEffectKind * mEffectKind
Definition tnlgem.h:112
char mColor
Definition tnlgem.h:104
Rnd::Particle * mParticle
Definition tnlgem.h:115
char mTrack
Definition tnlgem.h:102
void Release()
Give back the instance or the particle the gem holds.
std::list< Transform >::iterator mInstance
Definition tnlgem.h:114
float Place(TnlGemManager *pManager, float flFrame)
Place the gem for one frame and report what drawing it costs.
char mState
Definition tnlgem.h:103
char mKind
Definition tnlgem.h:101
float mBlend
Definition tnlgem.h:106
The rendering engine.
Definition animhelper.h:3
One live particle of a Rnd::ParticleSys.
Definition particle.h:33
std::ostream & operator<<(std::ostream &stream, const TnlGem &gem)
Print a gem as [kind track frame blend (appear expire)].