ParameterCollection Class
              
              
              Namespace: Stride.Rendering
              Assembly: Stride.dll
              
              
              Manage several effect parameters (resources and data). A specific data and resource layout can be forced (usually by the consuming effect).
 
              
              
              
                 System.Object →  
                ParameterCollection
              
              
              
              
              
              
                [DataSerializer(typeof(ParameterCollection.Serializer))]
[DataSerializerGlobal(null, typeof(FastList<ParameterKeyInfo>), DataSerializerGenericMode.None, false, false)]
public class ParameterCollection
               
              
              
              
              
              
                
                  
                    | Name | 
                    Description | 
                    
                        
                  
                      
                         
              
                      | Constructors
               | 
              
                          
                          | 
                              
                           | 
                          ParameterCollection() | 
                           | 
                          
                          
                          | 
                              
                           | 
                          ParameterCollection(ParameterCollection) | 
                           | 
                          
              
                     
              
                      | Fields
               | 
              
                          
                          | 
                              
                           | 
                          DataValues | 
                           | 
                          
                          
                          | 
                              
                           | 
                          LayoutCounter | 
                           | 
                          
                          
                          | 
                              
                           | 
                          ObjectValues | 
                           | 
                          
                          
                          | 
                              
                           | 
                          PermutationCounter | 
                           | 
                          
              
                     
              
                      | Properties
               | 
              
                          
                          | 
                              
                           | 
                          HasLayout | 
                           | 
                          
                          
                          | 
                              
                           | 
                          Layout | 
                           | 
                          
                          
                          | 
                              
                           | 
                          ParameterKeyInfos | 
                           | 
                          
              
                     
              
                      | Methods
               | 
              
                          
                          | 
                              
                           | 
                          Clear() | 
                          Clears the collection, including the layout. 
 | 
                          
                          
                          | 
                              
                           | 
                          ContainsKey(ParameterKey) | 
                          Determines whether current collection contains a value for this key. 
 | 
                          
                          
                          | 
                              
                           | 
                          CopyTo<T>(ValueParameterKey<T>, ParameterCollection, ValueParameterKey<T>) | 
                          Copies all blittable values of a given key to the specified ParameterCollection. 
 | 
                          
                          
                          | 
                              
                           | 
                          Get<T>(ObjectParameterAccessor<T>) | 
                          Gets an object. 
 | 
                          
                          
                          | 
                              
                           | 
                          Get<T>(ObjectParameterKey<T>, Boolean) | 
                          Gets an object. 
 | 
                          
                          
                          | 
                              
                           | 
                          Get<T>(PermutationParameter<T>) | 
                          Gets a permutation. 
 | 
                          
                          
                          | 
                              
                           | 
                          Get<T>(PermutationParameterKey<T>, Boolean) | 
                          Gets a permutation. 
 | 
                          
                          
                          | 
                              
                           | 
                          Get<T>(ValueParameter<T>) | 
                          Gets a value. 
 | 
                          
                          
                          | 
                              
                           | 
                          Get<T>(ValueParameterKey<T>) | 
                          Gets a blittable value. 
 | 
                          
                          
                          | 
                              
                           | 
                          GetAccessor<T>(ObjectParameterKey<T>, Boolean) | 
                          Gets an accessor to get and set objects more quickly. 
 | 
                          
                          
                          | 
                              
                           | 
                          GetAccessor<T>(PermutationParameterKey<T>, Boolean) | 
                          Gets an accessor to get and set permutations more quickly. 
 | 
                          
                          
                          | 
                              
                           | 
                          GetAccessor<T>(ValueParameterKey<T>, Int32) | 
                          Gets an accessor to get and set blittable values more quickly. 
 | 
                          
                          
                          | 
                              
                           | 
                          GetObject(ParameterKey) | 
                           | 
                          
                          
                          | 
                              
                           | 
                          GetObjectParameterHelper(ParameterKey, Boolean) | 
                           | 
                          
                          
                          | 
                              
                           | 
                          GetValues<T>(ValueParameterKey<T>) | 
                          Gets blittable values. 
 | 
                          
                          
                          | 
                              
                           | 
                          Remove(ParameterKey) | 
                           | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(ObjectParameterAccessor<T>, T) | 
                          Sets an object. 
 | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(ObjectParameterKey<T>, T) | 
                          Sets an object. 
 | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(PermutationParameter<T>, T) | 
                          Sets a permutation. 
 | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(PermutationParameterKey<T>, T) | 
                          Sets a permutation. 
 | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(ValueParameter<T>, T) | 
                          Sets a blittable value. 
 | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(ValueParameter<T>, ref T) | 
                          Sets a blittable value. 
 | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(ValueParameter<T>, Int32, ref T) | 
                          Sets blittable values. 
 | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(ValueParameterKey<T>, T) | 
                          Sets a blittable value. 
 | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(ValueParameterKey<T>, ref T) | 
                          Sets a blittable value. 
 | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(ValueParameterKey<T>, T[]) | 
                          Sets blittable values. 
 | 
                          
                          
                          | 
                              
                           | 
                          Set<T>(ValueParameterKey<T>, Int32, ref T) | 
                          Sets blittable values. 
 | 
                          
                          
                          | 
                              
                           | 
                          SetObject(ParameterKey, Object) | 
                           | 
                          
                          
                          | 
                              
                           | 
                          ToString() | 
                           | 
                          
                          
                          | 
                              
                           | 
                          UpdateLayout(ParameterCollectionLayout) | 
                          Reorganizes internal data and resources to match the given objects, and append extra values at the end. 
 | 
                          
              
              
                  
                
  
              
                     
              
                
                  |
                  Improve this Doc
                
                
                  View Source
                
              
              
                Constructors
              
                
              
              
              
              
              
              ParameterCollection()
              
              
              
              
              
                public ParameterCollection()
               
              
              
              
              
              
              
              ParameterCollection(ParameterCollection)
              
              
              
              
              
                public ParameterCollection(ParameterCollection parameterCollection)
               
              
              Parameters
              
                     
              
                
                  |
                  Improve this Doc
                
                
                  View Source
                
              
              
                Fields
              
                
              
              
              
              
              DataValues
              
              
              
              
              
              
              Field Value
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.Byte[] | 
                     | 
                  
                
              
              
              
              
              
              LayoutCounter
              
              
              
              
              
              
              Field Value
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.Int32 | 
                     | 
                  
                
              
              
              
              
              
              ObjectValues
              
              
              
              
              
                public object[] ObjectValues
               
              
              Field Value
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.Object[] | 
                     | 
                  
                
              
              
              
              
              
              PermutationCounter
              
              
              
              
              
                public int PermutationCounter
               
              
              Field Value
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.Int32 | 
                     | 
                  
                
              
                     
              
                
                  |
                  Improve this Doc
                
                
                  View Source
                
              
              
                Properties
              
                
              
              
              
              
              
              HasLayout
              
              
              
              
              
                public bool HasLayout { get; }
               
              
              Property Value
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.Boolean | 
                     | 
                  
                
              
              
              
              
              
              
              Layout
              
              
              
              
              
                public ParameterCollectionLayout Layout { get; }
               
              
              Property Value
              
              
              
              
              
              
              ParameterKeyInfos
              
              
              
              
              
                public FastList<ParameterKeyInfo> ParameterKeyInfos { get; }
               
              
              Property Value
              
                     
              
                
                  |
                  Improve this Doc
                
                
                  View Source
                
              
              
                Methods
              
                
              
              
              
              
              
              Clear()
              
              Clears the collection, including the layout.
 
              
              
              
              
              
              
              
              
              
              ContainsKey(ParameterKey)
              
              Determines whether current collection contains a value for this key.
 
              
              
              
                public bool ContainsKey(ParameterKey key)
               
              
              Parameters
              
              Returns
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.Boolean | 
                     | 
                  
                
              
              
              
              
              
              
              CopyTo<T>(ValueParameterKey<T>, ParameterCollection, ValueParameterKey<T>)
              
              
              
              
              
                public void CopyTo<T>(ValueParameterKey<T> key, ParameterCollection destination, ValueParameterKey<T> destinationKey)
    where T : struct
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              Get<T>(ObjectParameterAccessor<T>)
              
              
              
              
              
                public T Get<T>(ObjectParameterAccessor<T> parameterAccessor)
               
              
              Parameters
              
              Returns
              
              Type Parameters
              
              
              
              
              
              
              Get<T>(ObjectParameterKey<T>, Boolean)
              
              
              
              
              
                public T Get<T>(ObjectParameterKey<T> parameter, bool createIfNew = false)
               
              
              Parameters
              
              Returns
              
              Type Parameters
              
              
              
              
              
              
              Get<T>(PermutationParameter<T>)
              
              
              
              
              
                public T Get<T>(PermutationParameter<T> parameter)
               
              
              Parameters
              
              Returns
              
              Type Parameters
              
              
              
              
              
              
              Get<T>(PermutationParameterKey<T>, Boolean)
              
              
              
              
              
                public T Get<T>(PermutationParameterKey<T> parameter, bool createIfNew = false)
               
              
              Parameters
              
              Returns
              
              Type Parameters
              
              
              
              
              
              
              Get<T>(ValueParameter<T>)
              
              
              
              
              
                public T Get<T>(ValueParameter<T> parameter)
    where T : struct
               
              
              Parameters
              
              Returns
              
              Type Parameters
              
              
              
              
              
              
              Get<T>(ValueParameterKey<T>)
              
              
              
              
              
                public T Get<T>(ValueParameterKey<T> parameter)
    where T : struct
               
              
              Parameters
              
              Returns
              
              Type Parameters
              
              
              
              
              
              
              GetAccessor<T>(ObjectParameterKey<T>, Boolean)
              
              Gets an accessor to get and set objects more quickly.
 
              
              
              
                public ObjectParameterAccessor<T> GetAccessor<T>(ObjectParameterKey<T> parameterKey, bool createIfNew = true)
               
              
              Parameters
              
              Returns
              
              Type Parameters
              
              
              
              
              
              
              GetAccessor<T>(PermutationParameterKey<T>, Boolean)
              
              Gets an accessor to get and set permutations more quickly.
 
              
              
              
                public PermutationParameter<T> GetAccessor<T>(PermutationParameterKey<T> parameterKey, bool createIfNew = true)
               
              
              Parameters
              
              Returns
              
              Type Parameters
              
              
              
              
              
              
              GetAccessor<T>(ValueParameterKey<T>, Int32)
              
              Gets an accessor to get and set blittable values more quickly.
 
              
              
              
                public ValueParameter<T> GetAccessor<T>(ValueParameterKey<T> parameterKey, int elementCount = 1)
    where T : struct
               
              
              Parameters
              
              Returns
              
              Type Parameters
              
              
              
              
              
              
              GetObject(ParameterKey)
              
              
              
              
              
                public object GetObject(ParameterKey key)
               
              
              Parameters
              
              Returns
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.Object | 
                     | 
                  
                
              
              
              
              
              
              
              GetObjectParameterHelper(ParameterKey, Boolean)
              
              
              
              
              
                protected ParameterCollection.Accessor GetObjectParameterHelper(ParameterKey parameterKey, bool createIfNew = true)
               
              
              Parameters
              
                
                  
                    | Type | 
                    Name | 
                    Description | 
                  
                
                
                  
                    | ParameterKey | 
                    parameterKey | 
                     | 
                  
                  
                    | System.Boolean | 
                    createIfNew | 
                     | 
                  
                
              
              Returns
              
              
              
              
              
              
              GetValues<T>(ValueParameterKey<T>)
              
              
              
              
              
                public T[] GetValues<T>(ValueParameterKey<T> key)
    where T : struct
               
              
              Parameters
              
              Returns
              
              Type Parameters
              
              
              
              
              
              
              Remove(ParameterKey)
              
              
              
              
              
                public bool Remove(ParameterKey key)
               
              
              Parameters
              
              Returns
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.Boolean | 
                     | 
                  
                
              
              
              
              
              
              
              Set<T>(ObjectParameterAccessor<T>, T)
              
              
              
              
              
                public void Set<T>(ObjectParameterAccessor<T> parameterAccessor, T value)
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              Set<T>(ObjectParameterKey<T>, T)
              
              
              
              
              
                public void Set<T>(ObjectParameterKey<T> parameter, T value)
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              Set<T>(PermutationParameter<T>, T)
              
              
              
              
              
                public void Set<T>(PermutationParameter<T> parameter, T value)
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              Set<T>(PermutationParameterKey<T>, T)
              
              
              
              
              
                public void Set<T>(PermutationParameterKey<T> parameter, T value)
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              Set<T>(ValueParameter<T>, T)
              
              
              
              
              
                public void Set<T>(ValueParameter<T> parameter, T value)
    where T : struct
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              Set<T>(ValueParameter<T>, ref T)
              
              
              
              
              
                public void Set<T>(ValueParameter<T> parameter, ref T value)
    where T : struct
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              Set<T>(ValueParameter<T>, Int32, ref T)
              
              
              
              
              
                public void Set<T>(ValueParameter<T> parameter, int count, ref T firstValue)
    where T : struct
               
              
              Parameters
              
                
                  
                    | Type | 
                    Name | 
                    Description | 
                  
                
                
                  
                    | ValueParameter<T> | 
                    parameter | 
                     | 
                  
                  
                    | System.Int32 | 
                    count | 
                     | 
                  
                  
                    | T | 
                    firstValue | 
                     | 
                  
                
              
              Type Parameters
              
              
              
              
              
              
              Set<T>(ValueParameterKey<T>, T)
              
              
              
              
              
                public void Set<T>(ValueParameterKey<T> parameter, T value)
    where T : struct
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              Set<T>(ValueParameterKey<T>, ref T)
              
              
              
              
              
                public void Set<T>(ValueParameterKey<T> parameter, ref T value)
    where T : struct
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              Set<T>(ValueParameterKey<T>, T[])
              
              
              
              
              
                public void Set<T>(ValueParameterKey<T> parameter, T[] values)
    where T : struct
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              Set<T>(ValueParameterKey<T>, Int32, ref T)
              
              
              
              
              
                public void Set<T>(ValueParameterKey<T> parameter, int count, ref T firstValue)
    where T : struct
               
              
              Parameters
              
              Type Parameters
              
              
              
              
              
              
              SetObject(ParameterKey, Object)
              
              
              
              
              
                public void SetObject(ParameterKey key, object value)
               
              
              Parameters
              
              
              
              
              
              
              ToString()
              
              
              
              
              
                public override string ToString()
               
              
              Returns
              
                
                  
                    | Type | 
                    Description | 
                  
                
                
                  
                    | System.String | 
                     | 
                  
                
              
              Overrides
              System.Object.ToString()
              
              
              
              
              
              UpdateLayout(ParameterCollectionLayout)
              
              Reorganizes internal data and resources to match the given objects, and append extra values at the end.
 
              
              
              
                public void UpdateLayout(ParameterCollectionLayout collectionLayout)
               
              
              Parameters
              
              
              
 
              
               
              
              
              
              
              Extension Methods