Class RenderHints
Hints for rendering, such as whether a data impression should be hidden
Namespace: IVLab.ABREngine
Assembly: IVLab.ABREngine.Runtime.dll
Syntax
public class RenderHints
Properties
| Improve this Doc View SourceGeometryChanged
Has the impression been changed since the last render (needs to be re-rendered?)
Declaration
public bool GeometryChanged { get; set; }
Property Value
Type | Description |
---|---|
bool |
PerIndexVisibility
Index-level toggle to control visibility of individual parts of a data impression (e.g., points, lines).
Declaration
public BitArray PerIndexVisibility { get; set; }
Property Value
Type | Description |
---|---|
BitArray |
Remarks
Index-level visibility may not be implemented for every data impression.
Examples
The following example shows basic usage of per-index visibility on a simple glyph data impression:
public class IndexVisibilityExample : MonoBehaviour
{
void Start()
{
// Let's say the key data has 42 points.
KeyData pointsKd = // some data we've imported
// Create a layer for "before" points (blue)
SimpleGlyphDataImpression di = new SimpleGlyphDataImpression();
di.keyData = // some key data we've loaded previously
// Default everything to invisible (visible = false)
di.RenderHints.PerIndexVisibility = new BitArray(42, false);
// Register impression with the engine and render
ABREngine.Instance.RegisterDataImpression(di);
ABREngine.Instance.Render();
// Then, if we wanted to set some index to visible:
di.RenderHints.PerIndexVisibility[10] = true;
// Note: we need to tell the impression that its style has changed and
// call Render() again
di.RenderHints.StyleChanged = true;
ABREngine.Instance.Render();
}
}
|
Improve this Doc
View Source
StyleChanged
Has the style of the impression been changed
Declaration
public bool StyleChanged { get; set; }
Property Value
Type | Description |
---|---|
bool |
VisibilityChanged
Has the visibility of the impression been changed (mesh renderer needs to be toggled)
Declaration
public bool VisibilityChanged { get; set; }
Property Value
Type | Description |
---|---|
bool |
Visible
Whether or not the impression is visible
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Improve this Doc View SourceCopy()
Hints for rendering, such as whether a data impression should be hidden
Declaration
public RenderHints Copy()
Returns
Type | Description |
---|---|
RenderHints |
HasPerIndexVisibility()
Whether or not the impression currently has per-index visibility
Declaration
public bool HasPerIndexVisibility()
Returns
Type | Description |
---|---|
bool |