The program checks each profile before it builds a scene. A mesh level reports its topology, frame and unit, and a scan reports its point count. Handing an image document to the mesh reader refuses, and the refusal names the profile the reader expected.
bool pumpMeshFits(chest mesh) {
text topology = mesh.topology
text frame = mesh.frame
text unitName = mesh.unitName
u64 vertexCount = mesh.vertexCount
return topology == "triangles" && frame == "rightHandYUp" &&
unitName == "m" && vertexCount <= 250000
}
bool scanFits(chest cloud) {
text frame = cloud.frame
text unitName = cloud.unitName
u64 points = cloud.pointCount
return frame == "rightHandYUp" && unitName == "m" && points > 0
}
text checkAssets() {
assert (pumpMeshFits(t.media.meshLod(finest("models.pump", 8000000))), "pump mesh")
assert (scanFits(t.media.attributedPoint(finest("scans.pumpRoom", 64000000))), "room scan")
return "assets ready"
}