VertexChannelCollection

class VertexChannelCollection : System.Object, System.Collections.Generic.IList<VertexChannel>, System.Collections.Generic.ICollection<VertexChannel>, System.Collections.Generic.IEnumerable<VertexChannel>, System.Collections.IEnumerable

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

readonly int Count

Gets the number of vertex channels in the collection.

VertexChannel Item
VertexChannel Item
public Microsoft.Xna.Framework.Content.Pipeline.Graphics.VertexChannel<ElementType> Add<ElementType>(string name, System.Collections.Generic.IEnumerable<ElementType> channelData)

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

Type Parameters:
 
  • ElementType – Type of the channel.
Parameters:
  • name (string) – Name of the new channel.
  • channelData (System.Collections.Generic.IEnumerable<ElementType>) – Initial data for the new channel. If null, the channel is filled with the default value for that type.
Returns:

The newly added vertex channel.

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

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

Parameters:
  • name (string) – Name of the new channel.
  • elementType (System.Type) – Type of data to be contained in the new channel.
  • channelData (System.Collections.IEnumerable) – Initial data for the new channel. If null, the channel is filled with the default value for that type.
Returns:

The newly added vertex channel.

public void Clear()

Removes all vertex channels from the collection.

public bool Contains(string name)

Determines whether the collection contains the specified vertex channel.

Parameters:
  • name (string) – Name of the channel being searched for.
Returns:

true if the channel was found; false otherwise.

public bool Contains(VertexChannel item)

Determines whether the collection contains the specified vertex channel.

Parameters:
  • item (Microsoft.Xna.Framework.Content.Pipeline.Graphics.VertexChannel) – The channel being searched for.
Returns:

true if the channel was found; false otherwise.

public Microsoft.Xna.Framework.Content.Pipeline.Graphics.VertexChannel<TargetType> ConvertChannelContent<TargetType>(int index)

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

Type Parameters:
 
  • TargetType – Type of the target format. Can be one of the following: Single, Vector2, Vector3, Vector4, IPackedVector
Parameters:
  • index (int) – Index of the channel to be converted.
Returns:

New channel in the specified format.

public Microsoft.Xna.Framework.Content.Pipeline.Graphics.VertexChannel<TargetType> ConvertChannelContent<TargetType>(string name)

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

Type Parameters:
 
  • TargetType – Type of the target format. Can be one of the following: Single, Vector2, Vector3, Vector4, IPackedVector
Parameters:
  • name (string) – Name of the channel to be converted.
Returns:

New channel in the specified format.

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

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

Type Parameters:
 
  • T – Type of a vertex channel.
Parameters:
  • index (int) – Index of a vertex channel.
Returns:

The vertex channel.

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

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

Type Parameters:
 
  • T – Type of the vertex channel.
Parameters:
  • name (string) – Name of a vertex channel.
Returns:

The vertex channel.

public System.Collections.Generic.IEnumerator<VertexChannel> GetEnumerator()

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

Returns:Enumerator for the collection.
public int IndexOf(string name)

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

Parameters:
  • name (string) – Name of the vertex channel being searched for.
Returns:

Index of the vertex channel.

public int IndexOf(VertexChannel item)

Determines the index of the specified vertex channel.

Parameters:
  • item (Microsoft.Xna.Framework.Content.Pipeline.Graphics.VertexChannel) – Vertex channel being searched for.
Returns:

Index of the vertex channel.

public Microsoft.Xna.Framework.Content.Pipeline.Graphics.VertexChannel<ElementType> Insert<ElementType>(int index, string name, System.Collections.Generic.IEnumerable<ElementType> channelData)

Inserts a new vertex channel at the specified position.

Type Parameters:
 
  • ElementType – Type of the new channel.
Parameters:
  • index (int) – Index for channel insertion.
  • name (string) – Name of the new channel.
  • channelData (System.Collections.Generic.IEnumerable<ElementType>) – The new channel.
Returns:

The inserted vertex channel.

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

Inserts a new vertex channel at the specified position.

Parameters:
  • index (int) – Index for channel insertion.
  • name (string) – Name of the new channel.
  • elementType (System.Type) – Type of the new channel.
  • channelData (System.Collections.IEnumerable) – Initial data for the new channel. If null, it is filled with the default value.
Returns:

The inserted vertex channel.

public bool Remove(string name)

Removes the specified vertex channel from the collection.

Parameters:
  • name (string) – Name of the vertex channel being removed.
Returns:

true if the channel was removed; false otherwise.

public bool Remove(VertexChannel item)

Removes the specified vertex channel from the collection.

Parameters:
  • item (Microsoft.Xna.Framework.Content.Pipeline.Graphics.VertexChannel) – The vertex channel being removed.
Returns:

true if the channel was removed; false otherwise.

public void RemoveAt(int index)

Removes the vertex channel at the specified index position.

Parameters:
  • index (int) – Index of the vertex channel being removed.