BSPParser
Simple and modern library for parsing the Valve BSP format
|
#include <bsp.hpp>
Public Member Functions | |
Bsp (std::span< const std::byte > data) | |
void | smoothNeighbouringDisplacements () |
Public Attributes | |
std::span< const std::byte > | data |
const Structs::Header * | header = nullptr |
std::span< const Structs::GameLump > | gameLumps |
std::span< const Structs::Vector > | vertices |
std::span< const Structs::Plane > | planes |
std::span< const Structs::Edge > | edges |
std::span< const int32_t > | surfaceEdges |
std::span< const Structs::Face > | faces |
std::span< const Structs::TexInfo > | textureInfos |
std::span< const Structs::TexData > | textureDatas |
std::span< const int32_t > | textureStringTable |
std::span< const char > | textureStringData |
std::span< const Structs::Model > | models |
std::span< const Structs::DispInfo > | displacementInfos |
std::span< const Structs::DispVert > | displacementVertices |
std::vector< TriangulatedDisplacement > | displacements |
std::vector< PhysModel > | physicsModels |
std::vector< Zip::ZipFileEntry > | compressedPakfile |
std::optional< std::span< const Structs::StaticPropDict > > | staticPropDictionary = std::nullopt |
std::optional< std::span< const Structs::StaticPropLeaf > > | staticPropLeaves = std::nullopt |
std::optional< std::variant< std::span< const Structs::StaticPropV4 >, std::span< const Structs::StaticPropV5 >, std::span< const Structs::StaticPropV6 >, std::span< const Structs::StaticPropV7Multiplayer2013 > > > | staticProps = std::nullopt |
Lightweight abstraction over a BSP file, providing direct access to many of its lumps without any additional allocations.
void BspParser::Bsp::smoothNeighbouringDisplacements | ( | ) |
Smooths normals and tangents between neighbouring displacements for rendering.
std::vector<TriangulatedDisplacement> BspParser::Bsp::displacements |
Triangulated and internally smoothed displacement infos for rendering.