Click or drag to resize

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.
Inheritance Hierarchy
SystemObject
  Rhino.DocObjectsMaterialRefs

Namespace:  Rhino.DocObjects
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public class MaterialRefs : IDictionary<Guid, MaterialRef>, 
	ICollection<KeyValuePair<Guid, MaterialRef>>, IEnumerable<KeyValuePair<Guid, MaterialRef>>, 
	IEnumerable

The MaterialRefs type exposes the following members.

Properties
  NameDescription
Public propertyCount
Gets the number of elements contained in this dictionary
Public propertyIsReadOnly
IDictionary required property, always returns false for this dictionary.
Public propertyItem
Gets or sets the element with the specified plug-in Id.
Public propertyKeys
Gets an ICollection containing the plug-in Id's in this dictionary.
Public propertyValues
Gets an ICollection containing the MaterialRef objects in this dictionary.
Top
Methods
  NameDescription
Public methodAdd(KeyValuePairGuid, MaterialRef)
Adds an item to this dictionary.
Public methodAdd(Guid, MaterialRef)
Add or replace an element with the provided key and value to this dictionary.
Public methodClear
Removes all items from this dictionary.
Public methodContains
Determines whether this dictionary contains a specific value.
Public methodContainsKey
Determines whether this dictionary contains an MaterialRef with the specified plug-in id.
Public methodCopyTo
Copies the elements of this dictionary to an System.Array, starting at a particular System.Array index.
Public methodCreate
Call this method to create a MaterialRef which can be used when calling one of the Add methods.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through this dictionary.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRemove(KeyValuePairGuid, MaterialRef)
Removes the element with the specified plug-in id from the this dictionary.
Public methodRemove(Guid)
Removes the MaterialRef with the specified plug-in Id from this dictionary.
Public methodToString (Inherited from Object.)
Public methodTryGetValue
Gets the value associated with the specified key.
Top
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.6
See Also