Immutable collection of faces and edges of a material thumbnail gem.
Constructors
Crystal
#public Crystal(string name, string info, IEnumerable<CrystalEdge> edges, IEnumerable<CrystalFace> facets)
Create a new shape.
Parameters:
| name (string) | Crystal name. |
| info (string) | Crystal description, may be null. |
| edges (IEnumerable<CrystalEdge>) | Collection of shape edges. |
| facets (IEnumerable<CrystalFace>) | Collection of shape faces. |
Properties
CrystalNames
#Enumerate over all defined crystals. Note that the crystals are stored as files on the disk and may thus be deleted or renamed at any time.
Methods
CreateAngleTransform
Set up a transformation from a set of angles and a target.
CreateCameraTransform
Set up a transformation from a camera location and display radius.
LoadFromBrep
#Create a new shape from a brep.
LoadFromFile
#Load a crystal from a 3dm file. This method will throw whenever something's not correct. The file must contain a single Brep object, and that brep must be closed and contain only planar faces and linear edges. Breps that are not fully convex will not show correctly, but they will load.
Parameters:
| filePath (string) | File to parse. |
Returns: Loaded crystal.
Render
#public void Render(Graphics graphics, DisplayMaterial material, GuiseCurve visibleEdges, GuiseCurve hiddenEdges)
Render this crystal to a graphics context.
Parameters:
| graphics (Graphics) | |
| material (DisplayMaterial) | |
| visibleEdges (GuiseCurve) | |
| hiddenEdges (GuiseCurve) |