PolygonMeshclass

An editable mesh made up of polygons, triangulated into a model

objectPolygonMesh
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.PolygonMesh

Constructors1

Showing 1 constructors

public PolygonMesh()PUBLICCONSTRUCTOR

Methods154

Showing 154 methods

public void ApplyTransform(Transform transform)PUBLIC

Transform all the vertices

ParameterTypeDescription
transformTransform
Returns:void

public void AssignMaterialToFaces(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> faces, Sandbox.Material material)PUBLIC

ParameterTypeDescription
facesIEnumerable<FaceHandle>
materialMaterial
Returns:void

public void AverageEdgeUVs(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges)PUBLIC

ParameterTypeDescription
edgesIReadOnlyList<HalfEdgeHandle>
Returns:void

public void AverageVertexUVs(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.VertexHandle> vertices)PUBLIC

ParameterTypeDescription
verticesIReadOnlyList<VertexHandle>
Returns:void

public bool BevelEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, Sandbox.PolygonMesh.BevelEdgesMode edgeRemoveMode, int numSegments, float distance, float shape, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outNewOuterEdges = null, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outNewInnerEdges = null, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outNewFaces = null, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outFacesNeedingUVs = null)PUBLIC

ParameterTypeDescription
edgesIReadOnlyList<HalfEdgeHandle>
edgeRemoveModeBevelEdgesMode
numSegmentsint
distancefloat
shapefloat
outNewOuterEdges = nullList<HalfEdgeHandle>
outNewInnerEdges = nullList<HalfEdgeHandle>
outNewFaces = nullList<FaceHandle>
outFacesNeedingUVs = nullList<FaceHandle>
Returns:bool

public bool BevelVertices(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.VertexHandle> vertices, float distance, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> newVertices)PUBLIC

ParameterTypeDescription
verticesIReadOnlyList<VertexHandle>
distancefloat
newVerticesList<VertexHandle>
Returns:bool

public bool BridgeEdgesInterpolated(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> fromEdges, System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> toEdges, Sandbox.PolygonMesh.BridgeInterpolationParameters parameters, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outEdgesCreated)PUBLIC

ParameterTypeDescription
fromEdgesIReadOnlyList<HalfEdgeHandle>
toEdgesIReadOnlyList<HalfEdgeHandle>
parametersBridgeInterpolationParameters
outEdgesCreatedList<HalfEdgeHandle>
Returns:bool

public void ClipFacesByPlaneAndCap(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, Sandbox.Plane planeInMeshSpace, bool removeFacesBehindPlane, bool attemptToCap, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outNewEdges = null, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outCapFaces = null)PUBLIC

ParameterTypeDescription
facesIReadOnlyList<FaceHandle>
planeInMeshSpacePlane
removeFacesBehindPlanebool
attemptToCapbool
outNewEdges = nullList<HalfEdgeHandle>
outCapFaces = nullList<FaceHandle>
Returns:void

public void CollapseEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges)PUBLIC

ParameterTypeDescription
edgesIReadOnlyList<HalfEdgeHandle>
Returns:void

public void CombineFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces)PUBLIC

ParameterTypeDescription
facesIReadOnlyList<FaceHandle>
Returns:void

public bool ConnectEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> newEdges)PUBLIC

ParameterTypeDescription
edgesIReadOnlyList<HalfEdgeHandle>
newEdgesList<HalfEdgeHandle>
Returns:bool

public bool CorrelateOpenEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeSetA, System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeSetB, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outA, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outB)PUBLIC

ParameterTypeDescription
edgeSetAIReadOnlyList<HalfEdgeHandle>
edgeSetBIReadOnlyList<HalfEdgeHandle>
outAList<HalfEdgeHandle>
outBList<HalfEdgeHandle>
Returns:bool

