SurfaceGrid3DMark
public sealed class SurfaceGrid3DMark : ChartMark3D, IChart3DMark, IChart3DDataMark, IChartMarkSerializable sampled surface mark used by scene-authored data sources.
Unlike SurfacePlotMark, this stores sampled points instead
of a delegate so scene data survives reloads.
Constructors
Section titled “Constructors”
SurfaceGrid3DMark(IEnumerable, int, int, SurfaceStyle)
Section titled “SurfaceGrid3DMark(IEnumerable, int, int, SurfaceStyle)”public SurfaceGrid3DMark(IEnumerable<DataPoint3D> samples, int resolutionX, int resolutionZ, SurfaceStyle style)Creates a surface through a copy of samples, a regular grid of resolutionX
by resolutionZ points (each clamped to 2 to 256) listed row by row with X varying fastest,
colored by style. It draws nothing with fewer samples than the grid needs, and a sample with a
NaN or infinite coordinate leaves a hole.
Parameters
| Name | Type |
|---|---|
samples | System.Collections.Generic.IEnumerable{ChartGuru.DataPoint3D} |
resolutionX | System.Int32 |
resolutionZ | System.Int32 |
style | ChartGuru.SurfaceStyle |
Methods
Section titled “Methods”
YRange(float, float)
Section titled “YRange(float, float)”public SurfaceGrid3DMark YRange(float min, float max)Sets the heights the height-based colors span without clipping geometry, like SurfacePlotMark.YRange(float, float)
and Swift Charts’ .foregroundStyle(.heightBased(yRange:)). Without it the colors span the chart’s explicit Y
domain when one is set, so a grid that streams new heights keeps its colors, and otherwise the heights it draws.
Parameters
| Name | Type |
|---|---|
min | System.Single |
max | System.Single |
Returns
ChartGuru.SurfaceGrid3DMark
BuildMesh(Chart3DMeshContext)
Section titled “BuildMesh(Chart3DMeshContext)”public override void BuildMesh(Chart3DMeshContext ctx)Write triangles / instanced draws for this mark into the context registry.
Parameters
| Name | Type |
|---|---|
ctx | ChartGuru.Chart3DMeshContext |
Clone()
Section titled “Clone()”public override IChartMark Clone()Creates an independent copy of this grid with its own copy of the samples, its resolution, surface style, color range and mark style; later changes to either mark do not affect the other.
Returns
ChartGuru.IChartMark
Properties
Section titled “Properties”
Samples
Section titled “Samples”public IReadOnlyList<DataPoint3D> Samples { get; }Returns
System.Collections.Generic.IReadOnlyList{ChartGuru.DataPoint3D}
ResolutionX
Section titled “ResolutionX”public int ResolutionX { get; }Returns
System.Int32
ResolutionZ
Section titled “ResolutionZ”public int ResolutionZ { get; }Returns
System.Int32
public SurfaceStyle Style { get; }Returns
ChartGuru.SurfaceStyle
YRangeValue
Section titled “YRangeValue”public Vector2? YRangeValue { get; }The heights the height-based colors span, set by SurfaceGrid3DMark.YRange(float, float); null when unset.
Returns
System.Nullable{UnityEngine.Vector2}
MarkType
Section titled “MarkType”public override ChartType MarkType { get; }Returns
ChartGuru.ChartType