resonance 1.0.1
Loading...
Searching...
No Matches
tnlpanel.h
Go to the documentation of this file.
1#pragma once
2
3#include "math/color.h"
4
5class AppTunnel;
6class Player;
7namespace Rnd {
8class Mat;
9class Mesh;
10class MeshAnim;
11} // namespace Rnd
12
30class TnlPanel {
31public:
33 enum Kind {
38 };
39
55 TnlPanel(int nRing,
56 int nSlice,
57 Player *pPlayer,
58 int nPowerbar,
59 Kind kind,
60 int nShowing,
61 int nColorIndex);
62
70 void SetStartFrame(float flFrame) {
71 mStartFrame = flFrame;
72 }
73
83 void Refresh();
84
94 void Apply();
95
110 int Update(float flFrame, AppTunnel *pTunnel);
111
112private:
113 int mRing;
114 int mSlice;
115 Rnd::Mesh *mSection; // The ring section of mRing and mSlice.
116 Player *mPlayer;
117 int mPowerbar;
118 Kind mKind;
119 int mShowing;
120 int mColorIndex;
121 Color mColor;
122 Rnd::Mat *mMat;
123 float mStartFrame; // 1e9 until SetStartFrame().
124 float mDuration; // Zero until Update() picks the animation.
125 Rnd::MeshAnim *mAnim;
126};
Game-side driver of the tunnel the in-game renderer draws.
Definition apptunnel.h:88
One participant in a session, local or remote.
Definition player.h:39
Surface description a Rnd::Mesh draws with.
Definition mat.h:36
Per-vertex animation of one mesh.
Definition meshanim.h:45
Indexed triangle mesh with one material.
Definition mesh.h:46
int Update(float flFrame, AppTunnel *pTunnel)
Run the panel from its start frame.
void Refresh()
Pick the material and colour for the kind of panel.
Kind
Kind of panel.
Definition tnlpanel.h:33
@ kKindScratch
Definition tnlpanel.h:36
@ kKindAxe
Definition tnlpanel.h:35
@ kKindVox
Definition tnlpanel.h:37
@ kKindLane
Definition tnlpanel.h:34
void SetStartFrame(float flFrame)
Set the frame Update() starts from.
Definition tnlpanel.h:70
void Apply()
Show or hide the section and colour the lane divider after the lane owner.
TnlPanel(int nRing, int nSlice, Player *pPlayer, int nPowerbar, Kind kind, int nShowing, int nColorIndex)
Record the section and pick its material.
The rendering engine.
Definition animhelper.h:3
Linear colour with four float components.
Definition color.h:10