Table of Contents

Class VertexChannelCollection

Namespace
Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly
MonoGame.Framework.Content.Pipeline.dll

Provides methods and properties for managing a list of vertex data channels.

public sealed class VertexChannelCollection : IList<VertexChannel>, ICollection<VertexChannel>, IEnumerable<VertexChannel>, IEnumerable
Inheritance
VertexChannelCollection
Implements
Inherited Members

Properties

Count

Gets the number of vertex channels in the collection.

public int Count { get; }

Property Value

int

this[int]

Gets or sets the vertex channel at the specified index position.

public VertexChannel this[int index] { get; set; }

Parameters

index int

Property Value

VertexChannel

this[string]

Gets or sets the vertex channel with the specified name.

public VertexChannel this[string name] { get; set; }

Parameters

name string

Property Value

VertexChannel

Methods

Add(string, Type, IEnumerable)

Adds a new vertex channel to the end of the collection.

public VertexChannel Add(string name, Type elementType, IEnumerable channelData)

Parameters

name string

Name of the new channel.

elementType Type

Type of data to be contained in the new channel.

channelData IEnumerable

Initial data for the new channel. If null, the channel is filled with the default value for that type.

Returns

VertexChannel

The newly added vertex channel.

Add<ElementType>(string, IEnumerable<ElementType>)

Adds a new vertex channel to the end of the collection.

public VertexChannel<ElementType> Add<ElementType>(string name, IEnumerable<ElementType> channelData)

Parameters

name string

Name of the new channel.

channelData IEnumerable<ElementType>

Initial data for the new channel. If null, the channel is filled with the default value for that type.

Returns

VertexChannel<ElementType>

The newly added vertex channel.

Type Parameters

ElementType

Type of the channel.

Clear()

Removes all vertex channels from the collection.

public void Clear()

Contains(VertexChannel)

Determines whether the collection contains the specified vertex channel.

public bool Contains(VertexChannel item)

Parameters

item VertexChannel

The channel being searched for.

Returns

bool

true if the channel was found; false otherwise.

Contains(string)

Determines whether the collection contains the specified vertex channel.

public bool Contains(string name)

Parameters

name string

Name of the channel being searched for.

Returns

bool

true if the channel was found; false otherwise.

ConvertChannelContent<TargetType>(int)

Converts the channel, at the specified index, to another vector format.

public VertexChannel<TargetType> ConvertChannelContent<TargetType>(int index)

Parameters

index int

Index of the channel to be converted.

Returns

VertexChannel<TargetType>

New channel in the specified format.

Type Parameters

TargetType

Type of the target format. Can be one of the following: Single, Vector2, Vector3, Vector4, IPackedVector

ConvertChannelContent<TargetType>(string)

Converts the channel, specified by name to another vector format.

public VertexChannel<TargetType> ConvertChannelContent<TargetType>(string name)

Parameters

name string

Name of the channel to be converted.

Returns

VertexChannel<TargetType>

New channel in the specified format.

Type Parameters

TargetType

Type of the target format. Can be one of the following: Single, Vector2, Vector3, Vector4, IPackedVector

GetEnumerator()

Gets an enumerator that iterates through the vertex channels of a collection.

public IEnumerator<VertexChannel> GetEnumerator()

Returns

IEnumerator<VertexChannel>

Enumerator for the collection.

Get<T>(int)

Gets the vertex channel with the specified index and content type.

public VertexChannel<T> Get<T>(int index)

Parameters

index int

Index of a vertex channel.

Returns

VertexChannel<T>

The vertex channel.

Type Parameters

T

Type of a vertex channel.

Get<T>(string)

Gets the vertex channel with the specified name and content type.

public VertexChannel<T> Get<T>(string name)

Parameters

name string

Name of a vertex channel.

Returns

VertexChannel<T>

The vertex channel.

Type Parameters

T

Type of the vertex channel.

IndexOf(VertexChannel)

Determines the index of the specified vertex channel.

public int IndexOf(VertexChannel item)

Parameters

item VertexChannel

Vertex channel being searched for.

Returns

int

Index of the vertex channel.

IndexOf(string)

Determines the index of a vertex channel with the specified name.

public int IndexOf(string name)

Parameters

name string

Name of the vertex channel being searched for.

Returns

int

Index of the vertex channel.

Insert(int, string, Type, IEnumerable)

Inserts a new vertex channel at the specified position.

public VertexChannel Insert(int index, string name, Type elementType, IEnumerable channelData)

Parameters

index int

Index for channel insertion.

name string

Name of the new channel.

elementType Type

Type of the new channel.

channelData IEnumerable

Initial data for the new channel. If null, it is filled with the default value.

Returns

VertexChannel

The inserted vertex channel.

Insert<ElementType>(int, string, IEnumerable<ElementType>)

Inserts a new vertex channel at the specified position.

public VertexChannel<ElementType> Insert<ElementType>(int index, string name, IEnumerable<ElementType> channelData)

Parameters

index int

Index for channel insertion.

name string

Name of the new channel.

channelData IEnumerable<ElementType>

The new channel.

Returns

VertexChannel<ElementType>

The inserted vertex channel.

Type Parameters

ElementType

Type of the new channel.

Remove(VertexChannel)

Removes the specified vertex channel from the collection.

public bool Remove(VertexChannel item)

Parameters

item VertexChannel

The vertex channel being removed.

Returns

bool

true if the channel was removed; false otherwise.

Remove(string)

Removes the specified vertex channel from the collection.

public bool Remove(string name)

Parameters

name string

Name of the vertex channel being removed.

Returns

bool

true if the channel was removed; false otherwise.

RemoveAt(int)

Removes the vertex channel at the specified index position.

public void RemoveAt(int index)

Parameters

index int

Index of the vertex channel being removed.