40 if (bbox_max_uuid > max_uuid) {
41 max_uuid = bbox_max_uuid;
45 size_t expected_size = max_uuid + 1;
48 helios_runtime_error(
"RayTracingGeometry validation failed: primitive_positions.size()=" + std::to_string(
primitive_positions.size()) +
" != max_UUID+1=" + std::to_string(expected_size) +
" (max_UUID=" + std::to_string(max_uuid) +
57 helios_runtime_error(
"RayTracingGeometry validation failed: primitive_UUIDs[" + std::to_string(pos) +
"]=" + std::to_string(UUID) +
" >= primitive_positions.size()=" + std::to_string(
primitive_positions.size()));
61 if (mapped_pos == UINT_MAX) {
62 helios_runtime_error(
"RayTracingGeometry validation failed: primitive_positions[" + std::to_string(UUID) +
"] == UINT_MAX (should map to position " + std::to_string(pos) +
")");
65 if (mapped_pos != pos) {
66 helios_runtime_error(
"RayTracingGeometry validation failed: primitive_positions[" + std::to_string(UUID) +
"]=" + std::to_string(mapped_pos) +
" but UUID is at position " + std::to_string(pos) +
67 " (bidirectional mapping inconsistent)");
105 " (COMMON BUG: Did you size by Nobjects instead of Nprimitives?)");
170 if (subdiv.
x < 1 || subdiv.
y < 1) {
171 helios_runtime_error(
"RayTracingGeometry validation failed: object_subdivisions[" + std::to_string(i) +
"] = (" + std::to_string(subdiv.
x) +
"," + std::to_string(subdiv.
y) +
") has zero or negative subdivision count");
177 size_t subdivision_anomalies = 0;
180 subdivision_anomalies++;
185 std::cerr <<
"WARNING [RayTracingGeometry]: " << subdivision_anomalies <<
" / " <<
primitive_count <<
" primitives have subdivisions > (1,1). "
186 <<
"Check for subdivision inheritance bug - subpatches should have (1,1), "
187 <<
"only parent geometry should have actual subdivision counts.\n";