Class Morph
Namespace: ValveResourceFormat.ResourceTypes
Assembly: ValveResourceFormat.dll
Represents a morph (flex) resource containing vertex deformation data.
public class Morph : KeyValuesOrNTROInheritance
object ← Block ← KeyValuesOrNTRO ← Morph
Inherited Members
KeyValuesOrNTRO.Type, KeyValuesOrNTRO.Data, KeyValuesOrNTRO.Read(BinaryReader), KeyValuesOrNTRO.Serialize(Stream), KeyValuesOrNTRO.WriteText(IndentedTextWriter), Block.Type, Block.Offset, Block.Size, Block.Resource, Block.Read(BinaryReader), Block.ToString(), Block.WriteText(IndentedTextWriter), Block.Serialize(Stream)
Extension Methods
ResourceDataExtensions.AsKeyValueCollection(Block)
Constructors
Morph(BlockType)
Initializes a new instance of the class.
public Morph(BlockType type)Parameters
type BlockType
Properties
FlexControllers
Gets the flex controllers that drive morph animations.
public FlexController[] FlexControllers { get; }Property Value
FlexRules
Gets the flex rules that define how controllers affect morphs.
public FlexRule[] FlexRules { get; }Property Value
FlexRule[]
Texture
Gets the texture containing encoded morph deltas.
public Texture? Texture { get; }Property Value
TextureResource
Gets the resource containing the morph texture.
public Resource? TextureResource { get; }Property Value
Methods
GetFlexDescriptors()
Gets the list of flex descriptors.
public List<string> GetFlexDescriptors()Returns
GetFlexVertexData()
Gets the flex vertex data as a dictionary mapping flex names to vertex positions.
public Dictionary<string, Vector3[]> GetFlexVertexData()Returns
Dictionary<string, Vector3[]>
GetMorphCount()
Gets the number of morphs.
public int GetMorphCount()Returns
GetMorphDatas()
Gets the morph data collection.
public IReadOnlyList<KVObject> GetMorphDatas()Returns
IReadOnlyList<KVObject>
LoadFlexData(IFileLoader)
Loads flex data from the file loader.
public void LoadFlexData(IFileLoader fileLoader)Parameters
fileLoader IFileLoader

