Click or drag to resize

CompositePrimitive Class

A primitive that is composed of multiple other primitives. Since composites can contain other composites, they are commonly used to build hierarchies of primitives to efficiently evaluate display conditions.

Primitives in a composite must have the same ReferenceFrame.

Inheritance Hierarchy
SystemObject
  AGI.Foundation.GraphicsPrimitive
    AGI.Foundation.GraphicsCompositePrimitive

Namespace:  AGI.Foundation.Graphics
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.1.418.0 (24.1.418.0)
Syntax
public sealed class CompositePrimitive : Primitive, 
	IEnumerable<Primitive>

The CompositePrimitive type exposes the following members.

Constructors
  NameDescription
Public methodCompositePrimitive
Initializes a default composite primitive.
Top
Properties
  NameDescription
Public propertyAutomaticallyComputeBoundingSphere
Gets or sets if the primitive's BoundingSphere is automatically computed.
(Inherited from Primitive.)
Public propertyBoundingSphere
Gets or sets the bounding sphere that encompasses the primitive. The center is defined in the primitive's ReferenceFrame.
(Overrides PrimitiveBoundingSphere.)
Public propertyColor
The composite primitive does not support the color property.
(Overrides PrimitiveColor.)
Public propertyCount
Gets the number of primitives in the composite.
Public propertyDisplay
Gets or sets if the primitive should be rendered. Both this and DisplayCondition must evaluate to true for the primitive to be rendered.
(Inherited from Primitive.)
Public propertyDisplayCondition

Gets or sets the composite's display condition. During rendering, first a composite's display condition is evaluated. If it succeeds, the display condition for each primitive in the composite is evaluated.

(Overrides PrimitiveDisplayCondition.)
Public propertyReferenceFrame
Gets or sets the reference frame this primitive is defined and rendered in.
(Overrides PrimitiveReferenceFrame.)
Public propertyTag
Gets or sets custom data associated with this primitive.
(Inherited from Primitive.)
Public propertyTranslucency
The composite primitive does not support the translucency property.
(Overrides PrimitiveTranslucency.)
Public propertyTranslucentPrimitivesSortOrder
Gets or sets the sort order for translucent primitives in this composite. This determines a trade-off between rendering speed and quality. It is only recommended to use PrimitivesSortOrderBackToFront when translucent primitives along the same line of sight cause blending artifacts.
Top
Methods
  NameDescription
Public methodAdd
Adds a primitive to the composite.
Public methodClear
Removes all primitives from the composite.
Public methodContains
Determines whether the composite contains a primitive.
Public methodDispose (Inherited from Primitive.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the collection. The order of the primitives is not guaranteed to be the order that the primitives were added.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRemove
Removes a primitive from the composite.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also