MeshVertexColorList
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
Capacity
Gets or sets the total number of vertex colors the internal data structure can hold without resizing.
Public Property
Count
Gets or sets the number of mesh colors.
Public Property
Item
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
Tag
Gets or sets a mapping information for the mesh associated with these vertex colors.
Methods
Name
Description
Public Method
Add(Color)
Adds a new vertex color to the end of the color list.
Public Method
Add(Int32, Int32, Int32)
Adds a new vertex color to the end of the color list.
Public Method
AddRange
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
AppendColors
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
Clear
Clears the vertex color list on the mesh.
Public Method
CreateMonotoneMesh
Constructs a valid vertex color list consisting of a single color.
Public Method
Destroy
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
GetEnumerator
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
SetColor(Int32, Color)
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
SetColor(MeshFace, Color)
Sets a color at the three or four vertex indices of a specified face.
Public Method
SetColor(Int32, Int32, Int32, Int32)
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
SetColors
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
ToARGBArray
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.)