public HalfEdgeMesh.VertexHandle CreateEdgesConnectingVertexToPoint(HalfEdgeMesh.VertexHandle hStartVertex, Vector3 vTargetPosition, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> pOutEdgeList, bool pOutIsLastEdgeConnector, System.Collections.Generic.SortedSet`1<HalfEdgeMesh.HalfEdgeHandle> pEdgeTable)PUBLIC

ParameterTypeDescription
hStartVertexVertexHandle
vTargetPositionVector3
pOutEdgeListList<HalfEdgeHandle>
pOutIsLastEdgeConnectorbool
pEdgeTableSortedSet<HalfEdgeHandle>
Returns:VertexHandle

public bool CreateFaceInEdgeLoop(HalfEdgeMesh.HalfEdgeHandle hOpenEdge, HalfEdgeMesh.FaceHandle hNewFace)PUBLIC

Add a face filling in the open edge loop specified by the provided edge

ParameterTypeDescription
hOpenEdgeHalfEdgeHandle
hNewFaceFaceHandle
Returns:bool

public void DetachFaces(HalfEdgeMesh.FaceHandle[] faces, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> newFaces)PUBLIC

ParameterTypeDescription
facesFaceHandle[]
newFacesList<FaceHandle>
Returns:void

public bool ExtendEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, float amount, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> newEdges, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> newFaces)PUBLIC

ParameterTypeDescription
edgesIReadOnlyList<HalfEdgeHandle>
amountfloat
newEdgesList<HalfEdgeHandle>
newFacesList<FaceHandle>
Returns:bool

public bool ExtendOrExtrudeVertices(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.VertexHandle> vertices, float offset, float baseWidth, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> modifiedVertices, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> originalVertices, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> newFaces)PUBLIC

ParameterTypeDescription
verticesIReadOnlyList<VertexHandle>
offsetfloat
baseWidthfloat
modifiedVerticesList<VertexHandle>
originalVerticesList<VertexHandle>
newFacesList<FaceHandle>
Returns:bool

public void ExtrudeFaces(HalfEdgeMesh.FaceHandle[] faces, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> newFaces, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> connectingFaces, Vector3 offset = null)PUBLIC

ParameterTypeDescription
facesFaceHandle[]
newFacesList<FaceHandle>
connectingFacesList<FaceHandle>
offset = nullVector3
Returns:void

public HalfEdgeMesh.FaceHandle FaceHandleFromIndex(int index)PUBLIC

ParameterTypeDescription
indexint
Returns:FaceHandle

public void FindBoundaryEdgesConnectedToFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outBoundaryEdges)PUBLIC

ParameterTypeDescription
facesIReadOnlyList<FaceHandle>
outBoundaryEdgesList<HalfEdgeHandle>
Returns:void

public void FindClosedFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faceList, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outClosedFaces)PUBLIC

ParameterTypeDescription
faceListIReadOnlyList<FaceHandle>
outClosedFacesList<FaceHandle>
Returns:void

public void FindCornerVerticesForFace(HalfEdgeMesh.FaceHandle hFace, float minCornerAngle, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> outCornerVertices)PUBLIC

ParameterTypeDescription
hFaceFaceHandle
minCornerAnglefloat
outCornerVerticesList<VertexHandle>
Returns:void

public void FindEdgeIslands(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle>> outEdgeList)PUBLIC

ParameterTypeDescription
edgeListIReadOnlyList<HalfEdgeHandle>
outEdgeListList<List<HalfEdgeHandle>>
Returns:void

public void FindEdgeLoopForEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> originalEdges, HalfEdgeMesh.HalfEdgeHandle[] pOutEdgeLoopEdges)PUBLIC

ParameterTypeDescription
originalEdgesIReadOnlyList<HalfEdgeHandle>
pOutEdgeLoopEdgesHalfEdgeHandle[]
Returns:void

public int FindEdgeRibs(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle>> outLeftRibs, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle>> outRightRibs)PUBLIC

ParameterTypeDescription
edgesIReadOnlyList<HalfEdgeHandle>
outLeftRibsList<List<HalfEdgeHandle>>
outRightRibsList<List<HalfEdgeHandle>>
Returns:int

public void FindFaceIslands(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle>> outFaces)PUBLIC

ParameterTypeDescription
facesIReadOnlyList<FaceHandle>
outFacesList<List<FaceHandle>>
Returns:void

public void FindOpenEdgeIslands(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle>> outEdgeIslands)PUBLIC

ParameterTypeDescription
edgeListIReadOnlyList<HalfEdgeHandle>
outEdgeIslandsList<List<HalfEdgeHandle>>
Returns:void

public void FindVerticesConnectedToEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, HalfEdgeMesh.VertexHandle[] outVertices)PUBLIC

ParameterTypeDescription
edgeListIReadOnlyList<HalfEdgeHandle>
outVerticesVertexHandle[]
Returns:void

public void FlipAllFaces()PUBLIC

Returns:void

public void GenerateUVsForFaces(System.ReadOnlySpan`1<HalfEdgeMesh.FaceHandle> faces, int generationMode, int edgeAlignMode, HalfEdgeMesh.HalfEdgeHandle alignEdgeVertexA, HalfEdgeMesh.HalfEdgeHandle alignEdgeVertexB, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outFaceVertices, System.Collections.Generic.List`1<Vector2> outFaceVertexUVs)PUBLIC

ParameterTypeDescription
facesReadOnlySpan<FaceHandle>
generationModeint
edgeAlignModeint
alignEdgeVertexAHalfEdgeHandle
alignEdgeVertexBHalfEdgeHandle
outFaceVerticesList<HalfEdgeHandle>
outFaceVertexUVsList<Vector2>
Returns:void

public System.Collections.Generic.IEnumerable`1<Line> GetEdges()PUBLIC

Get the start and end points of all edges

Returns:IEnumerable<Line>

public bool GetFacesConnectedToFace(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> faces)PUBLIC

ParameterTypeDescription
hFaceFaceHandle
facesList<FaceHandle>
Returns:bool

public bool GetFacesConnectedToVertex(HalfEdgeMesh.VertexHandle hVertex, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> faces)PUBLIC

ParameterTypeDescription
hVertexVertexHandle
facesList<FaceHandle>
Returns:bool

public static bool GetNearestEdgesBetweenFaces(Sandbox.PolygonMesh pMesh1, HalfEdgeMesh.FaceHandle hFace1, Transform mLocalToWorld1, Sandbox.PolygonMesh pMesh2, HalfEdgeMesh.FaceHandle hFace2, Transform mLocalToWorld2, HalfEdgeMesh.HalfEdgeHandle pOutEdge1, HalfEdgeMesh.HalfEdgeHandle pOutEdge2)PUBLICSTATIC

ParameterTypeDescription
pMesh1PolygonMesh
hFace1FaceHandle
mLocalToWorld1Transform
pMesh2PolygonMesh
hFace2FaceHandle
mLocalToWorld2Transform
pOutEdge1HalfEdgeHandle
pOutEdge2HalfEdgeHandle
Returns:bool

public System.Collections.Generic.IEnumerable`1<Vector3> GetVertexPositions()PUBLIC

Get the positions of all vertices

Returns:IEnumerable<Vector3>

public System.Collections.Generic.IEnumerable`1<Line> GetVisibleEdges()PUBLIC

Get the start and end points of all edges still used by a face that isn't hidden

Returns:IEnumerable<Line>

public System.Collections.Generic.IEnumerable`1<Vector3> GetVisibleVertexPositions()PUBLIC

Get the positions of all vertices still used by a face that isn't hidden

Returns:IEnumerable<Vector3>

public bool InsetFaces(HalfEdgeMesh.FaceHandle[] faces, float amount, int steps, Sandbox.PolygonMesh.InsetResult result)PUBLIC

Inset a region of faces inward by the given amount with optional intermediate rings.

ParameterTypeDescription
facesFaceHandle[]
amountfloat
stepsint
resultInsetResult
Returns:bool

public bool IsEdgeHidden(HalfEdgeMesh.HalfEdgeHandle hEdge)PUBLIC

Is every face using this edge hidden?

ParameterTypeDescription
hEdgeHalfEdgeHandle
Returns:bool

public bool IsEdgeOpen(HalfEdgeMesh.HalfEdgeHandle hEdge)PUBLIC

Determine if the specified edge is open (only has one connected face)

ParameterTypeDescription
hEdgeHalfEdgeHandle
Returns:bool

public bool IsFaceHidden(HalfEdgeMesh.FaceHandle hFace)PUBLIC

Is this face hidden?

ParameterTypeDescription
hFaceFaceHandle
Returns:bool

public bool IsVertexHidden(HalfEdgeMesh.VertexHandle hVertex)PUBLIC

Is every face using this vertex hidden?

ParameterTypeDescription
hVertexVertexHandle
Returns:bool

public static override object JsonRead(System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert)PUBLICSTATICOVERRIDE

ParameterTypeDescription
readerUtf8JsonReader
typeToConvertType
Returns:object

public static override void JsonWrite(object value, System.Text.Json.Utf8JsonWriter writer)PUBLICSTATICOVERRIDE

ParameterTypeDescription
valueobject
writerUtf8JsonWriter
Returns:void

public void MergeMesh(Sandbox.PolygonMesh sourceMesh, Transform transform, System.Collections.Generic.Dictionary`2<HalfEdgeMesh.VertexHandle,HalfEdgeMesh.VertexHandle> newVertices, System.Collections.Generic.Dictionary`2<HalfEdgeMesh.HalfEdgeHandle,HalfEdgeMesh.HalfEdgeHandle> newHalfEdges, System.Collections.Generic.Dictionary`2<HalfEdgeMesh.FaceHandle,HalfEdgeMesh.FaceHandle> newFaces)PUBLIC

