resonance 1.0.1
Loading...
Searching...
No Matches
tnlsnake.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "math/color.h"
6
7namespace Rnd {
8class Mesh;
9class String;
10class View;
11} // namespace Rnd
12
26class TnlSnake {
27public:
38
46
60 void Start(float flFrame, int nRing, const Color &color, float flPhase, float flAmplitude);
61
75 void Update(float flFrame);
76
77private:
78 // AppTunnel::StartSnake() reads mStartFrame to find an idle ribbon.
79 friend class AppTunnel;
80
89 void SetPointFrame(int nFrame, int nIndex);
90
91 float mStartFrame; // 1e9 while idle.
92 float mEndFrame;
93 float mLastFrame;
94 Rnd::String *mString;
95 Rnd::Mesh *mHead;
96 Rnd::View *mView; // "tnl transparent".
97 int mRing;
98 int mReserved1c; // +0x1c, never written or read by the recovered routines.
99 Color mColor;
100 float mPhase;
101 float mAmplitude;
102 std::vector<float> mGlow; // Extra brightness of each point.
103 std::vector<int> mPointFrames; // Frame each point was last placed at.
104};
Indexed triangle mesh with one material.
Definition mesh.h:46
Screen-aligned ribbon drawn through a list of world-space points.
Definition string.h:58
Root of a loadable scene.
Definition view.h:47
TnlSnake()
Build the ribbon and the head.
~TnlSnake()
Take the ribbon out of "tnl transparent" and delete the ribbon and the head.
void Start(float flFrame, int nRing, const Color &color, float flPhase, float flAmplitude)
Show the ribbon on a lane for 11520 song frames from flFrame.
friend class AppTunnel
Definition tnlsnake.h:79
void Update(float flFrame)
Move the ribbon to the song frame.
The rendering engine.
Definition animhelper.h:3
Linear colour with four float components.
Definition color.h:10