My problem is there seems to be no way to access per-feature vertex/position information in a tile. Assuming a tileset containing multiple cesium 3d tiles, it is possible to pick each individual feature separately as long as the mouse is over a specific location. For example, a 3d tile with a batch table of 50 buildings would allow for feature selection of each building separately.
However, if I would like to sort all the building features by distance to the camera, and obtain an ordering that I can use it dynamically in javascript, it seems it is either very difficult or impossible to get the position (or distance from camera) of each feature.
tileset.tileVisible.addEventListener(function(tile) {
var content = tile.content;
var featuresLength = content.featuresLength;
for (var i = 0; i < featuresLength; i+=2) {
content.getFeature(i).color = Cesium.Color.fromRandom();
}
});
I have tried to access all kinds of information from private parts of the API, going so far as to see that in the batch table, under pickIds->pickObjects->primitive there is an attribute (_va) that seems to contain at least the number of vertices in each building (for two tiles where I have around 6k buildings).
I was wondering if there is any really subtle method, borderline hack, to access the vertex positions in each building without the feature table containing such information explicitly.
Regarding the other forum, I would say most of my features reside at the top level of the 3d tile, so that I cannot even get more specific bounding volumes for subsets of features. I would really need to go from the general tile directly to per feature positions.
I can access per-feature colors and change them, but if I were to access vertex position tables per-feature, that would be fascinating!