ParameterTypeDescription
sourceMeshPolygonMesh
transformTransform
newVerticesDictionary<VertexHandle,VertexHandle>
newHalfEdgesDictionary<HalfEdgeHandle,HalfEdgeHandle>
newFacesDictionary<FaceHandle,FaceHandle>
Returns:void

public int MergeVerticesWithinDistance(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.VertexHandle> originalVertices, float flMaxDistance, bool bPreConnect, bool bAveragePositions, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> pOutFinalVertices)PUBLIC

ParameterTypeDescription
originalVerticesIReadOnlyList<VertexHandle>
flMaxDistancefloat
bPreConnectbool
bAveragePositionsbool
pOutFinalVerticesList<VertexHandle>
Returns:int

public bool PerformBoolean(Sandbox.PolygonMesh other, Transform relativeTransform, Sandbox.PolygonMesh.BooleanOperation operation)PUBLIC

Perform a boolean operation between this mesh (A) and another mesh (B). The result replaces this mesh. The other mesh is not modified.

ParameterTypeDescription
otherPolygonMesh
relativeTransformTransform
operationBooleanOperation
Returns:bool

public void QuadSliceFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, int cutsX, int cutsY, float minCornerAngleDegrees, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outNewFaceList)PUBLIC

ParameterTypeDescription
facesIReadOnlyList<FaceHandle>
cutsXint
cutsYint
minCornerAngleDegreesfloat
outNewFaceListList<FaceHandle>
Returns:void

public Sandbox.Model Rebuild()PUBLIC

Triangulate the polygons into a model

Returns:Model

public void RemoveBadFaces()PUBLIC

Returns:void

public void RemoveBadGeometry()PUBLIC

Remove all invalid geometry from the mesh: degenerate faces, edges not attached to any face and vertices not attached to any edge.

Returns:void

