resonance 1.0.1
Loading...
Searching...
No Matches
tunnelseeksection.h
Go to the documentation of this file.
1#pragma once
2
3#include "rnd/lodmesh.h"
4
5class HxStr;
6struct Color;
7
8namespace Rnd {
9
10class Tunnel;
11
13constexpr int kTunnelSeekNoSlice = -9999;
14
31public:
41
52 void Set(int nSlice, int nRing, int bEndCap, int bStartCap);
53
60 void Invalidate();
61
74 void Build(const HxStr &name, const LodMesh &templates);
75
91 void Update(Tunnel *pTunnel, const Color &color);
92
93 int mDirty;
94 int mEndCap;
97 int mRing;
98 int mSlice;
99};
100
101} // namespace Rnd
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Chain of generated meshes, one per level of detail, that deletes its meshes with itself.
Definition lodmesh.h:29
void Set(int nSlice, int nRing, int bEndCap, int bStartCap)
Place the section on a slice and ring, marking it dirty.
int mDirty
Definition tunnelseeksection.h:93
void Invalidate()
Remove the section from its slice, marking it dirty.
int mEndCap
Definition tunnelseeksection.h:94
int mStartCap
Definition tunnelseeksection.h:95
int mRing
Definition tunnelseeksection.h:97
TunnelSeekSection()
Construct an unplaced section.
int mSlice
Definition tunnelseeksection.h:98
void Update(Tunnel *pTunnel, const Color &color)
Copy the geometry of the tunnel cell the section is placed on and clear mDirty.
LodMesh mMeshes
Definition tunnelseeksection.h:96
void Build(const HxStr &name, const LodMesh &templates)
Create one mesh per level of the tunnel's first cell, sharing that cell's triangles.
Procedural tunnel the game flies the player through.
Definition tunnel.h:72
The rendering engine.
Definition animhelper.h:3
constexpr int kTunnelSeekNoSlice
Slice value of a TunnelSeekSection that is not placed.
Definition tunnelseeksection.h:13
Linear colour with four float components.
Definition color.h:10