You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary>A simple XYZ representation of a normal (<see cref="Vertex"/>).</summary>
publicclassNormal:Vertex
{
/// <summary>Creates a new, empty <see cref="Normal"/>.</summary>
publicNormal():base(){}
/// <summary>Creates a new <see cref="Normal"/> using the provided coordinates.</summary>
publicNormal(floatx,floaty,floatz):base(x,y,z){}
/// <summary>Flips the normal so it faces the opposite direction.</summary>
publicvoidInvert()
{
X*=-1;
Y*=-1;
Z*=-1;
}
/// <summary>Reads a single <see cref="Normal"/> from the <paramref name="reader"/>.</summary>
/// <param name="reader">The reader which contains a <see cref="Normal"/> to be read at the current position</param>
publicstaticnewNormalRead(StreamReaderreader)
{
returnNormal.FromVertex(Vertex.Read(reader));
}
/// <summary>Reads a single <see cref="Normal"/> from the <paramref name="reader"/>.</summary>
/// <param name="reader">The reader which contains a <see cref="Normal"/> to be read at the current position</param>
publicstaticnewNormalRead(BinaryReaderreader)
{
returnNormal.FromVertex(Vertex.Read(reader));
}
/// <summary>Converts the <paramref name="vertex"/> to a normal.</summary>
/// <remarks>This does nothing more than copy the X, Y and Z coordinates of the <paramref name="vertex"/> into a new <see cref="Normal"/> instance.</remarks>
/// <param name="vertex">The <see cref="Vertex"/> to be converted into a <see cref="Normal"/>.</param>
/// <returns>A <see cref="Normal"/> or null if the <paramref name="vertex"/> is null.</returns>