Struct Edge
Represents an edge connecting two vertices.
This might point to an index in the vertices (local) or the sharedVertices (common) array. The ProBuilder terminology "local" and "common" refers to whether this is an index from the list of all vertices in the ProBuilderMesh or an index from the list of only shared vertices.
Implements
Inherited Members
Namespace: UnityEngine.ProBuilder
Assembly: Unity.ProBuilder.dll
Syntax
[Serializable]
public struct Edge : IEquatable<Edge>
Constructors
Name | Description |
---|---|
Edge(int, int) | Creates a new edge from two vertex indexes. |
Fields
Name | Description |
---|---|
Empty | Creates an empty edge defined as |
a | Stores an index that corresponds to a mesh vertex array. |
b | Stores an index that corresponds to a mesh vertex array. |
Methods
Name | Description |
---|---|
Add(Edge, Edge) | Adds two edges index values. |
Contains(int) | Tests whether this edge contains an index. |
Contains(Edge) | Tests whether this edge has any matching index to the other edge |
Equals(object) | Tests whether this object is equal to another object. |
Equals(Edge) | Tests whether this Edge is equal to another Edge object. |
Equals(Edge, Dictionary<int, int>) | Compares edges and takes shared triangles into account. |
GetHashCode() | Returns the hash code for this instance. |
IsValid() | Tests whether this edge points to valid vertex indexes. |
Subtract(Edge, Edge) | Subtracts edge b from a. |
ToString() | Returns a string representation of the edge. |
Operators
Name | Description |
---|---|
operator +(Edge, int) | Creates a new Edge by adding an integer to both indices on an Edge object. |
operator +(Edge, Edge) | Creates a new Edge by adding the two left indices together and the two right indices together from both Edge objects. |
operator ==(Edge, Edge) | Compares two objects for equality. |
operator !=(Edge, Edge) | Returns true if the two objects are not equal. |
operator -(Edge, int) | Creates a new Edge by subtracting an integer from both indices on an Edge object. |
operator -(Edge, Edge) | Creates a new Edge by subtracting the two left indices together and the two right indices together from both Edge objects. |