using System; using System.Collections.Generic; namespace libsecondlife { /// /// A single visual characteristic of an avatar mesh, such as eyebrow height /// public struct VisualParam { /// Index of this visual param public int ParamID; /// Internal name public string Name; /// Group ID this parameter belongs to public int Group; /// Name of the wearable this parameter belongs to public string Wearable; /// Displayable label of this characteristic public string Label; /// Displayable label for the minimum value of this characteristic public string LabelMin; /// Displayable label for the maximum value of this characteristic public string LabelMax; /// Default value public float DefaultValue; /// Minimum value public float MinValue; /// Maximum value public float MaxValue; /// /// Set all the values through the constructor /// /// Index of this visual param /// Internal name /// /// /// Displayable label of this characteristic /// Displayable label for the minimum value of this characteristic /// Displayable label for the maximum value of this characteristic /// Default value /// Minimum value /// Maximum value public VisualParam(int paramID, string name, int group, string wearable, string label, string labelMin, string labelMax, float def, float min, float max) { ParamID = paramID; Name = name; Group = group; Wearable = wearable; Label = label; LabelMin = labelMin; LabelMax = labelMax; DefaultValue = def; MaxValue = max; MinValue = min; } } /// /// Holds the Params array of all the avatar appearance parameters /// public static class VisualParams { public static VisualParam Find(string name, string wearable) { foreach (KeyValuePair param in Params) if (param.Value.Name == name && param.Value.Wearable == wearable) return param.Value; return new VisualParam(); } public static SortedList Params = new SortedList(); static VisualParams() {