API Reference · Materials and textures

AppearanceParameter

Namespace: Ava3D

public sealed class AppearanceParameter

One thing about a model a caller may adjust, with enough about it to build a control without knowing what the model is.

The two kinds are not the same shape and the type does not pretend they are: a AppearanceKind.Shape parameter has a range and a AppearanceParameter.Value, and a AppearanceKind.Color parameter has a AppearanceParameter.Material. Both are here so that one walk over GltfModel.Appearance produces the whole panel — which is the point, and is what stops a demo scene from hardcoding the names a particular file happens to use.

Properties

MemberDescription
float Default { get; }

What the file authored. Shape parameters only.

Vector4 DefaultColor { get; }

The base colour the file authored, for a AppearanceKind.Color parameter.

AppearanceKind Kind { get; }

Which kind of parameter this is, and therefore which members mean anything.

Material Material { get; }

The material behind a AppearanceKind.Color parameter, or null.

float Maximum { get; }

Highest useful value, always 1. Shape parameters only.

float Minimum { get; }

Lowest useful value. −1 for a detected pair, 0 otherwise. Shape parameters only.

string Name { get; }

What to label the control. A detected pair reads as "eye size"; anything else keeps the file's own name.

float Value { get; set; }

The current value of a AppearanceKind.Shape parameter. Zero for the other kind.

Not clamped to AppearanceParameter.Minimum and AppearanceParameter.Maximum — see the note on AppearanceParameter.Maximum for why, and for what going below a lone target's zero looks like.

Methods

MemberDescription
void Reset()

Puts this parameter back to what the file said.

See also