API ReferenceEditor.MapDoc

MapMeshclass

MapMesh is the Hammer map node which represents editable mesh geometry in a Hammer map. This is the map node that is created when using the hammer geometry editing tools.

object→MapNode→MapMesh
Namespace
Editor.MapDoc
Assembly
Sandbox.Tools
Declaration
public class Editor.MapDoc.MapMesh : Editor.MapDoc.MapNode

Constructors1

Showing 1 constructors

Methods5

Showing 5 methods

public void ConstructFromPolygons(Editor.MeshEditor.PrimitiveBuilder.PolygonMesh mesh)PUBLIC

Constructs the mesh from the given `Editor.MeshEditor.PrimitiveBuilder.PolygonMesh` builder.

ParameterTypeDescription
meshPolygonMesh—
Returns:void—

public System.Collections.Generic.IEnumerable`1<Editor.Asset> GetFaceMaterialAssets()PUBLIC

Get all material assets used on this mesh

Returns:IEnumerable<Asset>—

public System.Collections.Generic.IReadOnlyList`1<Editor.MapDoc.MapMeshFace> GetFaces()PUBLIC

Every face of the mesh, in world space. A face's `Editor.MapDoc.MapMeshFace.Index` stays valid until the mesh's topology changes, for `Editor.MapDoc.MapMesh.SetFaceMaterial(System.Collections.Generic.IEnumerable,Sandbox.Material)`.

Returns:IReadOnlyList<MapMeshFace>—

public void SetFaceMaterial(System.Collections.Generic.IEnumerable`1<int> faceIndices, Sandbox.Material material)PUBLIC

ParameterTypeDescription
faceIndicesIEnumerable<int>—
materialMaterial—
Returns:void—

public void SetMaterial(Sandbox.Material material)PUBLIC

Assigns the specified material to the entire mesh

ParameterTypeDescription
materialMaterial—
Returns:void—

Properties1

Showing 1 properties

public BBox Editor.MapDoc.MapMesh.Bounds { get; set; }PUBLICGETSET

The world space bounds of the mesh's vertices.

Returns:BBox—

On this page