Class ModelMeshGroups
Namespace: ValveResourceFormat.ResourceTypes.ModelData
Assembly: ValveResourceFormat.dll
Describes a model's mesh groups: which groups exist, which meshes belong to each, which are on by default, and which the tools hide. A mesh group mask has bit N set when the mesh is in group N.
public sealed class ModelMeshGroupsInheritance
Constructors
ModelMeshGroups(KVObject)
Initializes mesh group info from a compiled model's data block.
public ModelMeshGroups(KVObject data)Parameters
data KVObject
Properties
BodyGroups
Gets the body groups the mesh group names encode. A name of the form group_@choice declares one choice; a name without the separator belongs to no body group. Groups and their choices keep the order their mesh groups were declared in.
public IReadOnlyList<BodyGroup> BodyGroups { get; }Property Value
Defaults
Gets the group names that are on by default.
public IEnumerable<string> Defaults { get; }Property Value
Names
Gets the mesh group names, in declaration order. Index N is bit N of a mesh's mask.
public IReadOnlyList<string> Names { get; }Property Value
Methods
GetMeshMask(int)
Gets the group mask of a mesh, zero when the mesh has no entry.
public ulong GetMeshMask(int meshIndex)Parameters
meshIndex int
Returns
IndexOf(string)
Gets the index of a group name, or -1 when the model declares no such group.
public int IndexOf(string groupName)Parameters
groupName string
Returns
IsHiddenInTools(string)
Determines whether a body group or one of its choices is hidden in the tools. Choices are listed by their full mesh group name.
public bool IsHiddenInTools(string name)Parameters
name string
Returns
IsMeshInAnyGroup(int, ICollection<string>)
Determines whether a mesh belongs to any of the named groups. Always true for a model that declares no groups.
public bool IsMeshInAnyGroup(int meshIndex, ICollection<string> groupNames)Parameters
meshIndex int
groupNames ICollection<string>
Returns
IsMeshInGroup(int, int)
Determines whether a mesh belongs to the group at groupIndex.
public bool IsMeshInGroup(int meshIndex, int groupIndex)Parameters
meshIndex int
groupIndex int

