class PolygonMesh
An editable mesh made up of polygons, triangulated into a model
public bool IsDirty { get; }
Has there been changes to the mesh that need rebuilding?
public Transform Transform { get; set; }
Where is the mesh in worldspace.
public IEnumerable<VertexHandle> VertexHandles { get; }
All of the vertex handles being used
public IEnumerable<FaceHandle> FaceHandles { get; }
All of the face handles being used
public IEnumerable<HalfEdgeHandle> HalfEdgeHandles { get; }
All of the half edge handles being used
public VertexHandle AddVertex( Vector3 position )
Add a vertex to the topology
public VertexHandle[] AddVertices( Vector3[] positions )
Add multiple vertices to the topology
public FaceHandle AddFace( VertexHandle[] hVertices )
Connect these vertices to make a face
public BBox CalculateBounds( Transform transform )
Calculate bounds of all transformed vertices
public void Scale( Vector3 scale )
Scale all vertices
public void SetFaceMaterial( FaceHandle hFace, Material material )
Assign a material to a face
public void SetFaceMaterial( FaceHandle hFace, string material )
Assign a material to a face
public Material GetFaceMaterial( FaceHandle hFace )
Get a material a face is using
public PolygonMesh.EdgeSmoothMode GetEdgeSmoothing( HalfEdgeHandle hEdge )
Get the smoothing of this edge
public void SetEdgeSmoothing( HalfEdgeHandle hEdge, PolygonMesh.EdgeSmoothMode mode )
Set the smoothing of this edge
public FaceHandle TriangleToFace( int triangle )
Convert a triangle index to a face handle
public bool CreateFaceInEdgeLoop( HalfEdgeHandle hOpenEdge, ref FaceHandle hNewFace )
Add a face filling in the open edge loop specified by the provided edge
public FaceHandle GetHalfEdgeFace( HalfEdgeHandle hEdge )
Get the face connected to this half edge
public bool IsEdgeOpen( HalfEdgeHandle hEdge )
Determine if the specified edge is open (only has one connected face)
public bool BridgeEdges( HalfEdgeHandle hEdgeA, HalfEdgeHandle hEdgeB, ref FaceHandle hOutNewFace )
Bridge two edges (create a face connecting them). The edges must both be open and belong to different faces.
public Line GetEdgeLine( HalfEdgeHandle hEdge )
Get start and end points of an edge
public void GetEdgeVertices( HalfEdgeHandle hEdge, ref VertexHandle hVertexA, ref VertexHandle hVertexB )
Get the two vertices of this half edge
public void SetVertexPosition( VertexHandle hVertex, Vector3 position )
Set the position of a vertex
public Vector3 GetVertexPosition( VertexHandle hVertex )
Get the position of a vertex
public void GetVertexPosition( VertexHandle hVertex, Transform transform, ref Vector3 outPosition )
Get the position of a vertex
public Vector3 GetFaceCenter( FaceHandle hFace )
Calculate the center point of a face
public void ApplyTransform( Transform transform )
Transform all the vertices
public HalfEdgeHandle[] GetFaceEdges( FaceHandle hFace )
Get all edge handles of a face
public VertexHandle[] GetFaceVertices( FaceHandle hFace )
Get all vertex handles of a face
public Vector2 GetTextureOffset( FaceHandle hFace )
Get texture offset of a face
public void SetTextureOffset( FaceHandle hFace, Vector2 offset )
Set texture offset of a face
public Vector2 GetTextureScale( FaceHandle hFace )
Get texture scale of a face
public void SetTextureScale( FaceHandle hFace, Vector2 scale )
Set texture scale of a face
public void TextureAlignToGrid( Transform transform, FaceHandle hFace )
Align face texture properties to grid
public void TextureAlignToFace( Transform transform, FaceHandle hFace )
Align face texture properties to face
public void SetFaceTextureParameters( FaceHandle hFace, Vector2 offset, Vector3 uAxis, Vector3 vAxis )
Set face texture properties
public void TextureAlignToGrid( Transform transform )
Align all face texture properties to grid
public Type GetType( )
😔 No documentation found.
public void RemoveEdges( IEnumerable<HalfEdgeHandle> hEdges )
😔 No documentation found.
public void RemoveVertices( IEnumerable<VertexHandle> hVertices )
😔 No documentation found.
public void RemoveFaces( IEnumerable<FaceHandle> hFaces )
😔 No documentation found.
public static object JsonRead( ref Utf8JsonReader reader, Type typeToConvert )
😔 No documentation found.
public void GetFaceTextureParameters( FaceHandle hFace, ref Vector4 outAxisU, ref Vector4 outAxisV, ref Vector2 outScale )
😔 No documentation found.
public static void JsonWrite( object value, Utf8JsonWriter writer )
😔 No documentation found.
public void SetFaceTextureCoords( FaceHandle hFace, IReadOnlyList<Vector2> texcoords )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public void SetFaceTextureParameters( FaceHandle hFace, Vector4 axisU, Vector4 axisV, Vector2 scale )
😔 No documentation found.
public void AverageEdgeUVs( IReadOnlyList<HalfEdgeHandle> edges )
😔 No documentation found.
public Vertex[] CreateFace( FaceHandle hFace, Transform transform, Color color )
😔 No documentation found.
public void AverageVertexUVs( IReadOnlyList<VertexHandle> vertices )
😔 No documentation found.
public static bool GetNearestEdgesBetweenFaces( PolygonMesh pMesh1, FaceHandle hFace1, Transform mLocalToWorld1, PolygonMesh pMesh2, FaceHandle hFace2, Transform mLocalToWorld2, ref HalfEdgeHandle pOutEdge1, ref HalfEdgeHandle pOutEdge2 )
😔 No documentation found.
public void GetFacePlaneUsingEdge( FaceHandle hFace, HalfEdgeHandle hEdge, Transform transform, ref Plane outPlane )
😔 No documentation found.
public HalfEdgeHandle GetOppositeHalfEdge( HalfEdgeHandle hEdge )
😔 No documentation found.
public static void GetTextureExtents( Vector4 vAxisU, Vector4 vAxisV, Vector2 vScale, PolygonMesh.FaceExtents extents, ref Vector2 topLeft, ref Vector2 bottomRight )
😔 No documentation found.
public void JustifyFaceTextureParameters( IEnumerable<FaceHandle> hFaces, PolygonMesh.TextureJustification justification, PolygonMesh.FaceExtents extents )
😔 No documentation found.
public void RemoveBadFaces( )
😔 No documentation found.
public void QuadSliceFaces( IReadOnlyList<FaceHandle> faces, int cutsX, int cutsY, float minCornerAngleDegrees, List<FaceHandle> outNewFaceList )
😔 No documentation found.
public FaceHandle GetOppositeFaceConnectedToEdge( HalfEdgeHandle hEdge, FaceHandle hFace )
😔 No documentation found.
public void GetEdgeVertexPositions( HalfEdgeHandle hEdge, Transform transform, ref Vector3 outVertexA, ref Vector3 outVertexB )
😔 No documentation found.
public void GetVerticesConnectedToEdge( HalfEdgeHandle hEdge, ref VertexHandle hOutVertexA, ref VertexHandle hOutVertexB )
😔 No documentation found.
public bool GetEdgesConnectedToFace( FaceHandle hFace, ref List<HalfEdgeHandle> edges )
😔 No documentation found.
public Model Rebuild( )
😔 No documentation found.
public void CollapseEdges( IReadOnlyList<HalfEdgeHandle> edges )
😔 No documentation found.
public bool SplitEdges( IReadOnlyList<HalfEdgeHandle> edges, ref HalfEdgeHandle[] newEdgesA, ref HalfEdgeHandle[] pOutNewEdgesB )
😔 No documentation found.
public bool CollapseFace( FaceHandle hFace, ref VertexHandle hOutVertex )
😔 No documentation found.
public bool CollapseEdge( HalfEdgeHandle hHalfEdgeA, float flParam, ref VertexHandle pOutNewVertex, ref List<ValueTuple<HalfEdgeHandle,HalfEdgeHandle>> pOutReplacedEdges )
😔 No documentation found.
public bool CollapseEdge( HalfEdgeHandle hEdge, ref VertexHandle pOutNewVertex, ref List<ValueTuple<HalfEdgeHandle,HalfEdgeHandle>> pOutReplacedEdges )
😔 No documentation found.
public static void GetBestPlanesForEdgeBetweenFaces( PolygonMesh pMesh1, FaceHandle hFace1, Transform mLocalToWorld1, PolygonMesh pMesh2, FaceHandle hFace2, Transform mLocalToWorld2, ref Plane pOutPlane1, ref Plane pOutPlane2 )
😔 No documentation found.
public void UnionExtentsForFaces( IEnumerable<FaceHandle> hFaces, Transform transform, PolygonMesh.FaceExtents extents )
😔 No documentation found.
public PolygonMesh( )
😔 No documentation found.
public void ComputeFaceTextureCoordinatesFromParameters( IEnumerable<FaceHandle> faces, Transform transform, IReadOnlyList<Vector2> textureSizes, float defaultScale )
😔 No documentation found.
public bool AddVertexToEdge( VertexHandle hVertexA, VertexHandle hVertexB, float flParam, ref VertexHandle pOutNewVertex )
😔 No documentation found.
public bool ConnectEdges( IReadOnlyList<HalfEdgeHandle> edges, ref List<HalfEdgeHandle> newEdges )
😔 No documentation found.
public void FindEdgeRing( HalfEdgeHandle hEdge, ref List<HalfEdgeHandle> outEdgeList )
😔 No documentation found.
public int MergeVerticesWithinDistance( IReadOnlyList<VertexHandle> originalVertices, float flMaxDistance, bool bPreConnect, bool bAveragePositions, ref List<VertexHandle> pOutFinalVertices )
😔 No documentation found.
public void FlipAllFaces( )
😔 No documentation found.
public bool MergeEdges( HalfEdgeHandle hEdgeA, HalfEdgeHandle hEdgeB, ref HalfEdgeHandle hOutNewEdge )
😔 No documentation found.
public void DissolveEdges( IReadOnlyList<HalfEdgeHandle> edges, bool bFaceMustBePlanar, PolygonMesh.DissolveRemoveVertexCondition removeCondition )
😔 No documentation found.
public void CombineFaces( IReadOnlyList<FaceHandle> faces )
😔 No documentation found.
public bool ExtendEdges( IReadOnlyList<HalfEdgeHandle> edges, float amount, ref List<HalfEdgeHandle> newEdges, ref List<FaceHandle> newFaces )
😔 No documentation found.
public void DetachFaces( FaceHandle[] faces, ref List<FaceHandle> newFaces )
😔 No documentation found.
public void ExtrudeFaces( FaceHandle[] faces, ref List<FaceHandle> newFaces, ref List<FaceHandle> connectingFaces, Vector3 offset = null )
😔 No documentation found.
public void SetSmoothingAngle( float smoothingAngle )
😔 No documentation found.
public BBox CalculateBounds( )
😔 No documentation found.
public void MergeMesh( PolygonMesh sourceMesh, Transform transform, ref Dictionary<VertexHandle,VertexHandle> newVertices, ref Dictionary<HalfEdgeHandle,HalfEdgeHandle> newHalfEdges, ref Dictionary<FaceHandle,FaceHandle> newFaces )
😔 No documentation found.
public FaceHandle FaceHandleFromIndex( int index )
😔 No documentation found.
public HalfEdgeHandle HalfEdgeHandleFromIndex( int index )
😔 No documentation found.
public VertexHandle VertexHandleFromIndex( int index )
😔 No documentation found.
public bool RemoveVertex( VertexHandle hVertex, bool removeFreeVerts )
😔 No documentation found.
public bool BevelEdges( IReadOnlyList<HalfEdgeHandle> edges, PolygonMesh.BevelEdgesMode edgeRemoveMode, int numSegments, float distance, float shape, List<HalfEdgeHandle> outNewOuterEdges = null, List<HalfEdgeHandle> outNewInnerEdges = null, List<FaceHandle> outNewFaces = null, List<FaceHandle> outFacesNeedingUVs = null )
😔 No documentation found.
public bool BevelVertices( IReadOnlyList<VertexHandle> vertices, float distance, ref List<VertexHandle> newVertices )
😔 No documentation found.
public void ComputeFaceTextureParametersFromCoordinates( IEnumerable<FaceHandle> faces, IReadOnlyList<Vector2> textureSizes, Transform transform )
😔 No documentation found.
public void ComputeFaceTextureCoordinatesFromParameters( IEnumerable<FaceHandle> faces )
😔 No documentation found.
public void ComputeFaceTextureCoordinatesFromParameters( )
😔 No documentation found.
public void ComputeFaceTextureParametersFromCoordinates( IEnumerable<FaceHandle> faces )
😔 No documentation found.
public void ComputeFaceTextureParametersFromCoordinates( )
😔 No documentation found.
public VertexHandle GetVertexConnectedToFaceVertex( HalfEdgeHandle hFaceVertex )
😔 No documentation found.
public bool GetFaceVerticesConnectedToFace( FaceHandle hFace, ref HalfEdgeHandle[] hEdges )
😔 No documentation found.
public IEnumerable<Vector3> GetFaceVertexPositions( FaceHandle hFace, Transform transform )
😔 No documentation found.
public IEnumerable<Line> GetEdges( )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public void ComputeFaceNormal( FaceHandle hFace, ref Vector3 pOutNormal )
😔 No documentation found.
public IEnumerable<Vector3> GetVertexPositions( )
😔 No documentation found.
public int FindEdgeRibs( IReadOnlyList<HalfEdgeHandle> edges, ref List<List<HalfEdgeHandle>> outLeftRibs, ref List<List<HalfEdgeHandle>> outRightRibs )
😔 No documentation found.
public void FindEdgeIslands( IReadOnlyList<HalfEdgeHandle> edgeList, ref List<List<HalfEdgeHandle>> outEdgeList )
😔 No documentation found.
public void FindEdgeLoopForEdges( IReadOnlyList<HalfEdgeHandle> originalEdges, ref HalfEdgeHandle[] pOutEdgeLoopEdges )
😔 No documentation found.
public static bool InsideTriangle( Vector3 a, Vector3 b, Vector3 c, Vector3 p, Vector3 normal )
😔 No documentation found.
public bool ConnectVertices( VertexHandle hVertexA, VertexHandle hVertexB, ref HalfEdgeHandle hNewEdge )
😔 No documentation found.
public HalfEdgeHandle GetNextVertexInFace( HalfEdgeHandle hFaceVertex )
😔 No documentation found.
public bool GetFacesConnectedToVertex( VertexHandle hVertex, ref List<FaceHandle> faces )
😔 No documentation found.
public HalfEdgeHandle FindFaceVertexConnectedToVertex( VertexHandle hVertex, FaceHandle hFace )
😔 No documentation found.