CrystalFace

References
public class CrystalFace : IStorable
Immutable facet of a material thumbnail gem.

Constructors

CrystalFace

#
Deserialize a shape from an archive.
public CrystalFace(
reader
)

CrystalFace

#
Face constructor. Use the other overload if you want to make sure the face is valid.
public CrystalFace(
centre,
Centre point of face (used for elevation sorting).
normal,
Face normal direction.
points
Face corners, ought to be coplanar and convex. This array is not cloned, so don't change it afterwards.
)

Properties

Centre

#
Gets the average centre point of this face.
public Locus Centre { get; }

Elevation

#
Gets the average elevation of this face.
public double Elevation { get; }

Normal

#
Gets the normal direction of this face.
public Locus Normal { get; }

Points

#
Enumerates over all points in this facet.
public IEnumerable<Locus> Points { get; }

Visibility

#
Gets the visibility of this face.
public CrystalVisibility Visibility { get; }

Methods

Render

#
Render this face to a graphics context.
public void Render(
Graphics
graphics,
Graphics object to draw with.
material
Material properties.
)

Render

#
Render a face with the colour picked from a gradient based on illumination.
public void Render(
Graphics
graphics,
Graphics context.
gradient
Gradient with valid values between 0.0 (fully in shade) and 1.0 (fully lit).
)

Store

#
Serialize this shape.
public void Store(
writer
)
Store

Transform

#
Transform this face.
public CrystalFace Transform(
Transform
transform
Tranformation.
)
Transformed face.