Table of Contents

Class Facet

Namespace
LiveScope.STL
Assembly
LiveScope.Net.dll

A representation of a facet which is defined by its location (Vertices) and directionality (Normal).

public class Facet : IEquatable<Facet>, IEnumerable<Vertex>, IEnumerable
Inheritance
Facet
Implements
Inherited Members
Extension Methods

Constructors

Facet()

Creates a new, empty Facet.

public Facet()

Facet(E, IEnumerable<Vertex>, ushort)

public Facet(E normal, IEnumerable<Vertex> vertices, ushort attributeByteCount)

Parameters

normal E
vertices IEnumerable<Vertex>
attributeByteCount ushort

Properties

AttributeByteCount

Additional data attached to the facet.

public ushort AttributeByteCount { get; set; }

Property Value

ushort

Remarks

Depending on the source of the STL, this could be used to indicate such things as the color of the Facet. This functionality only exists in binary STLs.

Normal

Indicates the directionality of the Facet.

public E? Normal { get; set; }

Property Value

E

Vertices

Indicates the location of the Facet.

public IList<Vertex> Vertices { get; set; }

Property Value

IList<Vertex>

Methods

Equals(Facet?)

Determines whether or not this instance is the same as the other instance.

public bool Equals(Facet? other)

Parameters

other Facet

The Facet to which to compare.

Returns

bool

Equals(object?)

public override bool Equals(object? other)

Parameters

other object

Returns

bool

GetEnumerator()

Iterates through the Vertices collection.

public IEnumerator<Vertex> GetEnumerator()

Returns

IEnumerator<Vertex>

GetHashCode()

public override int GetHashCode()

Returns

int

Read(BinaryReader)

Reads a single Facet from the reader.

public static Facet Read(BinaryReader reader)

Parameters

reader BinaryReader

The reader which contains a Facet to be read at the current position.

Returns

Facet

Read(StreamReader)

Reads a single Facet from the reader.

public static Facet Read(StreamReader reader)

Parameters

reader StreamReader

The reader which contains a Facet to be read at the current position.

Returns

Facet

ToString()

Returns the string representation of this Facet.

public override string ToString()

Returns

string

Write(BinaryWriter)

Writes the Facet as binary to the writer.

public void Write(BinaryWriter writer)

Parameters

writer BinaryWriter

The writer to which the Facet will be written at the current position.

Write(StreamWriter)

Writes the Facet as text to the writer.

public void Write(StreamWriter writer)

Parameters

writer StreamWriter

The writer to which the Facet will be written at the current position.