Skip to content

raisin::FoliageMeshLodBaker::Tile ​

struct · #include <rayrai/FoliageMeshLodBaker.hpp>

One baked cell: its source placements and the resulting LOD meshes and atlases.

Constructors & destructor ​

Tile ​

cpp
explicit Tile(raisin::StreamedFoliage::Placements p)

Take ownership of per-species placements.

~Tile ​

cpp
~Tile()

Public attributes ​

roots ​

cpp
raisin::StreamedFoliage::Placements roots

Source placements per species; cleared once baked.

center ​

cpp
glm::vec3 center

World AABB of the placements, its center and padded diagonal (capture extent).

boundsMin ​

cpp
glm::vec3 boundsMin

boundsMax ​

cpp
glm::vec3 boundsMax

diameter ​

cpp
float diameter

geometry ​

cpp
std::array<Geometry, levelCount> geometry

Accumulating CPU geometry (scratch).

levels ​

cpp
std::array<Meshes, levelCount> levels

Finished meshes, finest first.

texture ​

cpp
unsigned texture

normal ​

cpp
unsigned normal

GL albedo and normal atlases owned by the tile.

installedErrors ​

cpp
mutable std::optional<std::array<float, levelCount>> installedErrors

Error budgets of the first install(); later installs must match.

cacheKey ​

cpp
uint64_t cacheKey

Prepared-cache key (0 without a cache).

colors ​

cpp
std::vector<glm::vec4> colors

normals ​

cpp
std::vector<glm::vec4> normals

depth ​

cpp
std::vector<float> depth

Per-face capture scratch.

RaiSim — physics for robotics and AI.