PolygonMeshclass
An editable mesh made up of polygons, triangulated into a model
Constructors1
Showing 1 constructors
public PolygonMesh()
No results match this filter.
Methods154
Showing 154 methods
public HalfEdgeMesh.FaceHandle AddFace(HalfEdgeMesh.VertexHandle[] hVertices)
Connect these vertices to make a face
| Parameter | Type | Description |
|---|---|---|
| hVertices | VertexHandle[] | — |
public HalfEdgeMesh.VertexHandle AddVertex(Vector3 position)
Add a vertex to the topology
| Parameter | Type | Description |
|---|---|---|
| position | Vector3 | — |
public bool AddVertexToEdge(HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB, float flParam, HalfEdgeMesh.VertexHandle pOutNewVertex)
| Parameter | Type | Description |
|---|---|---|
| hVertexA | VertexHandle | — |
| hVertexB | VertexHandle | — |
| flParam | float | — |
| pOutNewVertex | VertexHandle | — |
bool—public bool AddVertexToEdgeAndUpdateTable(HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB, float flParam, HalfEdgeMesh.VertexHandle pNewVertex, System.Collections.Generic.SortedSet`1<HalfEdgeMesh.HalfEdgeHandle> pEdgeTable)
| Parameter | Type | Description |
|---|---|---|
| hVertexA | VertexHandle | — |
| hVertexB | VertexHandle | — |
| flParam | float | — |
| pNewVertex | VertexHandle | — |
| pEdgeTable | SortedSet<HalfEdgeHandle> | — |
bool—public HalfEdgeMesh.VertexHandle[] AddVertices(Vector3[] positions)
Add multiple vertices to the topology
| Parameter | Type | Description |
|---|---|---|
| positions | Vector3[] | — |
public void ApplyTransform(Transform transform)
Transform all the vertices
| Parameter | Type | Description |
|---|---|---|
| transform | Transform | — |
void—public bool AreEdgesCoLinear(HalfEdgeMesh.HalfEdgeHandle hEdgeA, HalfEdgeMesh.HalfEdgeHandle hEdgeB, float flAngleToleranceInDegrees)
| Parameter | Type | Description |
|---|---|---|
| hEdgeA | HalfEdgeHandle | — |
| hEdgeB | HalfEdgeHandle | — |
| flAngleToleranceInDegrees | float | — |
bool—public void AssignMaterialToFaces(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> faces, Sandbox.Material material)
| Parameter | Type | Description |
|---|---|---|
| faces | IEnumerable<FaceHandle> | — |
| material | Material | — |
void—public void AverageEdgeUVs(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges)
| Parameter | Type | Description |
|---|---|---|
| edges | IReadOnlyList<HalfEdgeHandle> | — |
void—public void AverageVertexUVs(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.VertexHandle> vertices)
| Parameter | Type | Description |
|---|---|---|
| vertices | IReadOnlyList<VertexHandle> | — |
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)
| Parameter | Type | Description |
|---|---|---|
| edges | IReadOnlyList<HalfEdgeHandle> | — |
| edgeRemoveMode | BevelEdgesMode | — |
| numSegments | int | — |
| distance | float | — |
| shape | float | — |
| outNewOuterEdges = null | List<HalfEdgeHandle> | — |
| outNewInnerEdges = null | List<HalfEdgeHandle> | — |
| outNewFaces = null | List<FaceHandle> | — |
| outFacesNeedingUVs = null | List<FaceHandle> | — |
bool—public bool BevelVertices(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.VertexHandle> vertices, float distance, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> newVertices)
| Parameter | Type | Description |
|---|---|---|
| vertices | IReadOnlyList<VertexHandle> | — |
| distance | float | — |
| newVertices | List<VertexHandle> | — |
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)
| Parameter | Type | Description |
|---|---|---|
| fromEdges | IReadOnlyList<HalfEdgeHandle> | — |
| toEdges | IReadOnlyList<HalfEdgeHandle> | — |
| parameters | BridgeInterpolationParameters | — |
| outEdgesCreated | List<HalfEdgeHandle> | — |
bool—public HalfEdgeMesh.ComponentConnectivityType ClassifyEdgeListConnectivity(System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outSortedEdges = null)
| Parameter | Type | Description |
|---|---|---|
| edgeList | List<HalfEdgeHandle> | — |
| outSortedEdges = null | List<HalfEdgeHandle> | — |
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)
| Parameter | Type | Description |
|---|---|---|
| faces | IReadOnlyList<FaceHandle> | — |
| planeInMeshSpace | Plane | — |
| removeFacesBehindPlane | bool | — |
| attemptToCap | bool | — |
| outNewEdges = null | List<HalfEdgeHandle> | — |
| outCapFaces = null | List<FaceHandle> | — |
void—public void CollapseEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges)
| Parameter | Type | Description |
|---|---|---|
| edges | IReadOnlyList<HalfEdgeHandle> | — |
void—public bool CollapseFace(HalfEdgeMesh.FaceHandle hFace, HalfEdgeMesh.VertexHandle hOutVertex)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| hOutVertex | VertexHandle | — |
bool—public void CombineFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces)
| Parameter | Type | Description |
|---|---|---|
| faces | IReadOnlyList<FaceHandle> | — |
void—public bool ComputeClosestPointOnEdge(HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB, Vector3 vTargetPoint, float pOutBaseEdgeParam)
| Parameter | Type | Description |
|---|---|---|
| hVertexA | VertexHandle | — |
| hVertexB | VertexHandle | — |
| vTargetPoint | Vector3 | — |
| pOutBaseEdgeParam | float | — |
bool—public void ComputeFaceNormal(HalfEdgeMesh.FaceHandle hFace, Vector3 pOutNormal)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| pOutNormal | Vector3 | — |
void—public Vector3 ComputeOpenEdgeExtendDirection(HalfEdgeMesh.HalfEdgeHandle edge)
| Parameter | Type | Description |
|---|---|---|
| edge | HalfEdgeHandle | — |
public bool ConnectEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> newEdges)
| Parameter | Type | Description |
|---|---|---|
| edges | IReadOnlyList<HalfEdgeHandle> | — |
| newEdges | List<HalfEdgeHandle> | — |
bool—public bool ConnectVertices(HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB, HalfEdgeMesh.HalfEdgeHandle hNewEdge)
| Parameter | Type | Description |
|---|---|---|
| hVertexA | VertexHandle | — |
| hVertexB | VertexHandle | — |
| hNewEdge | HalfEdgeHandle | — |
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)
| Parameter | Type | Description |
|---|---|---|
| edgeSetA | IReadOnlyList<HalfEdgeHandle> | — |
| edgeSetB | IReadOnlyList<HalfEdgeHandle> | — |
| outA | List<HalfEdgeHandle> | — |
| outB | List<HalfEdgeHandle> | — |
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)
| Parameter | Type | Description |
|---|---|---|
| hStartVertex | VertexHandle | — |
| vTargetPosition | Vector3 | — |
| pOutEdgeList | List<HalfEdgeHandle> | — |
| pOutIsLastEdgeConnector | bool | — |
| pEdgeTable | SortedSet<HalfEdgeHandle> | — |
public Sandbox.Vertex[] CreateFace(HalfEdgeMesh.FaceHandle hFace, Transform transform, Color color)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| transform | Transform | — |
| color | Color | — |
public bool CreateFaceInEdgeLoop(HalfEdgeMesh.HalfEdgeHandle hOpenEdge, HalfEdgeMesh.FaceHandle hNewFace)
Add a face filling in the open edge loop specified by the provided edge
| Parameter | Type | Description |
|---|---|---|
| hOpenEdge | HalfEdgeHandle | — |
| hNewFace | FaceHandle | — |
bool—public void DetachFaces(HalfEdgeMesh.FaceHandle[] faces, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> newFaces)
| Parameter | Type | Description |
|---|---|---|
| faces | FaceHandle[] | — |
| newFaces | List<FaceHandle> | — |
void—public void DissolveEdge(HalfEdgeMesh.HalfEdgeHandle edge)
| Parameter | Type | Description |
|---|---|---|
| edge | HalfEdgeHandle | — |
void—public void DissolveEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, bool bFaceMustBePlanar, Sandbox.PolygonMesh.DissolveRemoveVertexCondition removeCondition)
| Parameter | Type | Description |
|---|---|---|
| edges | IReadOnlyList<HalfEdgeHandle> | — |
| bFaceMustBePlanar | bool | — |
| removeCondition | DissolveRemoveVertexCondition | — |
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)
| Parameter | Type | Description |
|---|---|---|
| edges | IReadOnlyList<HalfEdgeHandle> | — |
| amount | float | — |
| newEdges | List<HalfEdgeHandle> | — |
| newFaces | List<FaceHandle> | — |
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)
| Parameter | Type | Description |
|---|---|---|
| vertices | IReadOnlyList<VertexHandle> | — |
| offset | float | — |
| baseWidth | float | — |
| modifiedVertices | List<VertexHandle> | — |
| originalVertices | List<VertexHandle> | — |
| newFaces | List<FaceHandle> | — |
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)
| Parameter | Type | Description |
|---|---|---|
| faces | FaceHandle[] | — |
| newFaces | List<FaceHandle> | — |
| connectingFaces | List<FaceHandle> | — |
| offset = null | Vector3 | — |
void—public HalfEdgeMesh.FaceHandle FaceHandleFromIndex(int index)
| Parameter | Type | Description |
|---|---|---|
| index | int | — |
public void FindBoundaryEdgesConnectedToFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outBoundaryEdges)
| Parameter | Type | Description |
|---|---|---|
| faces | IReadOnlyList<FaceHandle> | — |
| outBoundaryEdges | List<HalfEdgeHandle> | — |
void—public void FindClosedFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faceList, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outClosedFaces)
| Parameter | Type | Description |
|---|---|---|
| faceList | IReadOnlyList<FaceHandle> | — |
| outClosedFaces | List<FaceHandle> | — |
void—public void FindCornerVerticesForFace(HalfEdgeMesh.FaceHandle hFace, float minCornerAngle, System.Collections.Generic.List`1<HalfEdgeMesh.VertexHandle> outCornerVertices)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| minCornerAngle | float | — |
| outCornerVertices | List<VertexHandle> | — |
void—public HalfEdgeMesh.HalfEdgeHandle FindEdgeConnectingVertices(HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB)
| Parameter | Type | Description |
|---|---|---|
| hVertexA | VertexHandle | — |
| hVertexB | VertexHandle | — |
public void FindEdgeIslands(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle>> outEdgeList)
| Parameter | Type | Description |
|---|---|---|
| edgeList | IReadOnlyList<HalfEdgeHandle> | — |
| outEdgeList | List<List<HalfEdgeHandle>> | — |
void—public void FindEdgeLoopForEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> originalEdges, HalfEdgeMesh.HalfEdgeHandle[] pOutEdgeLoopEdges)
| Parameter | Type | Description |
|---|---|---|
| originalEdges | IReadOnlyList<HalfEdgeHandle> | — |
| pOutEdgeLoopEdges | HalfEdgeHandle[] | — |
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)
| Parameter | Type | Description |
|---|---|---|
| edges | IReadOnlyList<HalfEdgeHandle> | — |
| outLeftRibs | List<List<HalfEdgeHandle>> | — |
| outRightRibs | List<List<HalfEdgeHandle>> | — |
int—public void FindEdgeRing(HalfEdgeMesh.HalfEdgeHandle hEdge, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> outEdgeList)
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
| outEdgeList | List<HalfEdgeHandle> | — |
void—public void FindFaceIslands(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle>> outFaces)
| Parameter | Type | Description |
|---|---|---|
| faces | IReadOnlyList<FaceHandle> | — |
| outFaces | List<List<FaceHandle>> | — |
void—public HalfEdgeMesh.HalfEdgeHandle FindFaceVertexConnectedToVertex(HalfEdgeMesh.VertexHandle hVertex, HalfEdgeMesh.FaceHandle hFace)
| Parameter | Type | Description |
|---|---|---|
| hVertex | VertexHandle | — |
| hFace | FaceHandle | — |
public bool FindHalfEdgesConnectedToFace(HalfEdgeMesh.FaceHandle face, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> halfEdges)
| Parameter | Type | Description |
|---|---|---|
| face | FaceHandle | — |
| halfEdges | List<HalfEdgeHandle> | — |
bool—public void FindOpenEdgeIslands(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle>> outEdgeIslands)
| Parameter | Type | Description |
|---|---|---|
| edgeList | IReadOnlyList<HalfEdgeHandle> | — |
| outEdgeIslands | List<List<HalfEdgeHandle>> | — |
void—public void FindVerticesConnectedToEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edgeList, HalfEdgeMesh.VertexHandle[] outVertices)
| Parameter | Type | Description |
|---|---|---|
| edgeList | IReadOnlyList<HalfEdgeHandle> | — |
| outVertices | VertexHandle[] | — |
void—public void FlipAllFaces()
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)
| Parameter | Type | Description |
|---|---|---|
| faces | ReadOnlySpan<FaceHandle> | — |
| generationMode | int | — |
| edgeAlignMode | int | — |
| alignEdgeVertexA | HalfEdgeHandle | — |
| alignEdgeVertexB | HalfEdgeHandle | — |
| outFaceVertices | List<HalfEdgeHandle> | — |
| outFaceVertexUVs | List<Vector2> | — |
void—public static void GetBestPlanesForEdgeBetweenFaces(Sandbox.PolygonMesh pMesh1, HalfEdgeMesh.FaceHandle hFace1, Transform mLocalToWorld1, Sandbox.PolygonMesh pMesh2, HalfEdgeMesh.FaceHandle hFace2, Transform mLocalToWorld2, Sandbox.Plane pOutPlane1, Sandbox.Plane pOutPlane2)
| Parameter | Type | Description |
|---|---|---|
| pMesh1 | PolygonMesh | — |
| hFace1 | FaceHandle | — |
| mLocalToWorld1 | Transform | — |
| pMesh2 | PolygonMesh | — |
| hFace2 | FaceHandle | — |
| mLocalToWorld2 | Transform | — |
| pOutPlane1 | Plane | — |
| pOutPlane2 | Plane | — |
void—public Line GetEdgeLine(HalfEdgeMesh.HalfEdgeHandle hEdge)
Get start and end points of an edge
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
public System.Collections.Generic.IEnumerable`1<Line> GetEdges()
Get the start and end points of all edges
public bool GetEdgesConnectedToFace(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> edges)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| edges | List<HalfEdgeHandle> | — |
bool—public bool GetEdgesConnectedToVertex(HalfEdgeMesh.VertexHandle hVertex, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> edges)
| Parameter | Type | Description |
|---|---|---|
| hVertex | VertexHandle | — |
| edges | List<HalfEdgeHandle> | — |
bool—public Sandbox.PolygonMesh.EdgeSmoothMode GetEdgeSmoothing(HalfEdgeMesh.HalfEdgeHandle hEdge)
Get the smoothing of this edge
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
public void GetEdgeVertexPositions(HalfEdgeMesh.HalfEdgeHandle hEdge, Transform transform, Vector3 outVertexA, Vector3 outVertexB)
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
| transform | Transform | — |
| outVertexA | Vector3 | — |
| outVertexB | Vector3 | — |
void—public void GetEdgeVertices(HalfEdgeMesh.HalfEdgeHandle hEdge, HalfEdgeMesh.VertexHandle hVertexA, HalfEdgeMesh.VertexHandle hVertexB)
Get the two vertices of this half edge
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
| hVertexA | VertexHandle | — |
| hVertexB | VertexHandle | — |
void—public Vector3 GetFaceCenter(HalfEdgeMesh.FaceHandle hFace)
Calculate the center point of a face
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
public HalfEdgeMesh.HalfEdgeHandle[] GetFaceEdges(HalfEdgeMesh.FaceHandle hFace)
Get all edge handles of a face
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
public Sandbox.Material GetFaceMaterial(HalfEdgeMesh.FaceHandle hFace)
Get a material a face is using
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
public void GetFacePlaneUsingEdge(HalfEdgeMesh.FaceHandle hFace, HalfEdgeMesh.HalfEdgeHandle hEdge, Transform transform, Sandbox.Plane outPlane)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| hEdge | HalfEdgeHandle | — |
| transform | Transform | — |
| outPlane | Plane | — |
void—public void GetFacesConnectedToEdge(HalfEdgeMesh.HalfEdgeHandle hEdge, HalfEdgeMesh.FaceHandle hOutFaceA, HalfEdgeMesh.FaceHandle hOutFaceB)
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
| hOutFaceA | FaceHandle | — |
| hOutFaceB | FaceHandle | — |
void—public bool GetFacesConnectedToFace(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> faces)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| faces | List<FaceHandle> | — |
bool—public bool GetFacesConnectedToVertex(HalfEdgeMesh.VertexHandle hVertex, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> faces)
| Parameter | Type | Description |
|---|---|---|
| hVertex | VertexHandle | — |
| faces | List<FaceHandle> | — |
bool—public Vector2[] GetFaceTextureCoords(HalfEdgeMesh.FaceHandle hFace)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
public void GetFaceTextureParameters(HalfEdgeMesh.FaceHandle hFace, Vector4 outAxisU, Vector4 outAxisV, Vector2 outScale)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| outAxisU | Vector4 | — |
| outAxisV | Vector4 | — |
| outScale | Vector2 | — |
void—public System.Collections.Generic.IEnumerable`1<Vector3> GetFaceVertexPositions(HalfEdgeMesh.FaceHandle hFace, Transform transform)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| transform | Transform | — |
public HalfEdgeMesh.VertexHandle[] GetFaceVertices(HalfEdgeMesh.FaceHandle hFace)
Get all vertex handles of a face
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
public bool GetFaceVerticesConnectedToFace(HalfEdgeMesh.FaceHandle hFace, HalfEdgeMesh.HalfEdgeHandle[] hEdges)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| hEdges | HalfEdgeHandle[] | — |
bool—public bool GetFaceVerticesConnectedToVertex(HalfEdgeMesh.VertexHandle hVertex, System.Collections.Generic.List`1<HalfEdgeMesh.HalfEdgeHandle> faceVertices)
| Parameter | Type | Description |
|---|---|---|
| hVertex | VertexHandle | — |
| faceVertices | List<HalfEdgeHandle> | — |
bool—public HalfEdgeMesh.FaceHandle GetHalfEdgeFace(HalfEdgeMesh.HalfEdgeHandle hEdge)
Get the face connected to this half edge
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
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)
| Parameter | Type | Description |
|---|---|---|
| pMesh1 | PolygonMesh | — |
| hFace1 | FaceHandle | — |
| mLocalToWorld1 | Transform | — |
| pMesh2 | PolygonMesh | — |
| hFace2 | FaceHandle | — |
| mLocalToWorld2 | Transform | — |
| pOutEdge1 | HalfEdgeHandle | — |
| pOutEdge2 | HalfEdgeHandle | — |
bool—public HalfEdgeMesh.HalfEdgeHandle GetNextVertexInFace(HalfEdgeMesh.HalfEdgeHandle hFaceVertex)
| Parameter | Type | Description |
|---|---|---|
| hFaceVertex | HalfEdgeHandle | — |
public HalfEdgeMesh.FaceHandle GetOppositeFaceConnectedToEdge(HalfEdgeMesh.HalfEdgeHandle hEdge, HalfEdgeMesh.FaceHandle hFace)
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
| hFace | FaceHandle | — |
public HalfEdgeMesh.HalfEdgeHandle GetOppositeHalfEdge(HalfEdgeMesh.HalfEdgeHandle hEdge)
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
public Vector2 GetTextureCoord(HalfEdgeMesh.HalfEdgeHandle faceVertex)
Get face vertex texture coord
| Parameter | Type | Description |
|---|---|---|
| faceVertex | HalfEdgeHandle | — |
public static void GetTextureExtents(Vector4 vAxisU, Vector4 vAxisV, Vector2 vScale, Sandbox.PolygonMesh.FaceExtents extents, Vector2 topLeft, Vector2 bottomRight)
| Parameter | Type | Description |
|---|---|---|
| vAxisU | Vector4 | — |
| vAxisV | Vector4 | — |
| vScale | Vector2 | — |
| extents | FaceExtents | — |
| topLeft | Vector2 | — |
| bottomRight | Vector2 | — |
void—public Vector2 GetTextureOffset(HalfEdgeMesh.FaceHandle hFace)
Get texture offset of a face
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
public Vector2 GetTextureScale(HalfEdgeMesh.FaceHandle hFace)
Get texture scale of a face
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
public Color32 GetVertexBlend(HalfEdgeMesh.HalfEdgeHandle hFaceVertex)
Get the blend of a vertex
| Parameter | Type | Description |
|---|---|---|
| hFaceVertex | HalfEdgeHandle | — |
public Color32 GetVertexColor(HalfEdgeMesh.HalfEdgeHandle hFaceVertex)
Get the color of a vertex
| Parameter | Type | Description |
|---|---|---|
| hFaceVertex | HalfEdgeHandle | — |
public HalfEdgeMesh.VertexHandle GetVertexConnectedToFaceVertex(HalfEdgeMesh.HalfEdgeHandle hFaceVertex)
| Parameter | Type | Description |
|---|---|---|
| hFaceVertex | HalfEdgeHandle | — |
public System.Collections.Generic.IEnumerable`1<Vector3> GetVertexPositions()
Get the positions of all vertices
public bool GetVerticesConnectedToFace(HalfEdgeMesh.FaceHandle hFace, HalfEdgeMesh.VertexHandle[] vertices)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| vertices | VertexHandle[] | — |
bool—public System.Collections.Generic.IEnumerable`1<Line> GetVisibleEdges()
Get the start and end points of all edges still used by a face that isn't hidden
public System.Collections.Generic.IEnumerable`1<Vector3> GetVisibleVertexPositions()
Get the positions of all vertices still used by a face that isn't hidden
public HalfEdgeMesh.HalfEdgeHandle HalfEdgeHandleFromIndex(int index)
| Parameter | Type | Description |
|---|---|---|
| index | int | — |
public bool InsetFaces(HalfEdgeMesh.FaceHandle[] faces, float amount, int steps, Sandbox.PolygonMesh.InsetResult result)
Inset a region of faces inward by the given amount with optional intermediate rings.
| Parameter | Type | Description |
|---|---|---|
| faces | FaceHandle[] | — |
| amount | float | — |
| steps | int | — |
| result | InsetResult | — |
bool—public bool IsEdgeOpen(HalfEdgeMesh.HalfEdgeHandle hEdge)
Determine if the specified edge is open (only has one connected face)
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
bool—public bool IsEdgeSmooth(HalfEdgeMesh.HalfEdgeHandle hEdge)
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
bool—public static override object JsonRead(System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert)
| Parameter | Type | Description |
|---|---|---|
| reader | Utf8JsonReader | — |
| typeToConvert | Type | — |
object—public static override void JsonWrite(object value, System.Text.Json.Utf8JsonWriter writer)
| Parameter | Type | Description |
|---|---|---|
| value | object | — |
| writer | Utf8JsonWriter | — |
void—public void JustifyFaceTextureParameters(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> hFaces, Sandbox.PolygonMesh.TextureJustification justification, Sandbox.PolygonMesh.FaceExtents extents)
| Parameter | Type | Description |
|---|---|---|
| hFaces | IEnumerable<FaceHandle> | — |
| justification | TextureJustification | — |
| extents | FaceExtents | — |
void—public bool MergeEdges(HalfEdgeMesh.HalfEdgeHandle hEdgeA, HalfEdgeMesh.HalfEdgeHandle hEdgeB, HalfEdgeMesh.HalfEdgeHandle hOutNewEdge)
| Parameter | Type | Description |
|---|---|---|
| hEdgeA | HalfEdgeHandle | — |
| hEdgeB | HalfEdgeHandle | — |
| hOutNewEdge | HalfEdgeHandle | — |
bool—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)
| Parameter | Type | Description |
|---|---|---|
| sourceMesh | PolygonMesh | — |
| transform | Transform | — |
| newVertices | Dictionary<VertexHandle,VertexHandle> | — |
| newHalfEdges | Dictionary<HalfEdgeHandle,HalfEdgeHandle> | — |
| newFaces | Dictionary<FaceHandle,FaceHandle> | — |
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)
| Parameter | Type | Description |
|---|---|---|
| originalVertices | IReadOnlyList<VertexHandle> | — |
| flMaxDistance | float | — |
| bPreConnect | bool | — |
| bAveragePositions | bool | — |
| pOutFinalVertices | List<VertexHandle> | — |
int—public bool PerformBoolean(Sandbox.PolygonMesh other, Transform relativeTransform, Sandbox.PolygonMesh.BooleanOperation operation)
Perform a boolean operation between this mesh (A) and another mesh (B). The result replaces this mesh. The other mesh is not modified.
| Parameter | Type | Description |
|---|---|---|
| other | PolygonMesh | — |
| relativeTransform | Transform | — |
| operation | BooleanOperation | — |
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)
| Parameter | Type | Description |
|---|---|---|
| faces | IReadOnlyList<FaceHandle> | — |
| cutsX | int | — |
| cutsY | int | — |
| minCornerAngleDegrees | float | — |
| outNewFaceList | List<FaceHandle> | — |
void—public void RemoveBadFaces()
void—public void RemoveBadGeometry()
Remove all invalid geometry from the mesh: degenerate faces, edges not attached to any face and vertices not attached to any edge.
void—public bool RemoveColinearVertexAndUpdateTable(HalfEdgeMesh.VertexHandle hVertex, System.Collections.Generic.SortedSet`1<HalfEdgeMesh.HalfEdgeHandle> edgeTable, float flColinearAngleTolerance = 5)
| Parameter | Type | Description |
|---|---|---|
| hVertex | VertexHandle | — |
| edgeTable | SortedSet<HalfEdgeHandle> | — |
| flColinearAngleTolerance = 5 | float | — |
bool—public void RemoveEdges(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.HalfEdgeHandle> hEdges)
| Parameter | Type | Description |
|---|---|---|
| hEdges | IEnumerable<HalfEdgeHandle> | — |
void—public void RemoveFaces(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> hFaces)
| Parameter | Type | Description |
|---|---|---|
| hFaces | IEnumerable<FaceHandle> | — |
void—public bool RemoveVertex(HalfEdgeMesh.VertexHandle hVertex, bool removeFreeVerts)
| Parameter | Type | Description |
|---|---|---|
| hVertex | VertexHandle | — |
| removeFreeVerts | bool | — |
bool—public void RemoveVertices(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.VertexHandle> hVertices)
| Parameter | Type | Description |
|---|---|---|
| hVertices | IEnumerable<VertexHandle> | — |
void—public void Scale(Vector3 scale)
Scale all vertices
| Parameter | Type | Description |
|---|---|---|
| scale | Vector3 | — |
void—public void SetEdgeSmoothing(HalfEdgeMesh.HalfEdgeHandle hEdge, Sandbox.PolygonMesh.EdgeSmoothMode mode)
Set the smoothing of this edge
| Parameter | Type | Description |
|---|---|---|
| hEdge | HalfEdgeHandle | — |
| mode | EdgeSmoothMode | — |
void—public void SetFaceTextureCoords(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.IReadOnlyList`1<Vector2> texcoords)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| texcoords | IReadOnlyList<Vector2> | — |
void—public void SetFaceTextureParameters(HalfEdgeMesh.FaceHandle hFace, Vector4 axisU, Vector4 axisV, Vector2 scale)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| axisU | Vector4 | — |
| axisV | Vector4 | — |
| scale | Vector2 | — |
void—public void SetSmoothingAngle(float smoothingAngle)
| Parameter | Type | Description |
|---|---|---|
| smoothingAngle | float | — |
void—public void SetTextureCoord(HalfEdgeMesh.HalfEdgeHandle faceVertex, Vector2 texcoord)
Set face vertex texture coord
| Parameter | Type | Description |
|---|---|---|
| faceVertex | HalfEdgeHandle | — |
| texcoord | Vector2 | — |
void—public void SetTextureOffset(HalfEdgeMesh.FaceHandle hFace, Vector2 offset)
Set texture offset of a face
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| offset | Vector2 | — |
void—public void SetTextureScale(HalfEdgeMesh.FaceHandle hFace, Vector2 scale)
Set texture scale of a face
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| scale | Vector2 | — |
void—public void SetTransform(Transform transform)
Set transform without computing texture parameters from coordinates.
| Parameter | Type | Description |
|---|---|---|
| transform | Transform | — |
void—public void SetVertexBlend(HalfEdgeMesh.HalfEdgeHandle hFaceVertex, Color32 blend)
Set the blend of a vertex
| Parameter | Type | Description |
|---|---|---|
| hFaceVertex | HalfEdgeHandle | — |
| blend | Color32 | — |
void—public void SetVertexColor(HalfEdgeMesh.HalfEdgeHandle hFaceVertex, Color32 color)
Set the color of a vertex
| Parameter | Type | Description |
|---|---|---|
| hFaceVertex | HalfEdgeHandle | — |
| color | Color32 | — |
void—public void SetVertexPosition(HalfEdgeMesh.VertexHandle hVertex, Vector3 position)
Set the position of a vertex
| Parameter | Type | Description |
|---|---|---|
| hVertex | VertexHandle | — |
| position | Vector3 | — |
void—public bool SplitEdges(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.HalfEdgeHandle> edges, HalfEdgeMesh.HalfEdgeHandle[] newEdgesA, HalfEdgeMesh.HalfEdgeHandle[] pOutNewEdgesB)
| Parameter | Type | Description |
|---|---|---|
| edges | IReadOnlyList<HalfEdgeHandle> | — |
| newEdgesA | HalfEdgeHandle[] | — |
| pOutNewEdgesB | HalfEdgeHandle[] | — |
bool—public void SplitFacesIntoIslandsForUVMapping(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, System.Collections.Generic.List`1<System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle>> faceIslands)
| Parameter | Type | Description |
|---|---|---|
| faces | IReadOnlyList<FaceHandle> | — |
| faceIslands | List<List<FaceHandle>> | — |
void—public void TextureAlignToFace(Transform transform, HalfEdgeMesh.FaceHandle hFace)
Align face texture properties to face
| Parameter | Type | Description |
|---|---|---|
| transform | Transform | — |
| hFace | FaceHandle | — |
void—public bool TextureWrapFromFace(HalfEdgeMesh.FaceHandle hSourceFace, HalfEdgeMesh.FaceHandle hDestFace)
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.
| Parameter | Type | Description |
|---|---|---|
| hSourceFace | FaceHandle | — |
| hDestFace | FaceHandle | — |
bool—public bool TextureWrapFromNeighbour(HalfEdgeMesh.FaceHandle hFace, System.Collections.Generic.IReadOnlySet`1<HalfEdgeMesh.FaceHandle> excludeFaces = null)
| Parameter | Type | Description |
|---|---|---|
| hFace | FaceHandle | — |
| excludeFaces = null | IReadOnlySet<FaceHandle> | — |
bool—public bool ThickenFaces(System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> faces, float amount, System.Collections.Generic.List`1<HalfEdgeMesh.FaceHandle> outFaces)
| Parameter | Type | Description |
|---|---|---|
| faces | IReadOnlyList<FaceHandle> | — |
| amount | float | — |
| outFaces | List<FaceHandle> | — |
bool—public HalfEdgeMesh.FaceHandle TriangleToFace(int triangle)
Convert a triangle index to a face handle
| Parameter | Type | Description |
|---|---|---|
| triangle | int | — |
public void UnionExtentsForFaces(System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> hFaces, Transform transform, Sandbox.PolygonMesh.FaceExtents extents)
| Parameter | Type | Description |
|---|---|---|
| hFaces | IEnumerable<FaceHandle> | — |
| transform | Transform | — |
| extents | FaceExtents | — |
void—public HalfEdgeMesh.VertexHandle VertexHandleFromIndex(int index)
| Parameter | Type | Description |
|---|---|---|
| index | int | — |
No results match this filter.
Properties7
Showing 7 properties
public System.Collections.Generic.IReadOnlyList`1<HalfEdgeMesh.FaceHandle> Sandbox.PolygonMesh.BadFaces { get; set; }
Faces that failed to triangulate during the last rebuild
public System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.FaceHandle> Sandbox.PolygonMesh.FaceHandles { get; set; }
All of the face handles being used
public System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.HalfEdgeHandle> Sandbox.PolygonMesh.HalfEdgeHandles { get; set; }
All of the half edge handles being used
public bool Sandbox.PolygonMesh.IsDirty { get; set; }
Has there been changes to the mesh that need rebuilding?
bool—public System.Collections.Generic.IEnumerable`1<HalfEdgeMesh.VertexHandle> Sandbox.PolygonMesh.VertexHandles { get; set; }
All of the vertex handles being used
No results match this filter.