Skip to content

PointMark3D

ClassChartGuruChartGuru.3D
public class PointMark3D : ChartMark3D, IChart3DMark, IChart3DDataMark, IChartMark

A 3D point mark. Swift Charts equivalent: PointMark(x: .Value(...), y: .Value(...), z: .Value(...)). Rendered as instanced spheres / cylinders / cones / cubes by the Chart3DMeshBuilder.

public PointMark3D(float x, float y, float z)

Creates a point at data coordinates (x, y, z), drawn as a sphere 0.03 plot units across until PointMark3D.Symbol(Symbol3D) or PointMark3D.SymbolSize(float) changes it.

Parameters

NameType
xSystem.Single
ySystem.Single
zSystem.Single
public PointMark3D(DataPoint3D point)

Creates a point at the coordinates of point, keeping its identity and other fields, drawn as the default sphere.

Parameters

NameType
pointChartGuru.DataPoint3D

PointMark3D(PlottableValue3D, PlottableValue3D, PlottableValue3D)

Section titled “PointMark3D(PlottableValue3D, PlottableValue3D, PlottableValue3D)”
public PointMark3D(PlottableValue3D x, PlottableValue3D y, PlottableValue3D z)

Creates a point at the numeric values of three PlottableValue3D values; a category or null value places it at 0 on that axis. Unlike PointMark3D.PointMark3D(PlottableValueRef, PlottableValueRef, PlottableValueRef), it keeps no category label.

Parameters

NameType
xChartGuru.PlottableValue3D
yChartGuru.PlottableValue3D
zChartGuru.PlottableValue3D

PointMark3D(PlottableValueRef, PlottableValueRef, PlottableValueRef)

Section titled “PointMark3D(PlottableValueRef, PlottableValueRef, PlottableValueRef)”
public PointMark3D(PlottableValueRef x, PlottableValueRef y, PlottableValueRef z)

Swift Charts-style constructor: PointMark(x: .Value(…), y: .Value(…), z: .Value(…)). Uses PlottableValueRef for named data binding.

Parameters

NameType
xChartGuru.PlottableValueRef
yChartGuru.PlottableValueRef
zChartGuru.PlottableValueRef

public PointMark3D Symbol(Symbol3D s)

Swift Charts equivalent: .Symbol(.sphere), .Symbol(.cylinder), etc.

Parameters

NameType
sChartGuru.Symbol3D

Returns

ChartGuru.PointMark3D

public PointMark3D Symbol(PlottableValueRef value)

Draws the point by symbol category, Swift Charts’ .symbol(by: .value(“Species”, species)): the chart’s symbol scale (Chart3DBuilder.ChartSymbolScale(Dictionary<string, Symbol3D>)) maps the key; without an entry, points that set no symbol of their own take spheres, cubes, cones and cylinders in the order their keys first appear in the chart.

Parameters

NameType
valueChartGuru.PlottableValueRef

Returns

ChartGuru.PointMark3D

public PointMark3D SymbolSize(float size)

The symbol’s diameter in plot units, like a 2D symbol size: a sphere’s or billboard’s diameter, a cube’s edge, a cylinder’s height and a cone’s height; custom meshes scale by it. Swift Charts 3D sizes a sphere by its radius, so .symbolSize(0.05) on a sphere is 0.1 here, which Swift imports and exports convert.

Parameters

NameType
sizeSystem.Single

Returns

ChartGuru.PointMark3D

public PointMark3D CustomMesh(Mesh mesh)

Custom mesh. Used when ChartGuru.PointMark3D._symbol is Symbol3D.Custom.

Parameters

NameType
meshUnityEngine.Mesh

Returns

ChartGuru.PointMark3D

public override void BuildMesh(Chart3DMeshContext ctx)

Write triangles / instanced draws for this mark into the context registry.

Parameters

NameType
ctxChartGuru.Chart3DMeshContext
public override IChartMark Clone()

Creates an independent copy of this point with its position, symbol, symbol key, size and style; a custom mesh is shared rather than copied, and later changes to either mark do not affect the other.

Returns

ChartGuru.IChartMark

protected void CopyPoint3DStateTo(PointMark3D target)

Copies what ChartMark3D.CopyCommon3DStateTo(ChartMark3D) copies plus the symbol, symbol key, symbol size and custom mesh onto target, for ChartMark.Clone() in derived marks.

Parameters

NameType
targetChartGuru.PointMark3D

public Symbol3D SymbolShape { get; }

The symbol set on the point, a sphere by default; a PointMark3D.SymbolKey can draw it as another one.

Returns

ChartGuru.Symbol3D

public object SymbolKey { get; }

The point’s symbol category, set by PointMark3D.Symbol(PlottableValueRef), which the chart’s symbol scale maps to a 3D symbol; null for a point drawn with its own symbol.

Returns

System.Object

public float SymbolSizeValue { get; }

Returns

System.Single

public Mesh CustomMeshValue { get; }

Returns

UnityEngine.Mesh

public override ChartType MarkType { get; }

Returns

ChartGuru.ChartType