highlighting GeometryInstance

Hey guys,

Great job so far on Cesium! We're developing a tool for viewing and manipulating airspaces and we've come to a point where we'd like to select a 3d airspace from a GUI tree and emphasize the appearance of the selected feature on the map.

The question is, should we wait for the next release for a dynamic way to setColor on a Cesium.GeometryInstance . According to the docs the color attribute ColorGeometryInstanceAttribute is constant for the entire instance.

I'm thinking the best way at this point is to set a new color attribute and re-render the primitive, or to destroy the primitive and re-create, but that sounds expensive.

General thoughts?

Thanks
Tom

// related code snippet.
var bottomPolygonOutlineInstance =
new Cesium.GeometryInstance({
        geometry : $Cesium.PolygonOutlineGeometry.fromPositions({
        positions : bottomPositions,
        perPositionHeight : true,
        extrudedHeight : obj.properties.ceiling,
        height : obj.properties.floor
   }),
     attributes : {
  color : new Cesium.ColorGeometryInstanceAttribute(red,green,blue, 1)
    }
});

Hi Tom,

It is possible to update the color after creating the geometry instance. See the “Updating Per-Instance Attributes” section of the tutorial for a code example.

Patrick