Table of Contents

Interface IGLVertex

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

Represent a vertex and its the base object managed by the GLVertexManager.
Primitives such as GLPoint, GLLine and GLTriangle store their vertex information using this type.
When the gl render happens ( see Render(IRenderDevice?) ) all the model vertexes are mapped to the gpu ram and figures with their vertex indexes are feed into.
Internally the GLVertexManager hold a struct projection of this object, the GLVertexStruct.

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

Remarks

In order to manage operations such as addition and removal of figures with related vertexes the vertex manager doesn't allow to register a gl vertex twice, thus two figures cannot share the same gl vertex reference.
Note: Internally the vertex manager doesn't duplicate any vertex equals to other existing.

Properties

EffectiveNormal

Vertex normal [local] eventually inverted if flag InvertNormal present.

Vector3 EffectiveNormal { get; }

Property Value

Vector3

Index

GLVertexManager vertex index associated to this gl vertex or null if not yet registered to.

uint? Index { get; }

Property Value

uint?

InvertNormal

Invert the normal flag ( used by Mirror(in Matrix4x4).

[JsonProperty]
bool InvertNormal { get; set; }

Property Value

bool
See Also

IsAttached

States if this vertex is already registed to a vertex manager.

bool IsAttached { get; }

Property Value

bool

MaterialColor

Color encoded in vector4 (range 0..1) as (red, green, blue, alpha).
Alpha=1 (full opaque).
Alpha=0 (full transparent).

[JsonProperty]
Vector4 MaterialColor { get; set; }

Property Value

Vector4

MaterialProperties

Describe the strength (0..1) of the ambient, diffuse, specular light effects.

[JsonProperty]
Vector3 MaterialProperties { get; set; }

Property Value

Vector3

Normal

Vertex normal [local].

[JsonProperty]
Vector3 Normal { get; set; }

Property Value

Vector3

ParentFigure

Figure referencing this vertex in one of their primitive's components.
Its null if related figure not yet added to the vertex manager.

IGLFigure? ParentFigure { get; }

Property Value

IGLFigure

ParentPrimitive

Primitive referencing this vertex in one of their components.
Its null if related figure not yet added to the vertex manager.

IGLPrimitive? ParentPrimitive { get; }

Property Value

IGLPrimitive

Position

Vertex position [local].

[JsonProperty]
Vector3 Position { get; set; }

Property Value

Vector3

ScreenCoordMode

Evaluated through parent IGLFigure it states if this vertex has to be processed in the gl shader pipeline within UNINAME_uFigureScreenCoord uniform flag.

bool ScreenCoordMode { get; }

Property Value

bool
See Also

Signature

String signature of this vertex, used by GLVertexManager to keep a unique vertex array of GLVertexStruct.

string Signature { get; }

Property Value

string

TextureST

Vertex texture offset ( range [0,0] to [1,1] ).

[JsonProperty]
Vector2 TextureST { get; set; }

Property Value

Vector2

Methods

ToStruct()

Create a struct representation of this vertex.
Some information used only by framework itself not pertinent to those used by the shader, such as Index are omitted.

GLVertexStruct ToStruct()

Returns

GLVertexStruct
See Also