Class Vertex
A simple XYZ representation of a vertex.
public class Vertex : IEquatable<Vertex>
- Inheritance
-
Vertex
- Implements
- Derived
- Inherited Members
Constructors
Vertex()
Creates a new, empty Vertex.
public Vertex()
Vertex(float, float, float)
Creates a new Vertex using the provided coordinates.
public Vertex(float x, float y, float z)
Parameters
Properties
X
The X coordinate of this Vertex.
public float X { get; set; }
Property Value
Y
The Y coordinate of this Vertex.
public float Y { get; set; }
Property Value
Z
The Z coordinate of this Vertex.
public float Z { get; set; }
Property Value
Methods
Equals(Vertex?)
Determines whether or not this instance is the same as the other
instance.
public bool Equals(Vertex? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
other
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Read(BinaryReader)
Reads a single Vertex from the reader
.
public static Vertex Read(BinaryReader reader)
Parameters
reader
BinaryReaderThe reader which contains a Vertex to be read at the current position
Returns
Read(StreamReader)
Reads a single Vertex from the reader
.
public static Vertex Read(StreamReader reader)
Parameters
reader
StreamReaderThe reader which contains a Vertex to be read at the current position
Returns
Shift(Vertex)
Shifts the shift
by the X, Y and Z values in the shift
parameter.
public void Shift(Vertex shift)
Parameters
shift
VertexThe amount to shift the vertex.
ToString()
Returns the string representation of this Vertex.
public override string ToString()
Returns
Write(BinaryWriter)
Writes the Vertex as binary to the writer
.
public void Write(BinaryWriter writer)
Parameters
writer
BinaryWriterThe writer to which the Vertex will be written at the current position.
Write(StreamWriter)
Writes the Vertex as text to the writer
.
public void Write(StreamWriter writer)
Parameters
writer
StreamWriterThe writer to which the Vertex will be written at the current position.