Table of Contents

Class ParameterCollection

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).

[DataSerializer(typeof(ParameterCollection.Serializer))]
[DataSerializerGlobal(null, typeof(FastList<ParameterKeyInfo>), DataSerializerGenericMode.None, false, false)]
public class ParameterCollection
Inheritance
ParameterCollection
Derived
Extension Methods

Constructors

ParameterCollection()

public ParameterCollection()

ParameterCollection(ParameterCollection)

public ParameterCollection(ParameterCollection parameterCollection)

Parameters

parameterCollection ParameterCollection

Fields

DataValues

public byte[] DataValues

Field Value

byte[]

LayoutCounter

public int LayoutCounter

Field Value

int

ObjectValues

public object[] ObjectValues

Field Value

object[]

PermutationCounter

public int PermutationCounter

Field Value

int

Properties

HasLayout

public bool HasLayout { get; }

Property Value

bool

Layout

public ParameterCollectionLayout Layout { get; }

Property Value

ParameterCollectionLayout

ParameterKeyInfos

public FastList<ParameterKeyInfo> ParameterKeyInfos { get; }

Property Value

FastList<ParameterKeyInfo>

Methods

Clear()

Clears the collection, including the layout.

public void Clear()

ContainsKey(ParameterKey)

Determines whether current collection contains a value for this key.

public bool ContainsKey(ParameterKey key)

Parameters

key ParameterKey

Returns

bool

CopyTo<T>(ValueParameterKey<T>, ParameterCollection, ValueParameterKey<T>)

Copies all blittable values of a given key to the specified ParameterCollection.

public void CopyTo<T>(ValueParameterKey<T> key, ParameterCollection destination, ValueParameterKey<T> destinationKey) where T : struct

Parameters

key ValueParameterKey<T>

The key for the values to copy.

destination ParameterCollection

The collection to copy the values to.

destinationKey ValueParameterKey<T>

The key for the values of the destination collection.

Type Parameters

T

GetAccessor<T>(ObjectParameterKey<T>, bool)

Gets an accessor to get and set objects more quickly.

public ObjectParameterAccessor<T> GetAccessor<T>(ObjectParameterKey<T> parameterKey, bool createIfNew = true)

Parameters

parameterKey ObjectParameterKey<T>
createIfNew bool

Returns

ObjectParameterAccessor<T>

Type Parameters

T

GetAccessor<T>(PermutationParameterKey<T>, bool)

Gets an accessor to get and set permutations more quickly.

public PermutationParameter<T> GetAccessor<T>(PermutationParameterKey<T> parameterKey, bool createIfNew = true)

Parameters

parameterKey PermutationParameterKey<T>
createIfNew bool

Returns

PermutationParameter<T>

Type Parameters

T

GetAccessor<T>(ValueParameterKey<T>, int)

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

parameterKey ValueParameterKey<T>
elementCount int

Returns

ValueParameter<T>

Type Parameters

T

GetObject(ParameterKey)

public object GetObject(ParameterKey key)

Parameters

key ParameterKey

Returns

object

GetObjectParameterHelper(ParameterKey, bool)

protected ParameterCollection.Accessor GetObjectParameterHelper(ParameterKey parameterKey, bool createIfNew = true)

Parameters

parameterKey ParameterKey
createIfNew bool

Returns

ParameterCollection.Accessor

GetValues<T>(ValueParameterKey<T>)

Gets blittable values.

public T[] GetValues<T>(ValueParameterKey<T> key) where T : struct

Parameters

key ValueParameterKey<T>

Returns

T[]

Type Parameters

T

Get<T>(ObjectParameterAccessor<T>)

Gets an object.

public T Get<T>(ObjectParameterAccessor<T> parameterAccessor)

Parameters

parameterAccessor ObjectParameterAccessor<T>

Returns

T

Type Parameters

T

Get<T>(ObjectParameterKey<T>, bool)

Gets an object.

public T Get<T>(ObjectParameterKey<T> parameter, bool createIfNew = false)

Parameters

