Files
sbox-public/engine/Definitions/hammer/MapDoc/Nodes/MapMesh.def
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

26 lines
964 B
Modula-2

#include "mapdoclib/mapmesh.h"
[Handle:Editor.MapDoc.MapMesh]
native class CMapMesh as NativeMapDoc.CMapMesh : CMapNode
{
void AssignMaterialToMesh( string materialName );
//
// Gluey, just passes down to the CHammerPolyMesh really.
//
void ConstructFromData( int numVerticies, CastTo[Vector*] void* vertexPositions, CastTo[Vector2D*] void* vertexTexCoords, int numIndices, CastTo[int*] void* vertexIndices, int numFaces, CastTo[int*] void* faceVertexCounts, CastTo[HMaterialStrong**] void* faceMaterialsPtr, bool mergeVertices, float vertexMergeTolerance );
inline void GetFaceMaterials( CUtlVectorString materials )
{
CHammerPolyMesh &mesh = this->GetMesh();
for ( CHammerPolyMesh::FaceHandle_t hFace = mesh.GetFirstFace(); hFace != mesh.InvalidFace(); hFace = mesh.GetNextFace( hFace ) )
{
const char *pName = mesh.GetFaceMaterialName( hFace );
if ( pName )
{
materials->AddToTail( pName );
}
}
}
}