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 | (Inherited from Object.) | |
| Finalize | (Inherited from Object.) | |
| GetEnumerator |
Returns an enumerator that iterates through this dictionary.
| |
| GetHashCode | (Inherited from Object.) | |
| GetType | (Inherited from Object.) | |
| MemberwiseClone | (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 | (Inherited from Object.) | |
| TryGetValue |
Gets the value associated with the specified key.
|