I am wondering if it is possible to get the type of a primitive from the scene? For example, I am able to get the collection of all primitives in the scene, and I know that a billboardCollection is a type of primitive, as the following code works fine.
(where billboards is a billboardCollection).
How can I know if a primitive is a billboardCollection, or any other type of primitive?
Here is a code snippet that shows how I'd like to do the check.
//Get all of the primitives in the scene (this includes billboardCollection(s)).
var primitives = scene.getPrimitives();
//Loop for each primitive in the scene.
for(var i = 0; i < primitives.getLength(); i++)
//Check if the primitive is a billboardCollection.
//How can I get the type of the primitive? I'm looking for something like
//Type = billboardCollection.
if(primitives.get(i).type == "billboardCollection")
//Do stuff if it is a billboardCollection.