RhinoCommon API
MaterialRefs Class |
If you are developing a high quality plug-in renderer, and a user is
assigning a custom render material to this object, then add rendering
material information to the MaterialRefs dictionary.
Note to developers:
As soon as the MaterialRefs dictionary contains items rendering
material queries slow down. Do not populate the MaterialRefs
dictionary when setting the MaterialIndex will take care of your needs.

Namespace: Rhino.DocObjects
Assembly: RhinoCommon (in RhinoCommon.dll)

public class MaterialRefs : IDictionary<Guid, MaterialRef>, ICollection<KeyValuePair<Guid, MaterialRef>>, IEnumerable<KeyValuePair<Guid, MaterialRef>>, IEnumerable
Public Class MaterialRefs Implements IDictionary(Of Guid, MaterialRef), ICollection(Of KeyValuePair(Of Guid, MaterialRef)), IEnumerable(Of KeyValuePair(Of Guid, MaterialRef)), IEnumerable
The MaterialRefs type exposes the following members.

Name | Description | |
---|---|---|
![]() | Count |
Gets the number of elements contained in this dictionary
|
![]() | IsReadOnly |
IDictionary required property, always returns false for this dictionary.
|
![]() | Item |
Gets or sets the element with the specified plug-in Id.
|
![]() | Keys |
Gets an ICollection containing the plug-in Id's in this dictionary.
|
![]() | Values |
Gets an ICollection containing the MaterialRef objects in this
dictionary.
|

Name | Description | |
---|---|---|
![]() | Add(KeyValuePairGuid, MaterialRef) |
Adds an item to this dictionary.
|
![]() | Add(Guid, MaterialRef) |
Add or replace an element with the provided key and value to this dictionary.
|
![]() | Clear |
Removes all items from this dictionary.
|
![]() | Contains |
Determines whether this dictionary contains a specific value.
|
![]() | ContainsKey |
Determines whether this dictionary contains an MaterialRef with the
specified plug-in id.
|
![]() | CopyTo |
Copies the elements of this dictionary to an System.Array, starting at
a particular System.Array index.
|
![]() | Create |
Call this method to create a MaterialRef which can be used when calling
one of the Add methods.
|
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetEnumerator |
Returns an enumerator that iterates through this dictionary.
|
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | Remove(KeyValuePairGuid, MaterialRef) |
Removes the element with the specified plug-in id from the this dictionary.
|
![]() | Remove(Guid) |
Removes the MaterialRef with the specified plug-in Id from this
dictionary.
|
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | TryGetValue |
Gets the value associated with the specified key.
|

Rhino for Mac
Supported in: 5.4Rhino for Windows
Supported in: 6.14