INNER CODE UNIT · C++
edgeLength
TheOpenSpaceProgram/osp-magnum · src/adera_app/scenario_setup.cpp:416
double const edgeLength = gc_icoMaxEdgeVsLevel[level] * rTerrainIco.radius * scale;
double const subdivRadius = 0.75 * edgeLength;
// TODO: Pick thresholds based on the angular diameter (size on screen) of the
// chunk triangle mesh that will actually be rendered.
rSP.distanceThresholdSubdiv[level] = subdivRadius;
// Unsubdivide thresholds should be slightly larger (arbitrary x2) to avoid rapid
// terrain changes when moving back and forth quickly
rSP.distanceThresholdUnsubdiv[level] = 2.0f * subdivRadius;
}
// ## Prepare Chunk Skeleton
std::uint8_t const chunkSubdivLevels = specs.chunkSubdivLevels;
rTerrain.skChunks = make_skeleton_chunks(chunkSubdivLevels);