Essentially, I would like Surface Shapes to be rendered on top of Tactical Symbols by default. Here is the problem recreated in a Worldwind Example
public class TestApp extends ApplicationTemplate {
public static class AppFrame extends ApplicationTemplate.AppFrame {
public AppFrame() {
// Symbol
RenderableLayer symbolLayer = new RenderableLayer();
TacticalSymbol symbol = new MilStd2525TacticalSymbol("suzp-----------", Position.fromDegrees(0.0, 0.0));
symbol.setAltitudeMode(WorldWind.CLAMP_TO_GROUND);
symbol.setShowLocation(false);
symbolLayer.addRenderable(symbol);
// Shape
RenderableLayer shapeLayer = new RenderableLayer();
SurfaceCircle circle = new SurfaceCircle(Position.fromDegrees(0.0, 0.0), 100e4);
shapeLayer.addRenderable(circle);
getWwd().getModel().getLayers().add(symbolLayer);
getWwd().getModel().getLayers().add(shapeLayer);
}
}
public static void main(String[] args) {
start("World Wind Testing", AppFrame.class);
}
}
No matter which order I add the layers in, the Tactical Symbol is always rendered on top of the Surface Shape. I'm assuming this is because shapes are rendered differently:
"layers are displayed in the order they’re defined in the layer list. (3D shapes within layers, however, are displayed in far-to-near order"
I have a hunch that I can solve this problem by extending Tactical Symbol and implementing the OrderedRenderable interface and overriding the makeOrderedRenderable() method but I'm unsure as to which specific changes I should make to achieve the desired functionality without breaking other layers.