MaterialRefs
ReferencesIf 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.
Properties
IDictionary required property, always returns false for this dictionary.
Gets an ICollection containing the plug-in Id's in this dictionary.
Gets an ICollection containing the MaterialRef objects in this dictionary.
Indexers
this[]
#Gets or sets the element with the specified plug-in Id.
Parameters:
| key (Guid) | The plug-in Id of the MaterialRef to get or set. |
Returns: The MaterialRef with the specified key.
Exceptions:
| ArgumentNullException | value is null. |
| ArgumentException | key is empty. |
Methods
Add or replace an element with the provided key and value to this dictionary.
Parameters:
| key (Guid) | The plug-in associated with this MaterialRef |
| value (MaterialRef) | MaterialRef to add to this dictionary |
Exceptions:
| ArgumentNullException | value is null. |
| ArgumentException | key is empty. |
Add
#Adds an item to this dictionary.
Parameters:
| item (KeyValuePair<Guid, MaterialRef>) | The object to add to this dictionary |
Exceptions:
| ArgumentNullException | value is null. |
| ArgumentException | key is empty. |
Contains
#Determines whether this dictionary contains a specific value.
Parameters:
| item (KeyValuePair<Guid, MaterialRef>) | The object to locate in this dictionary. |
Returns: true if item is found in this dictionary; otherwise, false.
Determines whether this dictionary contains an MaterialRef with the specified plug-in id.
Parameters:
| key (Guid) | The plug-in Id used to locate a MaterialRef in this dictionary. |
Returns: true if this dictionary contains an element with the specified plug-in Id; otherwise, false.
CopyTo
#Copies the elements of this dictionary to an System.Array, starting at a particular System.Array index.
Parameters:
| array (KeyValuePair<Guid, MaterialRef>[]) | The one-dimensional System.Array that is the destination of the elements copied from this dictionary. The System.Array must have zero-based indexing. |
| arrayIndex (int) | The zero-based index in array at which copying begins. |
Exceptions:
| ArgumentNullException | array is null |
| ArgumentOutOfRangeException | arrayIndex is less than 0. |
| ArgumentOutOfRangeException | The number of elements in the source dictionary is greater than the available space from arrayIndex to the end of the destination array. |
Call this method to create a MaterialRef which can be used when calling one of the Add methods.
Parameters:
| createParams (MaterialRefCreateParams) | Values used to initialize the MaterialRef |
Returns: A temporary MaterialRef object, the caller is responsible for disposing of this object.
Returns an enumerator that iterates through this dictionary.
Returns: A IEnumerator that can be used to iterate this dictionary.
Removes the MaterialRef with the specified plug-in Id from this dictionary.
Parameters:
| key (Guid) | The plug-in Id for the MaterialRef to remove. |
Returns: true if the MaterialRef is successfully removed; otherwise, false. This method also returns false if key was not found in the original dictionary.
Remove
#Removes the element with the specified plug-in id from the this dictionary.
Parameters:
| item (KeyValuePair<Guid, MaterialRef>) | The object to remove from this dictionary |
Returns an enumerator that iterates through this dictionary.
Returns: An System.Collections.IEnumerator object that can be used to iterate through this dictionary.
Gets the value associated with the specified key.
Parameters:
| key (Guid) | The plug-in Id whose MaterialRef to get. |
| value (out MaterialRef) | When this method returns, the MaterialRef associated with the specified key, if the key is found; otherwise, null. This parameter is passed uninitialized. |
Returns: true if this dictionary contains a MaterialRef with the specified key; otherwise, false.