public bool RemoveColinearVertexAndUpdateTable(HalfEdgeMesh.VertexHandle hVertex, System.Collections.Generic.SortedSet`1<HalfEdgeMesh.HalfEdgeHandle> edgeTable, float flColinearAngleTolerance = 5)PUBLICPER-FRAME

ParameterTypeDescription
hVertexVertexHandle
edgeTableSortedSet<HalfEdgeHandle>
flColinearAngleTolerance = 5float
Returns:bool

public void RemoveEdges(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.HalfEdgeHandle> hEdges)PUBLIC

ParameterTypeDescription
hEdgesIEnumerable<HalfEdgeHandle>
Returns:void

public void RemoveFaces(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> hFaces)PUBLIC

ParameterTypeDescription
hFacesIEnumerable<FaceHandle>
Returns:void

public bool RemoveVertex(HalfEdgeMesh.VertexHandle hVertex, bool removeFreeVerts)PUBLIC

ParameterTypeDescription
hVertexVertexHandle
removeFreeVertsbool
Returns:bool

public void RemoveVertices(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.VertexHandle> hVertices)PUBLIC

ParameterTypeDescription
hVerticesIEnumerable<VertexHandle>
Returns:void

public void Scale(Vector3 scale)PUBLIC

Scale all vertices

ParameterTypeDescription
scaleVector3
Returns:void

public void SetFaceHidden(HalfEdgeMesh.FaceHandle hFace, bool hidden)PUBLIC

Hide or show a face. Hidden faces are editor only and not saved, they are excluded from the rebuilt model so they don't render or trace.

ParameterTypeDescription
hFaceFaceHandle
hiddenbool
Returns:void

public void SetFaceTextureCoords(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.IReadOnlyList`1<Vector2> texcoords)PUBLIC

ParameterTypeDescription
hFaceFaceHandle
texcoordsIReadOnlyList<Vector2>
Returns:void

public void SetSmoothingAngle(float smoothingAngle)PUBLIC

ParameterTypeDescription
smoothingAnglefloat
Returns:void

public void SetTextureOffset(HalfEdgeMesh.FaceHandle hFace, Vector2 offset)PUBLIC

Set texture offset of a face

ParameterTypeDescription
hFaceFaceHandle
offsetVector2
Returns:void

public void SetTextureScale(HalfEdgeMesh.FaceHandle hFace, Vector2 scale)PUBLIC

Set texture scale of a face

ParameterTypeDescription
hFaceFaceHandle
scaleVector2
Returns:void

public void SetTransform(Transform transform)PUBLIC

Set transform without computing texture parameters from coordinates.

ParameterTypeDescription
transformTransform
Returns:void

public void SetVertexPosition(HalfEdgeMesh.VertexHandle hVertex, Vector3 position)PUBLIC

Set the position of a vertex

ParameterTypeDescription
hVertexVertexHandle
positionVector3
Returns:void

public void SplitFacesIntoIslandsForUVMapping(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle>> faceIslands)PUBLIC

ParameterTypeDescription
facesIReadOnlyList<FaceHandle>
faceIslandsList<List<FaceHandle>>
Returns:void

public void TextureAlignToFace(Transform transform, HalfEdgeMesh.FaceHandle hFace)PUBLIC

Align face texture properties to face

ParameterTypeDescription
transformTransform
hFaceFaceHandle
Returns:void

public bool TextureWrapFromFace(HalfEdgeMesh.FaceHandle hSourceFace, HalfEdgeMesh.FaceHandle hDestFace)PUBLIC

Continue the texture mapping of an adjacent source face onto a destination face across their shared edge, keeping the texture continuous over the edge. Returns false if the faces don't share an edge or the source parameters are unusable.

ParameterTypeDescription
hSourceFaceFaceHandle
hDestFaceFaceHandle
Returns:bool

