Click or drag to resize

PrimitiveManagerAdd Method

Adds a primitive to the manager. Primitives must be added to the manager to be rendered.

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

Parameters

primitive
Type: AGI.Foundation.GraphicsPrimitive
The primitive to add to the manager.
Exceptions
ExceptionCondition
ArgumentNullExceptionprimitive is null.
ArgumentExceptionprimitive already exists in a composite or the manager.
Remarks

When a primitive is added to the manager, the scene is not automatically re-rendered, so the primitive doesn't immediately show up. The scene can be rendered explicitly using SceneManager.Render or Scene.Render. For best performance, add several primitives to the manager before re-rendering.

When a primitive is added to the manager, it appears in all scenes by default. To limit the number of scenes, assign a SceneDisplayCondition to the primitive's DisplayCondition.

See Also