Class PhysicsTriangleMatcher
Namespace: ValveResourceFormat.IO
Assembly: ValveResourceFormat.dll
Finds physics triangles already covered by render geometry so they can be deleted, since reconstructed solid render meshes regenerate them.
public class PhysicsTriangleMatcherInheritance
object ← PhysicsTriangleMatcher
Constructors
PhysicsTriangleMatcher(MeshDescriptor[])
Initializes a new instance of the PhysicsTriangleMatcher class.
public PhysicsTriangleMatcher(MeshDescriptor[] meshes)Parameters
meshes MeshDescriptor[]
Properties
PhysicsMeshes
Gets the list of physics meshes.
public List<PhysicsTriangleMatcher.PhysMeshData> PhysicsMeshes { get; }Property Value
List<PhysicsTriangleMatcher.PhysMeshData>
Methods
GetDeletedTriangles(MeshDescriptor)
Gets the covered triangles of a physics mesh, or null when the mesh was not given to this matcher.
public HashSet<int>? GetDeletedTriangles(MeshDescriptor mesh)Parameters
mesh MeshDescriptor
Returns
HashSet<int>?
MarkTrianglesCoveredBy(ReadOnlySpan<Vector3>, ReadOnlySpan<int>, IProgress<string>?)
Marks the physics triangles the given render triangles cover.
public void MarkTrianglesCoveredBy(ReadOnlySpan<Vector3> positions, ReadOnlySpan<int> indices, IProgress<string>? progressReporter)Parameters
positions ReadOnlySpan<Vector3>
Render mesh positions, in world space.
indices ReadOnlySpan<int>
Three position indices per render triangle.
progressReporter IProgress<string>?
Receives a message with the number of covered triangles, in debug builds.

