Struct Vertex
This structure represents the point at which the sides of an angle intersect.
public struct Vertex
- Inherited Members
Constructors
Vertex(double, double)
This is the constructor used to create a vertex.
public Vertex(double x, double y)
Parameters
x
doubleThis parameter represents the horizontal value.
y
doubleThis parameter represents the vertical value.
Remarks
None
Vertex(PointShape)
This is the constructor used to create a vertex.
public Vertex(PointShape point)
Parameters
point
PointShapeThis parameter is the PointShape you want to convert to a Vertex.
Remarks
None
Properties
X
This property returns the horizontal value of the vertex.
public double X { get; set; }
Property Value
- double
This property returns the horizontal value of the vertex.
Remarks
None
Y
This property returns the vertical value of the vertex.
public double Y { get; set; }
Property Value
- double
This property returns the vertical value of the vertex.
Remarks
None
Methods
Add(Vertex)
This method adds the target vertex to the current vertex.
public Vertex Add(Vertex targetVertex)
Parameters
targetVertex
VertexThis parameter represents the vertex you wish to add to the current vertex.
Returns
Remarks
None
Equals(object)
This method is an override of the Equals functionality.
public override bool Equals(object obj)
Parameters
obj
object
Returns
Remarks
None
FindMiddleVertexBetweenTwoVertices(Vertex, Vertex)
This method returns the middle Vertex of a straight line which two vertices are passing in.
public static Vertex FindMiddleVertexBetweenTwoVertices(Vertex vertex1, Vertex vertex2)
Parameters
Returns
- Vertex
This method returns the middle Vertex between the vertices which passing in.
GetHashCode()
This method is an override of the GetHashCode functionality.
public override int GetHashCode()
Returns
Remarks
None
ToString()
This method is an override of the ToString functionality.
public override string ToString()
Returns
Remarks
None
Operators
operator +(Vertex, Vertex)
This method is an override of the + functionality.
public static Vertex operator +(Vertex vertex1, Vertex vertex2)
Parameters
vertex1
VertexThis parameter represents the first vertex to add.
vertex2
VertexThis parameter represents the second vertex to add.
Returns
Remarks
None
operator ==(Vertex, Vertex)
This method is an override of the == functionality.
public static bool operator ==(Vertex vertex1, Vertex vertex2)
Parameters
vertex1
VertexThis parameter represents the first vertex to compare.
vertex2
VertexThis parameter represents the second vertex to compare.
Returns
Remarks
None
operator !=(Vertex, Vertex)
This method is an override of the != functionality.
public static bool operator !=(Vertex vertex1, Vertex vertex2)
Parameters
vertex1
VertexThis parameter represents the first vertex to compare.
vertex2
VertexThis parameter represents the second vertex to compare.
Returns
Remarks
None