Gorgon
Show / Hide Table of Contents

Struct Gorgon2DVertex

A vertex used for 2D rendering.

Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
Namespace: Gorgon.Renderers.Geometry
Assembly: Gorgon.Graphics.Core.dll
Syntax
public struct Gorgon2DVertex

Constructors

| Edit this page View Source

Gorgon2DVertex(Vector2, GorgonColor, Vector4, Vector2)

Initializes a new instance of the Gorgon2DVertex struct.

Declaration
public Gorgon2DVertex(Vector2 pos, GorgonColor color, Vector4 uv, Vector2 angle)
Parameters
Type Name Description
Vector2 pos

The position.

GorgonColor color

The color.

Vector4 uv

The texture coordinates.

Vector2 angle

The angle expressed as the cosine (x) and sine (y) of the angle.

| Edit this page View Source

Gorgon2DVertex(Vector3, GorgonColor, Vector4, Vector2)

Initializes a new instance of the Gorgon2DVertex struct.

Declaration
public Gorgon2DVertex(Vector3 pos, GorgonColor color, Vector4 uv, Vector2 angle)
Parameters
Type Name Description
Vector3 pos

The position.

GorgonColor color

The color.

Vector4 uv

The texture coordinates.

Vector2 angle

The angle expressed as the cosine (x) and sine (y) of the angle.

| Edit this page View Source

Gorgon2DVertex(Vector4, GorgonColor, Vector4, Vector2)

Initializes a new instance of the Gorgon2DVertex struct.

Declaration
public Gorgon2DVertex(Vector4 pos, GorgonColor color, Vector4 uv, Vector2 angle)
Parameters
Type Name Description
Vector4 pos

The position.

GorgonColor color

The color.

Vector4 uv

The texture coordinates.

Vector2 angle

The angle expressed as the cosine (x) and sine (y) of the angle.

Fields

| Edit this page View Source

Angle

The Cosine and Sine for the angle of rotation.

Declaration
[InputElement(3, "ANGLE")]
public Vector2 Angle
Field Value
Type Description
Vector2
| Edit this page View Source

Color

Color of the vertex.

Declaration
[InputElement(1, "COLOR")]
public GorgonColor Color
Field Value
Type Description
GorgonColor
| Edit this page View Source

Position

Position of the vertex.

Declaration
[InputElement(0, "SV_POSITION")]
public Vector4 Position
Field Value
Type Description
Vector4
| Edit this page View Source

SizeInBytes

The size of the vertex, in bytes.

Declaration
public static readonly int SizeInBytes
Field Value
Type Description
int
| Edit this page View Source

UV

Texture coordinates for the vertex.

Declaration
[InputElement(2, "TEXCOORD")]
public Vector4 UV
Field Value
Type Description
Vector4
Remarks

The Z component is used to pass an index into a texture array.

The W component is used to handle perspective correct rendering of a quad.

Methods

| Edit this page View Source

Deconstruct(out Vector4, out GorgonColor, out Vector4, out Vector2)

Deconstructs this instance into a tuple.

Declaration
public readonly void Deconstruct(out Vector4 position, out GorgonColor color, out Vector4 uv, out Vector2 angle)
Parameters
Type Name Description
Vector4 position

The position.

GorgonColor color

The color.

Vector4 uv

The texture coordinates.

Vector2 angle

The angle.

| Edit this page View Source

Deconstruct(out float, out float, out float)

Deconstructs this instance into individual position values.

Declaration
public readonly void Deconstruct(out float x, out float y, out float z)
Parameters
Type Name Description
float x

The X coordinate of the Position.

float y

The Y coordinate of the Position.

float z

The Z coordinate of the Position.

Extension Methods

GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author