sealed class
|
MaterialKeys
|
implements
|
IConfigurable
|
The configurator object for this type.
public
static
property
|
Config
{
get
}
|
||
type
|
IConfigurator<MaterialKeys>
|
||
value
|
|
The configurator object. |
The default material token to use if no material keys match.
public
property
|
DefaultMaterial
{
get
}
|
||
type
|
int64
|
||
value
|
The default material token. |
Remarks:
Defaults
to
material
0
.
Creates a new instance of MaterialKeys that uses distinct color keys for each material.
public
static
method
|
Distinct
()
|
||
type
|
MaterialKeys
|
||
returns
|
|
The material keys. |
See also:
Colors.DistinctCreates a new instance of MaterialKeys.
public
constructor
|
MaterialKeys
(int64 defaultMaterial = 0)
|
||
params
|
defaultMaterial
|
The
default
material.
Defaults
to
0 . |
Add a material key.
public
method
|
Add
(MaterialKey materialKey)
|
||
type
|
MaterialKeys
|
||
params
|
materialKey
|
The material key. | |
returns
|
|
this |
Returns the color key of the given material.
public
method
|
ToColor
(int64 token)
|
||
type
|
int64
|
||
params
|
token
|
The material token. | |
returns
|
The color key. |
Returns the configuration value that describes this object.
public
method
|
ToConfig
()
|
||
type
|
ConfigValue
|
||
returns
|
|
The configuration value. | |
implements
|
IConfigurable.ToConfig
|
Remarks:
All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.
The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.
Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.
Returns the material token for the given color key.
public
method
|
ToMaterial
(int64 color)
|
||
type
|
int64
|
||
params
|
color
|
The color key. | |
returns
|
The material token. |