public bool TextureWrapFromNeighbour(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.IReadOnlySet`1<HalfEdgeMesh.FaceHandle> excludeFaces = null)PUBLIC

ParameterTypeDescription
hFaceFaceHandle
excludeFaces = nullIReadOnlySet<FaceHandle>
Returns:bool

public bool ThickenFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, float amount, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outFaces)PUBLIC

ParameterTypeDescription
facesIReadOnlyList<FaceHandle>
amountfloat
outFacesList<FaceHandle>
Returns:bool

public HalfEdgeMesh.FaceHandle TriangleToFace(int triangle)PUBLIC

Convert a triangle index to a face handle

ParameterTypeDescription
triangleint
Returns:FaceHandle

public HalfEdgeMesh.VertexHandle VertexHandleFromIndex(int index)PUBLIC

ParameterTypeDescription
indexint
Returns:VertexHandle

Properties7

Showing 7 properties

public System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> Sandbox.PolygonMesh.BadFaces { get; set; }PUBLICGETSET

Faces that failed to triangulate during the last rebuild

Returns:IReadOnlyList<FaceHandle>

public System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> Sandbox.PolygonMesh.FaceHandles { get; set; }PUBLICGETSET

All of the face handles being used

Returns:IEnumerable<FaceHandle>

public System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.HalfEdgeHandle> Sandbox.PolygonMesh.HalfEdgeHandles { get; set; }PUBLICGETSET

All of the half edge handles being used

Returns:IEnumerable<HalfEdgeHandle>

public bool Sandbox.PolygonMesh.HasHiddenFaces { get; set; }PUBLICGETSET

Are any faces hidden?

Returns:bool

public bool Sandbox.PolygonMesh.IsDirty { get; set; }PUBLICGETSET

Has there been changes to the mesh that need rebuilding?

Returns:bool

public System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.VertexHandle> Sandbox.PolygonMesh.VertexHandles { get; set; }PUBLICGETSET

All of the vertex handles being used

Returns:IEnumerable<VertexHandle>

On this page

Constructorspublic PolygonMesh()Methodspublic HalfEdgeMesh.FaceHandle AddFace(HalfEdgeMesh.VertexHandle[] hVertices)public HalfEdgeMesh.VertexHandle AddVertex(Vector3 position)public System.Boolean AddVertexToEdge(HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB, System.Single flParam, HalfEdgeMesh.VertexHandle pOutNewVertex)public System.Boolean AddVertexToEdgeAndUpdateTable(HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB, System.Single flParam, HalfEdgeMesh.VertexHandle pNewVertex, System.Collections.Generic.SortedSet`1<HalfEdgeMesh.HalfEdgeHandle> pEdgeTable)public HalfEdgeMesh.VertexHandle[] AddVertices(Vector3[] positions)public System.Void ApplyTransform(Transform transform)public System.Boolean AreEdgesCoLinear(HalfEdgeMesh.HalfEdgeHandle hEdgeA, HalfEdgeMesh.HalfEdgeHandle hEdgeB, System.Single flAngleToleranceInDegrees)public System.Void AssignMaterialToFaces(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> faces, Sandbox.Material material)public System.Void AverageEdgeUVs(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges)public System.Void AverageVertexUVs(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.VertexHandle> vertices)public System.Boolean BevelEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, Sandbox.PolygonMesh.BevelEdgesMode edgeRemoveMode, System.Int32 numSegments, System.Single distance, System.Single shape, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outNewOuterEdges = null, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outNewInnerEdges = null, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outNewFaces = null, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outFacesNeedingUVs = null)public System.Boolean BevelVertices(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.VertexHandle> vertices, System.Single distance, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> newVertices)public System.Boolean BridgeEdges(HalfEdgeMesh.HalfEdgeHandle hEdgeA, HalfEdgeMesh.HalfEdgeHandle hEdgeB, HalfEdgeMesh.FaceHandle hOutNewFace)public System.Boolean BridgeEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgesA, System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgesB)public System.Boolean BridgeEdgesInterpolated(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> fromEdges, System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> toEdges, Sandbox.PolygonMesh.BridgeInterpolationParameters parameters, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outEdgesCreated)public BBox CalculateBounds()public BBox CalculateBounds(Transform transform)public HalfEdgeMesh.ComponentConnectivityType ClassifyEdgeListConnectivity(System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outSortedEdges = null)public System.Void ClipFacesByPlaneAndCap(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, Sandbox.Plane planeInMeshSpace, System.Boolean removeFacesBehindPlane, System.Boolean attemptToCap, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outNewEdges = null, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outCapFaces = null)public System.Boolean CollapseEdge(HalfEdgeMesh.HalfEdgeHandle hEdge, HalfEdgeMesh.VertexHandle pOutNewVertex, System.Collections.Generic.List`1<System.ValueTuple`2<HalfEdgeMesh.HalfEdgeHandle,HalfEdgeMesh.HalfEdgeHandle>> pOutReplacedEdges)public System.Boolean CollapseEdge(HalfEdgeMesh.HalfEdgeHandle hHalfEdgeA, System.Single flParam, HalfEdgeMesh.VertexHandle pOutNewVertex, System.Collections.Generic.List`1<System.ValueTuple`2<HalfEdgeMesh.HalfEdgeHandle,HalfEdgeMesh.HalfEdgeHandle>> pOutReplacedEdges)public System.Void CollapseEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges)public System.Boolean CollapseFace(HalfEdgeMesh.FaceHandle hFace, HalfEdgeMesh.VertexHandle hOutVertex)public System.Void CombineFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces)public System.Boolean ComputeClosestPointOnEdge(HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB, Vector3 vTargetPoint, System.Single pOutBaseEdgeParam)public System.Void ComputeFaceNormal(HalfEdgeMesh.FaceHandle hFace, Vector3 pOutNormal)public System.Void ComputeFaceTextureCoordinatesFromParameters()public System.Void ComputeFaceTextureCoordinatesFromParameters(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> faces, Transform transform, System.Collections.Generic.IReadOnlyList`1<Vector2> textureSizes, System.Single defaultScale)public System.Void ComputeFaceTextureCoordinatesFromParameters(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> faces)public System.Void ComputeFaceTextureCoordinatesFromParameters(Transform transform)public System.Void ComputeFaceTextureParametersFromCoordinates()public System.Void ComputeFaceTextureParametersFromCoordinates(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> faces, System.Collections.Generic.IReadOnlyList`1<Vector2> textureSizes, Transform transform)public System.Void ComputeFaceTextureParametersFromCoordinates(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> faces)public System.Boolean ComputeNormalForOpenEdgeLoop(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, Transform transform, Vector3 outNormal, Vector3 outMidPoint)public System.Boolean ComputeNormalForOpenEdgeLoop(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, Vector3 outNormal, Vector3 outMidPoint)public Vector3 ComputeOpenEdgeExtendDirection(HalfEdgeMesh.HalfEdgeHandle edge)public System.Boolean ConnectEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> newEdges)public System.Boolean ConnectVertices(HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB, HalfEdgeMesh.HalfEdgeHandle hNewEdge)public System.Boolean CorrelateOpenEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeSetA, System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeSetB, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outA, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outB)public HalfEdgeMesh.VertexHandle CreateEdgesConnectingVertexToPoint(HalfEdgeMesh.VertexHandle hStartVertex, Vector3 vTargetPosition, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> pOutEdgeList, System.Boolean pOutIsLastEdgeConnector, System.Collections.Generic.SortedSet`1<HalfEdgeMesh.HalfEdgeHandle> pEdgeTable)public Sandbox.Vertex[] CreateFace(HalfEdgeMesh.FaceHandle hFace, Transform transform, Color color)public System.Boolean CreateFaceInEdgeLoop(HalfEdgeMesh.HalfEdgeHandle hOpenEdge, HalfEdgeMesh.FaceHandle hNewFace)public System.Void DetachFaces(HalfEdgeMesh.FaceHandle[] faces, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> newFaces)public System.Void DissolveEdge(HalfEdgeMesh.HalfEdgeHandle edge)public System.Void DissolveEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, System.Boolean bFaceMustBePlanar, Sandbox.PolygonMesh.DissolveRemoveVertexCondition removeCondition)public System.Boolean ExtendEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, System.Single amount, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> newEdges, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> newFaces)public System.Boolean ExtendOrExtrudeVertices(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.VertexHandle> vertices, System.Single offset, System.Single baseWidth, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> modifiedVertices, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> originalVertices, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> newFaces)public System.Void ExtrudeFaces(HalfEdgeMesh.FaceHandle[] faces, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> newFaces, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> connectingFaces, Vector3 offset = null)public HalfEdgeMesh.FaceHandle FaceHandleFromIndex(System.Int32 index)public System.Void FindBoundaryEdgesConnectedToFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outBoundaryEdges)public System.Void FindClosedFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faceList, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outClosedFaces)public System.Void FindCornerVerticesForFace(HalfEdgeMesh.FaceHandle hFace, System.Single minCornerAngle, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> outCornerVertices)public HalfEdgeMesh.HalfEdgeHandle FindEdgeConnectingVertices(HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB)public System.Void FindEdgeIslands(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle>> outEdgeList)public System.Void FindEdgeLoopForEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> originalEdges, HalfEdgeMesh.HalfEdgeHandle[] pOutEdgeLoopEdges)public System.Int32 FindEdgeRibs(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle>> outLeftRibs, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle>> outRightRibs)public System.Void FindEdgeRing(HalfEdgeMesh.HalfEdgeHandle hEdge, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outEdgeList)public System.Void FindFaceIslands(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle>> outFaces)public HalfEdgeMesh.HalfEdgeHandle FindFaceVertexConnectedToVertex(HalfEdgeMesh.VertexHandle hVertex, HalfEdgeMesh.FaceHandle hFace)public System.Boolean FindHalfEdgesConnectedToFace(HalfEdgeMesh.FaceHandle face, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> halfEdges)public System.Void FindOpenEdgeIslands(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle>> outEdgeIslands)public System.Void FindVerticesConnectedToEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, HalfEdgeMesh.VertexHandle[] outVertices)public System.Void FlipAllFaces()public System.Void GenerateUVsForFaces(System.ReadOnlySpan`1<HalfEdgeMesh.FaceHandle> faces, System.Int32 generationMode, System.Int32 edgeAlignMode, HalfEdgeMesh.HalfEdgeHandle alignEdgeVertexA, HalfEdgeMesh.HalfEdgeHandle alignEdgeVertexB, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outFaceVertices, System.Collections.Generic.List`1<Vector2> outFaceVertexUVs)public static System.Void GetBestPlanesForEdgeBetweenFaces(Sandbox.PolygonMesh pMesh1, HalfEdgeMesh.FaceHandle hFace1, Transform mLocalToWorld1, Sandbox.PolygonMesh pMesh2, HalfEdgeMesh.FaceHandle hFace2, Transform mLocalToWorld2, Sandbox.Plane pOutPlane1, Sandbox.Plane pOutPlane2)public Line GetEdgeLine(HalfEdgeMesh.HalfEdgeHandle hEdge)public System.Collections.Generic.IEnumerable`1<Line> GetEdges()public System.Boolean GetEdgesConnectedToFace(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> edges)public System.Boolean GetEdgesConnectedToVertex(HalfEdgeMesh.VertexHandle hVertex, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> edges)public Sandbox.PolygonMesh.EdgeSmoothMode GetEdgeSmoothing(HalfEdgeMesh.HalfEdgeHandle hEdge)public System.Void GetEdgeVertexPositions(HalfEdgeMesh.HalfEdgeHandle hEdge, Transform transform, Vector3 outVertexA, Vector3 outVertexB)public System.Void GetEdgeVertices(HalfEdgeMesh.HalfEdgeHandle hEdge, HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB)public Vector3 GetFaceCenter(HalfEdgeMesh.FaceHandle hFace)public HalfEdgeMesh.HalfEdgeHandle[] GetFaceEdges(HalfEdgeMesh.FaceHandle hFace)public Sandbox.Material GetFaceMaterial(HalfEdgeMesh.FaceHandle hFace)public System.Void GetFacePlaneUsingEdge(HalfEdgeMesh.FaceHandle hFace, HalfEdgeMesh.HalfEdgeHandle hEdge, Transform transform, Sandbox.Plane outPlane)public System.Void GetFacesConnectedToEdge(HalfEdgeMesh.HalfEdgeHandle hEdge, HalfEdgeMesh.FaceHandle hOutFaceA, HalfEdgeMesh.FaceHandle hOutFaceB)public System.Boolean GetFacesConnectedToFace(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> faces)public System.Boolean GetFacesConnectedToVertex(HalfEdgeMesh.VertexHandle hVertex, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> faces)public Vector2[] GetFaceTextureCoords(HalfEdgeMesh.FaceHandle hFace)public System.Void GetFaceTextureParameters(HalfEdgeMesh.FaceHandle hFace, Vector4 outAxisU, Vector4 outAxisV, Vector2 outScale)public System.Collections.Generic.IEnumerable`1<Vector3> GetFaceVertexPositions(HalfEdgeMesh.FaceHandle hFace, Transform transform)public HalfEdgeMesh.VertexHandle[] GetFaceVertices(HalfEdgeMesh.FaceHandle hFace)public System.Boolean GetFaceVerticesConnectedToFace(HalfEdgeMesh.FaceHandle hFace, HalfEdgeMesh.HalfEdgeHandle[] hEdges)public System.Boolean GetFaceVerticesConnectedToVertex(HalfEdgeMesh.VertexHandle hVertex, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> faceVertices)public HalfEdgeMesh.FaceHandle GetHalfEdgeFace(HalfEdgeMesh.HalfEdgeHandle hEdge)public static System.Boolean GetNearestEdgesBetweenFaces(Sandbox.PolygonMesh pMesh1, HalfEdgeMesh.FaceHandle hFace1, Transform mLocalToWorld1, Sandbox.PolygonMesh pMesh2, HalfEdgeMesh.FaceHandle hFace2, Transform mLocalToWorld2, HalfEdgeMesh.HalfEdgeHandle pOutEdge1, HalfEdgeMesh.HalfEdgeHandle pOutEdge2)public HalfEdgeMesh.HalfEdgeHandle GetNextVertexInFace(HalfEdgeMesh.HalfEdgeHandle hFaceVertex)public HalfEdgeMesh.FaceHandle GetOppositeFaceConnectedToEdge(HalfEdgeMesh.HalfEdgeHandle hEdge, HalfEdgeMesh.FaceHandle hFace)public HalfEdgeMesh.HalfEdgeHandle GetOppositeHalfEdge(HalfEdgeMesh.HalfEdgeHandle hEdge)public Vector2 GetTextureCoord(HalfEdgeMesh.HalfEdgeHandle faceVertex)public static System.Void GetTextureExtents(Vector4 vAxisU, Vector4 vAxisV, Vector2 vScale, Sandbox.PolygonMesh.FaceExtents extents, Vector2 topLeft, Vector2 bottomRight)public Vector2 GetTextureOffset(HalfEdgeMesh.FaceHandle hFace)public Vector2 GetTextureScale(HalfEdgeMesh.FaceHandle hFace)public Color32 GetVertexBlend(HalfEdgeMesh.HalfEdgeHandle hFaceVertex)public Color32 GetVertexColor(HalfEdgeMesh.HalfEdgeHandle hFaceVertex)public HalfEdgeMesh.VertexHandle GetVertexConnectedToFaceVertex(HalfEdgeMesh.HalfEdgeHandle hFaceVertex)public System.Void GetVertexPosition(HalfEdgeMesh.VertexHandle hVertex, Transform transform, Vector3 outPosition)public Vector3 GetVertexPosition(HalfEdgeMesh.VertexHandle hVertex)public System.Collections.Generic.IEnumerable`1<Vector3> GetVertexPositions()public System.Boolean GetVerticesConnectedToEdge(HalfEdgeMesh.HalfEdgeHandle hEdge, HalfEdgeMesh.FaceHandle hFace, HalfEdgeMesh.VertexHandle hOutVertexA, HalfEdgeMesh.VertexHandle hOutVertexB)public System.Void GetVerticesConnectedToEdge(HalfEdgeMesh.HalfEdgeHandle hEdge, HalfEdgeMesh.VertexHandle hOutVertexA, HalfEdgeMesh.VertexHandle hOutVertexB)public System.Boolean GetVerticesConnectedToFace(HalfEdgeMesh.FaceHandle hFace, HalfEdgeMesh.VertexHandle[] vertices)public System.Collections.Generic.IEnumerable`1<Line> GetVisibleEdges()public System.Collections.Generic.IEnumerable`1<Vector3> GetVisibleVertexPositions()public HalfEdgeMesh.HalfEdgeHandle HalfEdgeHandleFromIndex(System.Int32 index)public System.Boolean InsetFaces(HalfEdgeMesh.FaceHandle[] faces, System.Single amount, System.Int32 steps, Sandbox.PolygonMesh.InsetResult result)public System.Boolean IsEdgeHidden(HalfEdgeMesh.HalfEdgeHandle hEdge)public System.Boolean IsEdgeOpen(HalfEdgeMesh.HalfEdgeHandle hEdge)public System.Boolean IsEdgeSmooth(HalfEdgeMesh.HalfEdgeHandle hEdge)public System.Boolean IsFaceHidden(HalfEdgeMesh.FaceHandle hFace)public System.Boolean IsVertexHidden(HalfEdgeMesh.VertexHandle hVertex)public static override System.Object JsonRead(System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert)public static override System.Void JsonWrite(System.Object value, System.Text.Json.Utf8JsonWriter writer)public System.Void JustifyFaceTextureParameters(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> hFaces, Sandbox.PolygonMesh.TextureJustification justification, Sandbox.PolygonMesh.FaceExtents extents)public System.Boolean MergeEdges(HalfEdgeMesh.HalfEdgeHandle hEdgeA, HalfEdgeMesh.HalfEdgeHandle hEdgeB, HalfEdgeMesh.HalfEdgeHandle hOutNewEdge)public System.Void MergeMesh(Sandbox.PolygonMesh sourceMesh, Transform transform, System.Collections.Generic.Dictionary`2<HalfEdgeMesh.VertexHandle,HalfEdgeMesh.VertexHandle> newVertices, System.Collections.Generic.Dictionary`2<HalfEdgeMesh.HalfEdgeHandle,HalfEdgeMesh.HalfEdgeHandle> newHalfEdges, System.Collections.Generic.Dictionary`2<HalfEdgeMesh.FaceHandle,HalfEdgeMesh.FaceHandle> newFaces)public System.Int32 MergeVerticesWithinDistance(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.VertexHandle> originalVertices, System.Single flMaxDistance, System.Boolean bPreConnect, System.Boolean bAveragePositions, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> pOutFinalVertices)public System.Boolean PerformBoolean(Sandbox.PolygonMesh other, Transform relativeTransform, Sandbox.PolygonMesh.BooleanOperation operation)public System.Void QuadSliceFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Int32 cutsX, System.Int32 cutsY, System.Single minCornerAngleDegrees, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outNewFaceList)public Sandbox.Model Rebuild()public System.Void RemoveBadFaces()public System.Void RemoveBadGeometry()public System.Boolean RemoveColinearVertexAndUpdateTable(HalfEdgeMesh.VertexHandle hVertex, System.Collections.Generic.SortedSet`1<HalfEdgeMesh.HalfEdgeHandle> edgeTable, System.Single flColinearAngleTolerance = 5)public System.Void RemoveEdges(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.HalfEdgeHandle> hEdges)public System.Void RemoveFaces(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> hFaces)public System.Boolean RemoveVertex(HalfEdgeMesh.VertexHandle hVertex, System.Boolean removeFreeVerts)public System.Void RemoveVertices(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.VertexHandle> hVertices)public System.Void Scale(Vector3 scale)public System.Void SetEdgeSmoothing(HalfEdgeMesh.HalfEdgeHandle hEdge, Sandbox.PolygonMesh.EdgeSmoothMode mode)public System.Void SetFaceHidden(HalfEdgeMesh.FaceHandle hFace, System.Boolean hidden)public System.Void SetFaceMaterial(HalfEdgeMesh.FaceHandle hFace, Sandbox.Material material)public System.Void SetFaceMaterial(HalfEdgeMesh.FaceHandle hFace, System.String material)public System.Void SetFaceTextureCoords(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.IReadOnlyList`1<Vector2> texcoords)public System.Void SetFaceTextureParameters(HalfEdgeMesh.FaceHandle hFace, Vector4 axisU, Vector4 axisV, Vector2 scale)public System.Void SetSmoothingAngle(System.Single smoothingAngle)public System.Void SetTextureCoord(HalfEdgeMesh.HalfEdgeHandle faceVertex, Vector2 texcoord)public System.Void SetTextureOffset(HalfEdgeMesh.FaceHandle hFace, Vector2 offset)public System.Void SetTextureScale(HalfEdgeMesh.FaceHandle hFace, Vector2 scale)public System.Void SetTransform(Transform transform)public System.Void SetVertexBlend(HalfEdgeMesh.HalfEdgeHandle hFaceVertex, Color32 blend)public System.Void SetVertexColor(HalfEdgeMesh.HalfEdgeHandle hFaceVertex, Color32 color)public System.Void SetVertexPosition(HalfEdgeMesh.VertexHandle hVertex, Vector3 position)public System.Boolean SplitEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, HalfEdgeMesh.HalfEdgeHandle[] newEdgesA, HalfEdgeMesh.HalfEdgeHandle[] pOutNewEdgesB)public System.Void SplitFacesIntoIslandsForUVMapping(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle>> faceIslands)public System.Void TextureAlignToFace(Transform transform, HalfEdgeMesh.FaceHandle hFace)public System.Void TextureAlignToGrid(Transform transform, HalfEdgeMesh.FaceHandle hFace)public System.Void TextureAlignToGrid(Transform transform)public System.Boolean TextureWrapFromFace(HalfEdgeMesh.FaceHandle hSourceFace, HalfEdgeMesh.FaceHandle hDestFace)public System.Boolean TextureWrapFromNeighbour(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.IReadOnlySet`1<HalfEdgeMesh.FaceHandle> excludeFaces = null)public System.Boolean ThickenFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Single amount, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outFaces)public HalfEdgeMesh.FaceHandle TriangleToFace(System.Int32 triangle)public System.Void UnionExtentsForFaces(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> hFaces, Transform transform, Sandbox.PolygonMesh.FaceExtents extents)public HalfEdgeMesh.VertexHandle VertexHandleFromIndex(System.Int32 index)Propertiespublic System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> Sandbox.PolygonMesh.BadFaces { get; set; }public System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> Sandbox.PolygonMesh.FaceHandles { get; set; }public System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.HalfEdgeHandle> Sandbox.PolygonMesh.HalfEdgeHandles { get; set; }public System.Boolean Sandbox.PolygonMesh.HasHiddenFaces { get; set; }public System.Boolean Sandbox.PolygonMesh.IsDirty { get; set; }public Transform Sandbox.PolygonMesh.Transform { get; set; }public System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.VertexHandle> Sandbox.PolygonMesh.VertexHandles { get; set; }Metadata