parameter ObjectParameterKey<T>
createIfNew bool

Returns

T

Type Parameters

T

Get<T>(PermutationParameterKey<T>, bool)

Gets a permutation.

public T Get<T>(PermutationParameterKey<T> parameter, bool createIfNew = false)

Parameters

parameter PermutationParameterKey<T>
createIfNew bool

Returns

T

Type Parameters

T

Get<T>(PermutationParameter<T>)

Gets a permutation.

public T Get<T>(PermutationParameter<T> parameter)

Parameters

parameter PermutationParameter<T>

Returns

T

Type Parameters

T

Get<T>(ValueParameterKey<T>)

Gets a blittable value.

public T Get<T>(ValueParameterKey<T> parameter) where T : struct

Parameters

parameter ValueParameterKey<T>

Returns

T

Type Parameters

T

Get<T>(ValueParameter<T>)

Gets a value.

public T Get<T>(ValueParameter<T> parameter) where T : struct

Parameters

parameter ValueParameter<T>

Returns

T

Type Parameters

T

Remove(ParameterKey)

public bool Remove(ParameterKey key)

Parameters

key ParameterKey

Returns

bool

SetObject(ParameterKey, object)

public void SetObject(ParameterKey key, object value)

Parameters

key ParameterKey
value object

Set<T>(ObjectParameterAccessor<T>, T)

Sets an object.

public void Set<T>(ObjectParameterAccessor<T> parameterAccessor, T value)

Parameters

parameterAccessor ObjectParameterAccessor<T>
value T

Type Parameters

T

Set<T>(ObjectParameterKey<T>, T)

Sets an object.

public void Set<T>(ObjectParameterKey<T> parameter, T value)

Parameters

parameter ObjectParameterKey<T>
value T

Type Parameters

T

Set<T>(PermutationParameterKey<T>, T)

Sets a permutation.

public void Set<T>(PermutationParameterKey<T> parameter, T value)

Parameters

parameter PermutationParameterKey<T>
value T

Type Parameters

T

Set<T>(PermutationParameter<T>, T)

Sets a permutation.

public void Set<T>(PermutationParameter<T> parameter, T value)

Parameters

parameter PermutationParameter<T>
value T

Type Parameters

T

Set<T>(ValueParameterKey<T>, int, ref T)

Sets blittable values.

public void Set<T>(ValueParameterKey<T> parameter, int count, ref T firstValue) where T : struct

Parameters

parameter ValueParameterKey<T>
count int
firstValue T

Type Parameters

T

Set<T>(ValueParameterKey<T>, T)

Sets a blittable value.

public void Set<T>(ValueParameterKey<T> parameter, T value) where T : struct

Parameters

parameter ValueParameterKey<T>
value T

Type Parameters

T

Set<T>(ValueParameterKey<T>, ref T)

Sets a blittable value.

public void Set<T>(ValueParameterKey<T> parameter, ref T value) where T : struct

Parameters

parameter ValueParameterKey<T>
value T

Type Parameters

T

Set<T>(ValueParameterKey<T>, T[])

Sets blittable values.

public void Set<T>(ValueParameterKey<T> parameter, T[] values) where T : struct

Parameters

parameter ValueParameterKey<T>
values T[]

Type Parameters

T

Set<T>(ValueParameter<T>, int, ref T)

Sets blittable values.

public void Set<T>(ValueParameter<T> parameter, int count, ref T firstValue) where T : struct

Parameters

parameter ValueParameter<T>
count int
firstValue T

Type Parameters

T

Set<T>(ValueParameter<T>, T)

Sets a blittable value.

public void Set<T>(ValueParameter<T> parameter, T value) where T : struct

Parameters

parameter ValueParameter<T>
value T

Type Parameters

T

Set<T>(ValueParameter<T>, ref T)

Sets a blittable value.

public void Set<T>(ValueParameter<T> parameter, ref T value) where T : struct

Parameters

parameter ValueParameter<T>
value T

Type Parameters

T

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

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

collectionLayout ParameterCollectionLayout