Class Mesh
Namespace: ValveResourceFormat.ResourceTypes
Assembly: ValveResourceFormat.dll
Represents a mesh resource containing geometry and vertex buffer data.
public class Mesh : KeyValuesOrNTROInheritance
object ← Block ← KeyValuesOrNTRO ← Mesh
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
Mesh(BlockType)
Initializes a new instance of the class.
public Mesh(BlockType type)Parameters
type BlockType
The block type.
Properties
Attachments
Gets the attachments associated with this mesh.
public Dictionary<string, Attachment> Attachments { get; init; }Property Value
Dictionary<string, Attachment>
HitboxSets
Gets the hitbox sets associated with this mesh.
public Dictionary<string, Hitbox[]> HitboxSets { get; init; }Property Value
Dictionary<string, Hitbox[]>
MaxBounds
Gets the maximum bounds of the mesh.
public Vector3 MaxBounds { get; }Property Value
MinBounds
Gets the minimum bounds of the mesh.
public Vector3 MinBounds { get; }Property Value
MorphData
Gets or sets the morph data for this mesh.
public Morph? MorphData { get; set; }Property Value
Name
Gets or sets the mesh name.
public string Name { get; set; }Property Value
VBIB
Gets or sets the mesh's vertex/index buffer block (VBIB).
public VBIB VBIB { get; set; }Property Value
Methods
GetBounds()
Calculates and sets the bounding box from scene objects.
public void GetBounds()HasBakedLightingFromLightMap(KVObject)
Determines if the draw call has baked lighting from lightmap.
public static bool HasBakedLightingFromLightMap(KVObject drawCall)Parameters
drawCall KVObject
The draw call data.
Returns
True if baked lighting from lightmap is present.
HasBakedLightingFromVertexStream(KVObject)
Determines if the draw call has baked lighting from vertex stream.
public static bool HasBakedLightingFromVertexStream(KVObject drawCall)Parameters
drawCall KVObject
The draw call data.
Returns
True if baked lighting from vertex stream is present.
IsCompressedNormalTangent(KVObject)
Determines if compressed normal tangent is enabled for the draw call.
public static bool IsCompressedNormalTangent(KVObject drawCall)Parameters
drawCall KVObject
The draw call data.
Returns
True if compressed normal tangent is used.
IsOccluder(KVObject)
Determines if the draw call is an occluder.
public static bool IsOccluder(KVObject drawCall)Parameters
drawCall KVObject
The draw call data.
Returns
True if the draw call is an occluder.
LoadExternalMorphData(IFileLoader)
Loads external morph data from the file loader.
public void LoadExternalMorphData(IFileLoader fileLoader)Parameters
fileLoader IFileLoader
The file loader to use.
Read(BinaryReader)
Reads the block data from a binary reader.
public override void Read(BinaryReader reader)Parameters
reader BinaryReader
The binary reader to read from.

