CesiumGS / 3d-tiles-validator

Validator for 3D Tiles :vertical_traffic_light:
https://cesium.com
Apache License 2.0
421 stars 156 forks source link

Validator - validate that glTF batchId attributes are in range #123

Open lilleyse opened 7 years ago

lilleyse commented 7 years ago

@Rudraksha20

This will require parsing the gltf model. Each mesh in the gltf has a list of primitives, each of which contains vertex attributes. If the _BATCHID attribute is present, extract those values from the accessor/bufferView/buffer and then check that the values are all less than the BATCH_LENGTH property in the feature table.

lilleyse commented 7 years ago

For parsing, you can reference the code from here: https://github.com/AnalyticalGraphicsInc/gltf-pipeline/blob/cleanup/lib/parseGlb.js#L87-L118