MaterialPart

Description

abstract class Tinman.Engine.Models.MaterialPart<T val>

Derived from

MaterialPartBase abstract
IMaterialPart<T>

Represents a material part, for example base color or roughness.

Public / Methods

Copy


public method Copy → (1)

other in : IMaterialPart<T>

[not-null]
The material part from which to copy the values.

Copies all material parts values from the given part to this one.

Set


public method Set → (4)

value in : T

See Value.

map opt : IModelTexture = null

See Map.

channel opt : int32 = 0

See Channel.

flags opt : MaterialFlags = MaterialFlags.None

See Flags.

Sets the properties of this material part.

Public / Attributes

Channel


public attribute Channel → (get,set)

value : int32

The texture channel to use:
0 : red
1 : green
2 : blue
3 : alpha
Will be -1 iff this is a multi-channel material part.

The texture channel to use for single-channel material parts.

This property is ignored for the multi-channel material parts: IMaterial.BaseColor, IMaterial.Emissive, IMaterial.Normal, IMaterial.Reflectivity and IMaterial.Translucency. Defaults to 0, i.e. the red channel.

Flags


public attribute Flags → (get,set)

value : MaterialFlags

The material texture flags.

The texture flags of this material part.

Defaults to MaterialFlags.None.

Map


public attribute Map → (get,set)

value : IModelTexture

The model texture or null.

The texture map of this material part.

Defaults to null.

Value


public attribute Value → (get,set)

value : T

The factor value.

The base value of this material part.

Protected / Methods

Value​Clamp


[Pure]
protected abstract method ValueClamp → (1)

value in : T

The value.

returns → T

The clamped value.

Clamps the given value to the valid range.

Value​Equals


[Pure]
protected abstract method ValueEquals → (2)

valueA in : T

The first value.

valueB in : T

The second value.

returns → bool

true if the values are equal,
false if they are not.

Compares the given values for equality.

Value​Hash​Code


[Pure]
protected abstract method ValueHashCode → (1)

value in : T

The value.

returns → int32

The hash code.

Computes the hash code of the given value.