Class SimpleSurfaceDataImpression
A "Surfaces" data impression that uses hand-drawn textures and color to show surface data.
Inheritance
Namespace: IVLab.ABREngine
Assembly: IVLab.ABREngine.Runtime.dll
Syntax
[ABRPlateType("Surfaces")]
public class SimpleSurfaceDataImpression : DataImpression, IHasDataset, IHasKeyData, ICoordSpaceConverter
Examples
An example of creating a single surface data impression and setting its colormap, color variable, and texture could be:
SimpleSurfaceDataImpression gi = new SimpleSurfaceDataImpression();
gi.keyData = surfs;
gi.colorVariable = yAxis;
gi.colormap = ABREngine.Instance.VisAssets.GetDefault<ColormapVisAsset>() as ColormapVisAsset;
gi.lineTexture = tex;
ABREngine.Instance.RegisterDataImpression(gi);
Constructors
| Improve this Doc View SourceSimpleSurfaceDataImpression()
A "Surfaces" data impression that uses hand-drawn textures and color to show surface data.
Declaration
protected SimpleSurfaceDataImpression()
Examples
An example of creating a single surface data impression and setting its colormap, color variable, and texture could be:
SimpleSurfaceDataImpression gi = new SimpleSurfaceDataImpression();
gi.keyData = surfs;
gi.colorVariable = yAxis;
gi.colormap = ABREngine.Instance.VisAssets.GetDefault<ColormapVisAsset>() as ColormapVisAsset;
gi.lineTexture = tex;
ABREngine.Instance.RegisterDataImpression(gi);
Fields
| Improve this Doc View SourceLayerName
Define the layer name for this Data Impression
Declaration
protected const string LayerName = "ABR_Surface"
Field Value
Type | Description |
---|---|
string |
Remarks
Warning
New Data Impressions should define a const string "LayerName" which corresponds to a Layer in Unity's Layer manager.
colorVariable
Scalar color variable applied to each point of this data impression. This example switches between X-axis monotonically increasing and Y-axis monotonically increasing.
Declaration
[ABRInput("Color Variable", UpdateLevel.Style)]
public ScalarDataVariable colorVariable
Field Value
Type | Description |
---|---|
ScalarDataVariable |
colormap
Colormap applied to the colorVariable. This example switches between a linear white-to-green colormap and a linear black-to-white colormap.
Declaration
[ABRInput("Colormap", UpdateLevel.Style)]
public IColormapVisAsset colormap
Field Value
Type | Description |
---|---|
IColormapVisAsset |
keyData
A "Surfaces" data impression that uses hand-drawn textures and color to show surface data.
Declaration
[ABRInput("Key Data", UpdateLevel.Geometry)]
public KeyData keyData
Field Value
Type | Description |
---|---|
KeyData |
Examples
An example of creating a single surface data impression and setting its colormap, color variable, and texture could be:
SimpleSurfaceDataImpression gi = new SimpleSurfaceDataImpression();
gi.keyData = surfs;
gi.colorVariable = yAxis;
gi.colormap = ABREngine.Instance.VisAssets.GetDefault<ColormapVisAsset>() as ColormapVisAsset;
gi.lineTexture = tex;
ABREngine.Instance.RegisterDataImpression(gi);
|
Improve this Doc
View Source
nanColor
Override the color used for NaN values in this data impression. If not supplied, will use the defaultNanColor.
Declaration
[ABRInput("NaN Color", UpdateLevel.Style)]
public IColormapVisAsset nanColor
Field Value
Type | Description |
---|---|
IColormapVisAsset |
nanPattern
Override the pattern/texture used for NaN values in this data impression. If not supplied, will use the defaultNanTexture.
Declaration
[ABRInput("NaN Pattern", UpdateLevel.Style)]
public ISurfaceTextureVisAsset nanPattern
Field Value
Type | Description |
---|---|
ISurfaceTextureVisAsset |
onlyOutline
ONLY show the outline (don't show the actual surface)
Declaration
[ABRInput("Show Only Outline", UpdateLevel.Style)]
public BooleanPrimitive onlyOutline
Field Value
Type | Description |
---|---|
BooleanPrimitive |
opacity
Opacity of the surface - how see-through the surface is.
Declaration
[ABRInput("Opacity", UpdateLevel.Style)]
public PercentPrimitive opacity
Field Value
Type | Description |
---|---|
PercentPrimitive |
outlineColor
Color of the outline
Declaration
[ABRInput("Outline Color", UpdateLevel.Style)]
public IColormapVisAsset outlineColor
Field Value
Type | Description |
---|---|
IColormapVisAsset |
outlineWidth
Width (in Unity world coords) of the outline
Declaration
[ABRInput("Outline Width", UpdateLevel.Style)]
public LengthPrimitive outlineWidth
Field Value
Type | Description |
---|---|
LengthPrimitive |
pattern
The pattern/texture applied to the surface - can also be a SurfaceTextureGradient.
Declaration
[ABRInput("Pattern", UpdateLevel.Style)]
public ISurfaceTextureVisAsset pattern
Field Value
Type | Description |
---|---|
ISurfaceTextureVisAsset |
patternIntensity
Edit the intensity which the pattern is overlaid on the surface. 0% is not present at all, 10% is very faint, and 100% is full overlay.
Declaration
[ABRInput("Pattern Intensity", UpdateLevel.Style)]
public PercentPrimitive patternIntensity
Field Value
Type | Description |
---|---|
PercentPrimitive |
patternSaturation
Edit the saturation of the pattern(s) - 100% is full color, 0% is full grayscale.
Declaration
[ABRInput("Pattern Saturation", UpdateLevel.Style)]
public PercentPrimitive patternSaturation
Field Value
Type | Description |
---|---|
PercentPrimitive |
patternSeamBlend
Percentage to "blend" textures together at the seams to minimize the tiling effect. This example goes from 0% seam blend to 20% seam blend.
Declaration
[ABRInput("Pattern Seam Blend", UpdateLevel.Style)]
public PercentPrimitive patternSeamBlend
Field Value
Type | Description |
---|---|
PercentPrimitive |
patternSize
How large, in Unity meters, to make each "tile" of the texture/pattern on the surface. This example goes from 0.5m to 1m.
Declaration
[ABRInput("Pattern Size", UpdateLevel.Style)]
public LengthPrimitive patternSize
Field Value
Type | Description |
---|---|
LengthPrimitive |
patternVariable
Scalar variable used to vary the pattern across the surface.
Declaration
[ABRInput("Pattern Variable", UpdateLevel.Style)]
public ScalarDataVariable patternVariable
Field Value
Type | Description |
---|---|
ScalarDataVariable |
showOutline
Show/hide outline on this data impression (show the outline AND the actual surface)
Declaration
[ABRInput("Show Outline", UpdateLevel.Style)]
public BooleanPrimitive showOutline
Field Value
Type | Description |
---|---|
BooleanPrimitive |
Remarks
NOTE: Outlines work best on convex objects. The wavelet in this example shows some artifacts due to its concavity.
Properties
| Improve this Doc View SourceMaterialNames
Name of the material to use to render this DataImpression
Declaration
protected override string[] MaterialNames { get; }
Property Value
Type | Description |
---|---|
string[] |
Overrides
Methods
| Improve this Doc View SourceComputeGeometry()
RENDERING STEP 1. Populate rendering information (Geometry) for the DataImpression. This is triggered by the DataImpressionGroup when an Geometry happens. This step is generally expensive.
Declaration
public override void ComputeGeometry()
Overrides
| Improve this Doc View SourceGetDataset()
By default, there's no dataset. DataImpressions should only have one dataset, and it's up to them individually to enforce that they correctly implement this.
Declaration
public override Dataset GetDataset()
Returns
Type | Description |
---|---|
Dataset |
Overrides
| Improve this Doc View SourceGetKeyData()
By default, there's no data. DataImpressions should only have one KeyData, and it's up to them individually to enforce that they correctly implement this.
Declaration
public override KeyData GetKeyData()
Returns
Type | Description |
---|---|
KeyData |
Overrides
| Improve this Doc View SourceGetKeyDataTopology()
By default, there's no data. DataImpressions should only have one KeyData, and it's up to them individually to enforce that they correctly implement this.
Declaration
public override DataTopology GetKeyDataTopology()
Returns
Type | Description |
---|---|
DataTopology |
Overrides
| Improve this Doc View SourceSetKeyData(KeyData)
By default, there's no data. DataImpressions should only have one KeyData, and it's up to them individually to enforce that they correctly implement this.
Declaration
public override void SetKeyData(KeyData kd)
Parameters
Type | Name | Description |
---|---|---|
KeyData | kd |
Overrides
| Improve this Doc View SourceSetupGameObject()
RENDERING STEP 2. Take geometric rendering information computed in ComputeGeometry() and sets up proper game object(s) and components for this Data Impression. Transfers geometry into Unity format (e.g. a Mesh). No geometric computations should happen in this method, and it should generally be lightweight.
Declaration
public override void SetupGameObject()
Overrides
| Improve this Doc View SourceUpdateStyling()
RENDERING STEP 3. Update the "styling" of an impression by sending each styling parameter to the shader. Occasionally will need to set per-vertex items like transforms. This method should generally be lightweight.
Declaration
public override void UpdateStyling()
Overrides
| Improve this Doc View SourceUpdateVisibility()
RENDERING STEP 4. Update the visibility of an impression (hidden or shown)
Declaration
public override void UpdateVisibility()