DisplayCache

References
public abstract class DisplayCache : IDisposable
An immutable collection of display shapes.

Constructors

DisplayCache

#
protected DisplayCache(IDocumentObject obj, SolutionId solution, BoundingBox clipping)
obj (IDocumentObject)
solution (SolutionId)
clipping (BoundingBox)

Fields

_pixelScale

#
protected float _pixelScale

Properties

Clipping

#
public BoundingBox Clipping { get; }
Gets the clipping box of this cache.

ExpirationFactor

#
public float ExpirationFactor { get; }
Gets a normalised factor for the expiration transition. Zero means expiration has not started yet, One means expiration has fully completed, any value in between indicates a partial transition.

HasFaces

#
public abstract bool HasFaces { get; }
Gets whether this cache has at least one face object to draw.

HasWires

#
public abstract bool HasWires { get; }
Gets whether this cache has at least one wire object to draw.

Object

#
public IDocumentObject Object { get; }
Gets the object which owns this cache.

Solution

#
public SolutionId Solution { get; }
Gets the solution this cache is associated with.

Methods

Create

#
public static DisplayCache Create(IDocumentObject obj, SolutionId solution, BoundingBox clipping, DisplayPointSet points = null, DisplayVector[] vectors = null, DisplayPlane[] planes = null, DisplayCurve[] curves = null, DisplayText[] texts = null, DisplayMesh[] meshes = null, DisplayWidget[] widgets = null)
obj (IDocumentObject)
solution (SolutionId)
clipping (BoundingBox)
points (DisplayPointSet = null)
vectors (DisplayVector[] = null)
planes (DisplayPlane[] = null)
curves (DisplayCurve[] = null)
texts (DisplayText[] = null)
meshes (DisplayMesh[] = null)
widgets (DisplayWidget[] = null)

Dispose

#
public void Dispose()

DrawFaces

#
public void DrawFaces(DisplayPipeline pipeline, Guises guises)
Method called when the face shapes need to be drawn in the viewport. Faces include shaded meshes, surfaces, breps, Sub-Ds, and so on.
pipeline (DisplayPipeline)
guises (Guises)

DrawWires

#
public void DrawWires(DisplayPipeline pipeline, Guises guises)
Method called when the wire shapes need to be drawn in the viewport. Wires include point symbols, curves, edges, texts, and so on.
pipeline (DisplayPipeline)
guises (Guises)

Expire

#
public void Expire()
Expire this cache of display data. Typically you do not need to call this method. This cache will be automatically expired along with the IDocumentObject associated with it.