Table of Contents

Class Mesh

Namespace
ValveResourceFormat.ResourceTypes
Assembly
ValveResourceFormat.dll

Represents a mesh resource containing geometry and vertex buffer data.

public class Mesh : KeyValuesOrNTRO

Inheritance

Inherited Members

Extension Methods

Constructors

Mesh(BlockType)

Initializes a new instance of the ValveResourceFormat.ResourceTypes.Mesh 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

Vector3

MinBounds

Gets the minimum bounds of the mesh.

public Vector3 MinBounds { get; }

Property Value

Vector3

MorphData

Gets or sets the morph data for this mesh.

public Morph MorphData { get; set; }

Property Value

Morph

Name

Gets or sets the mesh name.

public string Name { get; set; }

Property Value

string

VBIB

Gets or sets the mesh's vertex/index buffer block (VBIB).

public VBIB VBIB { get; set; }

Property Value

VBIB

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

bool

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

bool

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

bool

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

bool

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.