FlatCityBuf C++ reader 0.8.0
Native C++17 reader for FlatCityBuf, the cloud-optimized CityJSON format
Loading...
Searching...
No Matches
geometry.cpp File Reference
#include <fcb/generated/geometry_generated.h>
#include <fcb/geometry.hpp>
#include <algorithm>

Go to the source code of this file.

Namespaces

namespace  fcb
 

Macros

#define FCB_ASSERT_KIND(name)
 

Functions

nlohmann::json fcb::decode_boundaries (GeometryKind type, UIntView solids, UIntView shells, UIntView surfaces, UIntView strings, UIntView indices)
 Rebuild CityJSON's nested boundaries from the five flattened arrays, at the depth type implies.
 
nlohmann::json fcb::decode_semantics_values (GeometryKind type, UIntView solids, UIntView shells, UIntView values)
 Rebuild the nested semantics values array from the flat run of semantic indices.
 
nlohmann::json fcb::decode_material_values (GeometryKind type, UIntView solids, UIntView shells, UIntView vertices)
 Rebuild the values array of one material theme from a MaterialMapping.
 
nlohmann::json fcb::decode_texture_values (GeometryKind type, UIntView solids, UIntView shells, UIntView surfaces, UIntView strings, UIntView vertices)
 Rebuild the values array of one texture theme from a TextureMapping.
 
std::string fcb::geometry_type_name (std::uint8_t type)
 CityJSON name for a GeometryType enumerator, e.g.
 

Macro Definition Documentation

◆ FCB_ASSERT_KIND

#define FCB_ASSERT_KIND (   name)
Value:
static_assert(static_cast<std::uint8_t>(GeometryKind::name) == \
static_cast<std::uint8_t>(::GeometryType::name), \
"GeometryKind::" #name " has drifted from the generated GeometryType")

Definition at line 17 of file geometry.cpp.

Variable Documentation

◆ index

◆ ring

std::size_t ring = 0

Definition at line 69 of file geometry.cpp.

Referenced by fcb::encode_boundaries().

◆ shell

std::size_t shell = 0

Definition at line 67 of file geometry.cpp.

Referenced by fcb::encode_material(), fcb::encode_semantics(), and fcb::encode_texture().

◆ shells

◆ string

std::size_t string = 0

Definition at line 129 of file geometry.cpp.

◆ strings

UIntView strings

◆ surface

std::size_t surface = 0

Definition at line 68 of file geometry.cpp.

Referenced by fcb::encode_boundaries(), fcb::encode_texture(), and fcb::to_geometry().

◆ surfaces

UIntView surfaces

◆ vertex

std::size_t vertex = 0

Definition at line 130 of file geometry.cpp.

Referenced by fcb::decode_material_values().

◆ vertices

UIntView vertices