Table of Contents

Class GLPrimitiveBase

Namespace
SearchAThing.OpenGL.Core
Assembly
netcore-opengl-core.dll
public abstract class GLPrimitiveBase : IGLPrimitive, IGLVertexManagerObject, INotifyPropertyChanged
Inheritance
GLPrimitiveBase
Implements
Derived
Inherited Members
Extension Methods

Properties

LBBox

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

public 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.

public int Order { get; set; }

Property Value

int

ParentFigure

Reference to the parent figure.

public IGLFigure? ParentFigure { get; }

Property Value

IGLFigure

ParentVertexManager

Vertex manager which this object is registered to.
Before the object is added to the GLModel, therefore to the GLVertexManager, or after the object is removed from, this pointer is null.

public GLVertexManager? ParentVertexManager { get; }

Property Value

GLVertexManager

PrimitiveType

Enum that describe which type underlying to the instance.

public GLPrimitiveType PrimitiveType { get; }

Property Value

GLPrimitiveType

Selected

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

public bool Selected { get; }

Property Value

bool

Vertexes

Enumerate primitive gl vertexes.

public abstract IEnumerable<GLVertex> Vertexes { get; }

Property Value

IEnumerable<GLVertex>

Methods

Copy()

Create a copy of this gl vertex manager object copying all relevant data except the ParentVertexManager that will default to null for copies object until added to a vertex manager.

public IGLVertexManagerObject Copy()

Returns

IGLVertexManagerObject

CopyBase()

Creates a copy with all elements down the hierarchy until GLPrimitiveBase included.

protected GLPrimitiveBase CopyBase()

Returns

GLPrimitiveBase

CopySpecialized(GLPrimitiveBase)

protected abstract void CopySpecialized(GLPrimitiveBase other)

Parameters

other GLPrimitiveBase

MakeInstance()

protected abstract GLPrimitiveBase MakeInstance()

Returns

GLPrimitiveBase

Mirror(in Matrix4x4)

Create a mirrored primitive against given xy plane.

public abstract GLPrimitiveBase? Mirror(in Matrix4x4 xyPlane)

Parameters

xyPlane Matrix4x4

XY mirror plane.

Returns

GLPrimitiveBase

Mirrored primitive.

OnPropertyChanged(string?)

invoke this method to forward propertchanged event notification. note: not needed to specify propertyName set by compiler service to called property.

protected void OnPropertyChanged(string? propertyName = null)

Parameters

propertyName string

SetColor(in Color)

Set the color of primitive vertexes.

public GLPrimitiveBase SetColor(in Color color)

Parameters

color Color

Color to set on primitive vertexes.

Returns

GLPrimitiveBase

This primitive.

SetColor(in Vector4)

Set the color of primitive vertexes.

public GLPrimitiveBase SetColor(in Vector4 rgbaColor)

Parameters

rgbaColor Vector4

Color to set on primitive vertexes.

Returns

GLPrimitiveBase

This primitive.

SimpleCmd(bool)

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

public abstract string SimpleCmd(bool includeHeader = true)

Parameters

includeHeader bool

If true header will prepended to form a complete command.

Returns

string

Events

PropertyChanged

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler