Table of Contents

Struct Mesh

Namespace
ValveResourceFormat.ResourceTypes.RubikonPhysics.Shapes
Assembly
ValveResourceFormat.dll

Represents a mesh shape.

public readonly struct Mesh

Inherited Members

Constructors

Mesh(KVObject)

Initializes a new instance of the ValveResourceFormat.ResourceTypes.RubikonPhysics.Shapes.Mesh struct.

public Mesh(KVObject data)

Parameters

data KVObject

Properties

Data

Gets the raw data.

public KVObject Data { get; }

Property Value

KVObject

Materials

Per triangle index to surface properties. Can be empty if the whole mesh has the same material.

public int[] Materials { get; }

Property Value

int[]

Max

Gets the maximum bounds.

public Vector3 Max { get; }

Property Value

Vector3

Min

Gets the minimum bounds.

public Vector3 Min { get; }

Property Value

Vector3

OrthographicAreas

Fraction 0..1 of coverage along YZ,ZX,XY sides of AABB

public Vector3 OrthographicAreas { get; }

Property Value

Vector3

Methods

GetTriangles()

The mesh triangles with additional topology information similar to the half-edge data structure.

public ReadOnlySpan<Mesh.Triangle> GetTriangles()

Returns

ReadOnlySpan<Mesh.Triangle>

GetVertices()

The mesh vertices in the space of the parent shape.

public ReadOnlySpan<Vector3> GetVertices()

Returns

ReadOnlySpan<Vector3>

ParseNodes()

The nodes of the loose kd-tree to accelerate ray casts and volume queries against this mesh.

public ReadOnlySpan<Mesh.Node> ParseNodes()

Returns

ReadOnlySpan<Mesh.Node>