Table of Contents

Interface IGLPrimitive

Namespace
SearchAThing.OpenGL.Core
Assembly
netcore-opengl-core.dll

A primitive such a GLPoint, GLLine or GLTriangle can be added to a figure through its add method.
A primitive can consists of 1, 2 or 3 GLVertex that will be registered into GLVertexManager when the primitive added to the figure and figure to the model through AddFigure(IEnumerable<GLFigureBase>).

[JsonObject(MemberSerialization.OptIn)]
public interface IGLPrimitive : IGLVertexManagerObject, INotifyPropertyChanged
Inherited Members
Extension Methods

Properties

LBBox

(cached) Bounding box of the primitive [local].

BBox LBBox { get; }

Property Value

BBox

Order

Primitive order appareance ( Default: 0 ).
Higher order primitives appears front to lower order primitives of the same figure.
From the opengl point of view figures with higher order ( front ) are drawn firstly then lower order ( back ).
Changing this property emits FigureInvalidated event.

[JsonProperty]
int Order { get; set; }

Property Value

int

ParentFigure

Reference to the parent figure.

IGLFigure? ParentFigure { get; }

Property Value

IGLFigure

PrimitiveType

Enum that describe which type underlying to the instance.

GLPrimitiveType PrimitiveType { get; }

Property Value

GLPrimitiveType

Selected

States if primitive is actually selected.
It true the primitive is listed in model selected primitives SelectedPrimitives.

bool Selected { get; }

Property Value

bool

Vertexes

Enumerate primitive gl vertexes.

IEnumerable<GLVertex> Vertexes { get; }

Property Value

IEnumerable<GLVertex>

Methods

SimpleCmd(bool)

Retrieve e simple cmd representation of this primtiive.
Its a textual representation of primitive information useful to regen in a separate tool.

string SimpleCmd(bool includeHeader = true)

Parameters

includeHeader bool

If true header will prepended to form a complete command.

Returns

string