Skip to content

MeshVertexColorList

Public Class

Provides access to the vertex colors of a mesh object.

Inheritance Hierarchy

System.Object
Rhino.Geometry.Collections.MeshVertexColorList

Namespace: Rhino.Geometry.Collections

Assembly: RhinoCommon (in RhinoCommon.dll)

Syntax

public class MeshVertexColorList : IResizableList<Color>,
IList<Color>, ICollection<Color>, IEnumerable<Color>,
IEnumerable, IList, ICollection, IReadOnlyList<Color>,
IReadOnlyCollection<Color>

The MeshVertexColorList type exposes the following members.

Properties

Name

Description


Public Property

Gets or sets the total number of vertex colors the internal data structure can hold without resizing.


Public Property

Gets or sets the number of mesh colors.


Public Property

Gets or sets the vertex color at the given index. The index must be valid or an IndexOutOfRangeException will be thrown.


Public Property
Code Example

Gets or sets a mapping information for the mesh associated with these vertex colors.


Methods

Name

Description


Public Method

Adds a new vertex color to the end of the color list.


Public Method

Adds a new vertex color to the end of the color list.


Public Method

Adds an enumerable of colors to the to the vertex color list. For the Mesh to be valid, the number of colors must match the number of vertices.


Public Method

Appends a collection of colors to the vertex color list. For the Mesh to be valid, the number of colors must match the number of vertices.


Public Method

Clears the vertex color list on the mesh.


Public Method

Constructs a valid vertex color list consisting of a single color.


Public Method

Releases all memory allocated to store vertex colors. The list capacity will be 0 after this call.

Subsequent calls can add new items.


Public Method

Equals

Determines whether the specified object is equal to the current object.

(Inherited from Object.)


Protected Method

Finalize

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

(Inherited from Object.)


Public Method

Gets an enumerator that yields all colors in this collection.


Public Method

GetHashCode

Serves as the default hash function.

(Inherited from Object.)


Public Method

GetType

Gets the Type of the current instance.

(Inherited from Object.)


Protected Method

MemberwiseClone

Creates a shallow copy of the current Object.

(Inherited from Object.)


Public Method

Sets or adds a vertex to the Vertex List.

If [index] is less than [Count], the existing vertex at [index] will be modified.

If [index] equals [Count], a new vertex is appended to the end of the vertex list.

If [index] is larger than [Count], the function will return false.


Public Method

Sets a color at the three or four vertex indices of a specified face.


Public Method

Sets or adds a vertex color to the color List.

If [index] is less than [Count], the existing vertex at [index] will be modified.

If [index] equals [Count], a new vertex is appended to the end of the vertex list.

If [index] is larger than [Count], the function will return false.


Public Method
Code Example

Sets all the vertex colors in one go. For the Mesh to be valid, the number of colors must match the number of vertices.


Public Method

Return colors as an array of integers with packed ARGB values


Public Method

ToString

Returns a string that represents the current object.

(Inherited from Object.)