Table of Contents

Class GLLine

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

Opengl line primitive.

public class GLLine : GLPrimitiveBase, IGLLine, IGLPrimitive, IGLVertexManagerObject, INotifyPropertyChanged
Inheritance
GLLine
Implements
Inherited Members
Extension Methods

Constructors

GLLine()

Create an opengl line.

public GLLine()

Remarks

This entity can be added into the model through a GLLineFigure.

GLLine(Line)

Create an opengl line by given geometric line template.

public GLLine(Line line)

Parameters

line Line

Remarks

This entity can be added into the model through a GLLineFigure.

Properties

From

Line from vertex.

public GLVertex From { get; set; }

Property Value

GLVertex

Remarks

Changing this property will:

To

Line to vertex.

public GLVertex To { get; set; }

Property Value

GLVertex

Remarks

Changing this property will:

Vertexes

Enumerate primitive gl vertexes.

public override IEnumerable<GLVertex> Vertexes { get; }

Property Value

IEnumerable<GLVertex>

Methods

CopySpecialized(GLPrimitiveBase)

protected override void CopySpecialized(GLPrimitiveBase other)

Parameters

other GLPrimitiveBase

FromTo(GLVertex, GLVertex)

Create a new opengl line by two points through given two gl vertexes.

public static GLLine FromTo(GLVertex from, GLVertex to)

Parameters

from GLVertex

From vertex.

to GLVertex

To vertex.

Returns

GLLine

FromTo(in Vector2, in Vector2, in Color?)

Create a new opengl line by two given 2d points ( assuming z=0 ) setting given optional color.

public static GLLine FromTo(in Vector2 from, in Vector2 to, in Color? color = null)

Parameters

from Vector2

From position.

to Vector2

To position.

color Color?

(Optional) color.

Returns

GLLine

FromTo(in Vector3, in Vector3, in Color, in Color)

Create a new opengl line by two given points setting color of two points.

public static GLLine FromTo(in Vector3 from, in Vector3 to, in Color colorFrom, in Color colorTo)

Parameters

from Vector3

From position.

to Vector3

To position.

colorFrom Color

From vertex color.

colorTo Color

To vertex color.

Returns

GLLine

FromTo(in Vector3, in Vector3, in Color?)

Create a new opengl line by two given points setting given optional color.

public static GLLine FromTo(in Vector3 from, in Vector3 to, in Color? color = null)

Parameters

from Vector3

From position.

to Vector3

To position.

color Color?

(Optional) color.

Returns

GLLine

Intersect(in Matrix4x4)

Compute intersection point of this gl line to the given plane.

public Vector3? Intersect(in Matrix4x4 plane)

Parameters

plane Matrix4x4

World matrix plane.

Returns

Vector3?

Intersection point or null if no intersection found.

See Also

MakeInstance()

protected override GLPrimitiveBase MakeInstance()

Returns

GLPrimitiveBase

Mirror(in Matrix4x4)

Create a mirrored primitive against given xy plane.

public override GLPrimitiveBase? Mirror(in Matrix4x4 xyPlane)

Parameters

xyPlane Matrix4x4

XY mirror plane.

Returns

GLPrimitiveBase

Mirrored primitive.

PointV(GLVertex, GLVertex)

Create a new opengl line by given from point extending of the given vector.

public static GLLine PointV(GLVertex point, GLVertex v)

Parameters

point GLVertex

From position.

v GLVertex

Extension vector.

Returns

GLLine

PointV(in Vector2, in Vector2, in Color?)

Create a new opengl line by given 2d point extending of the given 2d vector (assuming Z=0) settings optionally the color.

public static GLLine PointV(in Vector2 point, in Vector2 v, in Color? color = null)

Parameters

point Vector2

From position.

v Vector2

Extension vector.

color Color?

(Optional) color to set.

Returns

GLLine

PointV(in Vector3, in Vector3, in Color, in Color)

Create a new opengl line by given point extending of the given vector with given color for the from, to vertexes.

public static GLLine PointV(in Vector3 point, in Vector3 v, in Color colorFrom, in Color colorTo)

Parameters

point Vector3

From position.

v Vector3

Extension vector.

colorFrom Color

From vertex color.

colorTo Color

To vertex color.

Returns

GLLine

PointV(in Vector3, in Vector3, in Color?)

Create a new opengl line by given point extending from there extending of the given vector setting optionally the color.

public static GLLine PointV(in Vector3 point, in Vector3 v, in Color? color = null)

Parameters

point Vector3

From position.

v Vector3

Extension vector.

color Color?

Color to apply the line ( from, to vertexes ).

Returns

GLLine

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 override string SimpleCmd(bool includeHeader = true)

Parameters

includeHeader bool

If true header will prepended to form a complete command.

Returns

string

ToString()

public override string ToString()

Returns

string