Click or drag to resize

OrderedCompositePrimitiveAdd Method

Adds a primitive to the front of the composite. Primitives at the front are rendered on top of primitives at the bottom.

Namespace:  AGI.Foundation.Graphics
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 23.2.417.0 (23.2.417.0)
public void Add(
	Primitive primitive


Type: AGI.Foundation.GraphicsPrimitive
The primitive to add to the composite.
ArgumentNullExceptionprimitive is null.
ArgumentExceptionprimitive doesn't have the same ReferenceFrame as the composite.
ArgumentExceptionprimitive already was already added to a composite or the primitive manager.
Primitives are rendered in the order they are added, so the first primitive added to the composite is rendered on the bottom and the last primitive added is rendered on top. The order can be changed with calls such as BringToFront(Primitive) and SendToBack(Primitive).

The ordered composite primitive is intended to contain primitives rendered on the globe's surface. It is only recommonded to add the following primitives:

In particular, it is not intended for use with: ModelPrimitive, SolidPrimitive, or CompositePrimitive.

Regardless of order in the composite, all SurfaceMeshPrimitives are rendered before other primitives in the composite.

See Also