resonance 1.0.1
Loading...
Searching...
No Matches
durgemstrip.h
Go to the documentation of this file.
1#pragma once
2
3struct Color;
4struct Vector3;
5namespace Rnd {
6class Mat;
7class View;
8class String;
9} // namespace Rnd
10
22public:
32 explicit DurGemStrip(Rnd::View *pView);
33
46
63 bool Start(int nLane,
64 const Color &color,
65 int nId,
66 float flFrame,
67 float flBlend,
68 float flWidth,
69 Rnd::Mat *pMat);
70
81 void Update(float flFrame);
82
94 bool Stop(int nId, float flFrame);
95
107 bool GetHeadPos(float flFrame, Vector3 *pOut);
108
109private:
110 Rnd::String *mString; // The two-point ribbon.
111 int mId; // The identifier of the trail, kFreeId when free.
112 int mStopped; // Non-zero once Stop() has ended the trail.
113 int mLane; // The lane the trail follows.
114 float mBlend; // The position across the lane.
115 float mStart; // The tunnel frame of the tail.
116 float mEnd; // The tunnel frame of the head.
117};
DurGemStrip(Rnd::View *pView)
Create the free strip's hidden two-point ribbon and add it to pView.
bool Stop(int nId, float flFrame)
Extend and then stop the trail when it is trail nId.
bool GetHeadPos(float flFrame, Vector3 *pOut)
Report the lane position at flFrame when flFrame lies on the trail.
~DurGemStrip()
Delete the ribbon.
bool Start(int nLane, const Color &color, int nId, float flFrame, float flBlend, float flWidth, Rnd::Mat *pMat)
Claim the strip for trail nId when it is free.
void Update(float flFrame)
Extend the head of the trail to flFrame and free the strip once the trail is behind.
Surface description a Rnd::Mesh draws with.
Definition mat.h:36
Screen-aligned ribbon drawn through a list of world-space points.
Definition string.h:58
Root of a loadable scene.
Definition view.h:47
The rendering engine.
Definition animhelper.h:3
Linear colour with four float components.
Definition color.h:10
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:12