Hi, my name is Alex Rybak. I'm currently an intern at AGI, and I have been working on the Insight3D team ever since I started here. I've had an interest in 3D graphics for a while, and working on Insight3D has given me a lot of opportunities to explore that area. Aside from my internship here, I am a full-time student at Drexel University, where I am studying for both a B.S. and an M.S. degree in Computer Science.
Introduction
Display conditions are a very useful Insight3D feature that allow the user to specify when a primitive, globe overlay, or screen overlay is rendered. There are a number of different types of display conditions that can be used, and what's even better is that they can be combined and used together to create fancy rules for when to display an object. In this article, I will show some example uses of display conditions.
To start off, let's say we want to display a circle on the Earth around New York City when the camera is at an altitude of one million meters or less. For this, we assign the AltitudeDisplayCondition (which becomes active when the camera's altitude above the surface is within a specified interval) to a PolyLinePrimitive. Here is the code:
CentralBody earth = CentralBodiesFacet.GetFromContext().GetByName("Earth");
Cartographic newYork = new Cartographic(Trig.DegreesToRadians(-74), Trig.DegreesToRadians(40.75), 0);
SurfaceShapesResult shape = SurfaceShapes.ComputeCircleCartographic(earth, newYork, 10000);
PolylinePrimitive line = new PolylinePrimitive(shape.PolylineType, SetHint.Infrequent);
line.Set(shape.Positions);
line.Color = Color.White;
AltitudeDisplayCondition condition = new AltitudeDisplayCondition(0, 1000000);
line.DisplayCondition = condition;
SceneManager.Primitives.Add(line);
As you can see in the images below, the circle is visible only when the camera is below this altitude.



