AGI Components with Insight3D Alpha 2008 r8
Marker Primitive

Markers are 2D images that always face the viewer and remain a constant pixel size. Markers are commonly used to visualize a large number of objects moving in real-time.

The marker primitive in this alpha version is still a prototype and is therefore likely to change - although, the concepts will not be significantly different. Markers are initialized with a position similar to models. Markers are also provided with a 2D texture as shown in the following example from the HowTo.

CopyC#
// The URI can be a file path, http or ftp location
IAgGxRendererTexture2D texture = sceneManager.Textures.LoadFromURI(Program.uriLocalDataPath + "Markers/f-22a_raptor.png");
IAgGxCentralBody earth = sceneManager.CentralBodies("Earth");
IAgGxPrimitiveMarker marker = new AgGxPrimitiveMarker();
marker.InitializeCartographicFromTexture2D(earth,
    Trig.DegreesToRadians(30),
    Trig.DegreesToRadians(-81),
    2000,
    texture,
    128);

sceneManager.Add(marker);

Markers occupy the same number of pixels regardless of viewer position.

In this example, a texture is created from an image on disk, but images can also be loaded from HTTP or FTP sites using the same method call. When the marker is initialized with the texture, the pixel size is also specified as the last argument. If the texture is not square, this is the length of the longer size. As the user moves around and zooms in and out, the marker will remain the same size on the screen. The pixel size is independent of the pixel size of the texture. Thus, many markers can share the same texture but be different sizes.

Use the marker's Rotation property to rotate a marker. Once initialized, a marker's position can be changed with SetPosition or SetPositionCartographic.