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
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through this dictionary.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove(Guid)
Removes the MaterialRef with the specified plug-in Id from this dictionary.
Public methodRemove(KeyValuePairGuid, MaterialRef)
Removes the element with the specified plug-in id from the this dictionary.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetValue
Gets the value associated with the specified key.
Top
See Also