Table of Contents

Class SurfaceSeries3DBase

Namespace
LightningChartLib.WinForms.Charting.Series3D
Assembly
LightningChart.WinForms.Charting.NET4.dll

Surface series base.

public class SurfaceSeries3DBase : SeriesBase3D, IChartNode, IDisposable, IHighlightingItem
Inheritance
SurfaceSeries3DBase
Implements
Derived
Inherited Members

Constructors

SurfaceSeries3DBase()

LightningChartLib.WinForms.Charting.Series3D.SurfaceSeries3DBase
public SurfaceSeries3DBase()

SurfaceSeries3DBase(View3D, Axis3DBinding, Axis3DBinding, Axis3DBinding)

Constructor

public SurfaceSeries3DBase(View3D owner, Axis3DBinding xAxis, Axis3DBinding yAxis, Axis3DBinding zAxis)

Parameters

owner View3D

Parent.

xAxis Axis3DBinding

X-axis you want to bind.

yAxis Axis3DBinding

Y-axis you want to bind. You can give null if X axis binding is used.

zAxis Axis3DBinding

Z-axis you want to bind.

Properties

AllowCellTrace

Allow tracing of the surface cell when user interactive device is over.

public bool AllowCellTrace { get; set; }

Property Value

bool

BaseColor

Base color for filling.

public Color BaseColor { get; set; }

Property Value

Color

ColorSaturation

Surface fill color saturation. High value gives brighter colors.

public double ColorSaturation { get; set; }

Property Value

double

ContourLineColor

Contour line color.

public Color ContourLineColor { get; set; }

Property Value

Color

ContourPalette

Color palette for Y value information.

public ValueRangePalette ContourPalette { get; set; }

Property Value

ValueRangePalette

Data

Series 3D point data.

public SurfacePoint[,] Data { get; set; }

Property Value

SurfacePoint[,]

DisableDepthTest

Disable depth buffer test. Disabling this improves performance, but may cause erroneous painting order of objects.

public bool DisableDepthTest { get; set; }

Property Value

bool

FadeAway

Fade away surface/waterfall towards back (higher data row numbers), with given percent. Valid range is from 0(no fadeaway) to 100 (full fadeaway).

public double FadeAway { get; set; }

Property Value

double

FastContourZoneHeight

Height (Y-axis value range) for fast contour zones. The fast contour zone is a contour line equivalent.

public double FastContourZoneHeight { get; set; }

Property Value

double

InitialValue

Initial value for data Y. Clears the series. It is applied when creating or resizing Data array.

public double InitialValue { get; set; }

Property Value

double

RenderingOrder

Drawing order related to PointLineSeries.

public SurfaceRenderingOrder RenderingOrder { get; set; }

Property Value

SurfaceRenderingOrder

SizeX

Grid size in X dimension (Data array columns).

public int SizeX { get; set; }

Property Value

int

SizeZ

Grid size in Z dimension (Data array rows).

public int SizeZ { get; set; }

Property Value

int

SuppressLighting

Suppress all light calculations on this surface series.

public bool SuppressLighting { get; set; }

Property Value

bool

Title

Series title

public SeriesTitle3D Title { get; set; }

Property Value

SeriesTitle3D

ToneColor

Solid fill tone color

public Color ToneColor { get; set; }

Property Value

Color

WireframeLineStyle

Wireframe line style.

public LineStyle3D WireframeLineStyle { get; set; }

Property Value

LineStyle3D

WireframeOffset

Wireframe shift amount from fill. Keep some amount of shift, to avoid 3D render engine Z buffer fighting.

public PointDoubleXYZ WireframeOffset { get; set; }

Property Value

PointDoubleXYZ

Methods

CheckSurfaceSizeForGPU(int, int)

Check if the given surface size can be used with the GPU. GPU index buffer capacity is verified.

public bool CheckSurfaceSizeForGPU(int gridSizeX, int gridSizeZ)

Parameters

gridSizeX int

X size.

gridSizeZ int

Z size.

Returns

bool

True if index buffer size on the GPU is sufficient, else false.

Clear()

Clears the series by setting Data Y values to InitialValues. Sets the data point colors to BaseColor.

public override void Clear()

CreateMaterial()

Create material.

protected override void CreateMaterial()

CreateNewDataArray(int, int)

Create new data array.

public virtual void CreateNewDataArray(int sizeX, int sizeZ)

Parameters

sizeX int

X size.

sizeZ int

Z size.

CreatePalette()

Create palette.

protected virtual void CreatePalette()

CreateTitle()

Create title.

protected virtual void CreateTitle()

CreateWireframeOffset()

Create wireframe offset.

protected virtual void CreateWireframeOffset()

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if managed resources should be disposed, otherwise false.

DisposeStaticBuffers(bool, bool, bool)

Free all vertex and index buffer data

protected void DisposeStaticBuffers(bool disposeVertexBuffers, bool disposeIndexBuffers, bool disposeSurfaceCache)

Parameters

disposeVertexBuffers bool
param disposeVertexBuffers M:LightningChartLib.WinForms.Charting.Series3D.SurfaceSeries3DBase.DisposeStaticBuffers(System.Boolean,System.Boolean,System.Boolean)
disposeIndexBuffers bool
param disposeIndexBuffers M:LightningChartLib.WinForms.Charting.Series3D.SurfaceSeries3DBase.DisposeStaticBuffers(System.Boolean,System.Boolean,System.Boolean)
disposeSurfaceCache bool
param disposeSurfaceCache M:LightningChartLib.WinForms.Charting.Series3D.SurfaceSeries3DBase.DisposeStaticBuffers(System.Boolean,System.Boolean,System.Boolean)

GetDataColor(int, int)

Get color from Data array value.

public Color GetDataColor(int columnIndex, int rowIndex)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

Returns

Color

Color. If invalid index is given, returns Color.Black.

GetDataColor(int, int, out Color)

Get color from Data array value.

public bool GetDataColor(int columnIndex, int rowIndex, out Color color)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

color Color

Color.

Returns

bool

True, if indexes at valid range, otherwise false and outputs Color.Black.

GetDataValue(int, int)

Get value from Data array value.

public double GetDataValue(int columnIndex, int rowIndex)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

Returns

double

Z value. If invalid index is given, returns 0.

GetDataValue(int, int, out double)

Get value from Data array value.

public bool GetDataValue(int columnIndex, int rowIndex, out double value)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

value double

Data value at position. Zero, in case of failure.

Returns

bool

True, if indexes at valid range, otherwise false.

GetDataXValue(int, int)

Get Data array X value.

public double GetDataXValue(int columnIndex, int rowIndex)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

Returns

double

X value. If invalid index is given, returns 0.

GetDataXValue(int, int, out double)

Get Data array X value.

public bool GetDataXValue(int columnIndex, int rowIndex, out double value)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

value double

X-value at position. Zero, in case of failure.

Returns

bool

True, if indexes at valid range, otherwise false.

GetDataYValue(int, int)

Get Data array Y value.

public double GetDataYValue(int columnIndex, int rowIndex)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

Returns

double

Y value. If invalid index is given, returns 0.

GetDataYValue(int, int, out double)

Get Data array Y value.

public bool GetDataYValue(int columnIndex, int rowIndex, out double value)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

value double

Y-value at position. Zero, in case of failure.

Returns

bool

True, if indexes at valid range, otherwise false.

GetDataZValue(int, int)

Get Data array Z value.

public double GetDataZValue(int columnIndex, int rowIndex)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

Returns

double

Z value. If invalid index is given, returns 0.

GetDataZValue(int, int, out double)

Get Data array Z value.

public bool GetDataZValue(int columnIndex, int rowIndex, out double value)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

value double

Z-value at position. Zero, in case of failure.

Returns

bool

True, if indexes at valid range, otherwise false.

HandleOver()

General handler for mouse over event. Check also mouse hit columns.

protected override void HandleOver()

IsPositionOver(int, int, out int, out int, bool)

Detect if position is over the series. Also solves the column and row index where position is over of.

public bool IsPositionOver(int x, int y, out int hitColumnIndex, out int hitRowIndex, bool useDIP = false)

Parameters

x int

Screen X coordinate

y int

Screen Y coordinate

hitColumnIndex int

Column index. If failed, contains -1

hitRowIndex int

Row index. If failed, contains -1

useDIP bool

Use DIPs instead of pixels

Returns

bool

True if position is over the series

LoadFromCSV(string, SeparatorCSV)

Loads series data from a CSV file.

public override bool LoadFromCSV(string file, SeparatorCSV separator)

Parameters

file string

CSV file. If file does not exist, LoadFromCSV returns false.

separator SeparatorCSV

Value and floating point number separator.

Returns

bool

True if import succeeds. Otherwise false.

OnDeserialized(StreamingContext)

OnDeserialized is called just after the object has been deserialized

[OnDeserialized]
protected void OnDeserialized(StreamingContext context)

Parameters

context StreamingContext

Context

RefreshRenderingData()

Rebuilds rendering data. Expert's method for allowing multi-threaded application to pre-build rendering data before rendering stage. Rendering stage must always be synchronized to main thread, but this call can be called parallel for every series of this type.

public void RefreshRenderingData()

SaveToCSV(string, SeparatorCSV)

Saves series data into CSV file.

public override bool SaveToCSV(string file, SeparatorCSV separator)

Parameters

file string

Target file. If file already exists, it will be overwritten.

separator SeparatorCSV

Value and floating point number separator definition.

Returns

bool

True if export is successful.

SetDataValue(int, int, double, double, double, double, Color)

Set data values from X, Y, Z and color.

public bool SetDataValue(int columnIndex, int rowIndex, double x, double y, double z, double value, Color color)

Parameters

columnIndex int

Column index of Data array.

rowIndex int

Row index of Data array.

x double

X value.

y double

Y value.

z double

Z value.

value double

Value.

color Color

Color. Effects only if Fill is set to SourcePointColoring.

Returns

bool

False if invalid index. Otherwise true.

Remarks

Does not invalidate data. Use Invalidate() method after setting all Data array items.

SetHeightDataFromBitmap(double, double, double, double, double, double, Bitmap, BitmapAntialiasOptions, bool)

Create data based on bitmap file contents. Data array will have dimensions of the bitmap Width X Height. Use options to reduce resolution and smooth it if needed. Height data of is calculated for each pixel from R, G, and B sum. 0 (black) will have the minimum value, and maximum value is obtained from 3*255 (white). If bitmap has alpha value of 0, the data is set to -INF, and the value is not drawn.

public bool SetHeightDataFromBitmap(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax, Bitmap bitmap, BitmapAntialiasOptions options, bool setNegativeInfinityForAlpha0)

Parameters

xMin double

Minimum X.

xMax double

Maximum X.

yMin double

Minimum Y.

yMax double

Maximum Y.

zMin double

Minimum Z.

zMax double

Maximum Z.

bitmap Bitmap

Input bitmap.

options BitmapAntialiasOptions

Bitmap resolution decrement and smoothing options. Give null to use pure bitmap data only.

setNegativeInfinityForAlpha0 bool

Sets NegativeInfinity when bitmap pixel has alpha = 0.

Returns

bool

True if data was successfully filled, else false.

SetSize(int, int)

Set grid size, both X and Z at same time. If you already have a large existing data, using this method is faster than setting SizeX and SizeZ separately.

public void SetSize(int sizeX, int sizeZ)

Parameters

sizeX int

X size.

sizeZ int

Z size.

SolveNearestDataPointByCoord(int, int, out SurfacePoint, out int, out int)

Solve nearest data point to given screen coordinate [input in DIP]. Takes the data point distance from camera into account. Only solves the point when coordinate is over the surface.

public bool SolveNearestDataPointByCoord(int xCoordinate, int yCoordinate, out SurfacePoint nearestPoint, out int columnIndex, out int rowIndex)

Parameters

xCoordinate int

X screen coordinate as DIP

yCoordinate int

Y screen coordinate as DIP

nearestPoint SurfacePoint

Nearest point solved

columnIndex int

Column index in Data array

rowIndex int

Row index in Data array

Returns

bool

True if solved, else false.

ToString()

Item to string.

public override string ToString()

Returns

string
returns M:LightningChartLib.WinForms.Charting.Series3D.SurfaceSeries3DBase.ToString

Events

TraceCellChanged

Occurs when the user interactive device has been moved over to a different surface series cell.

public virtual event SurfaceSeries3DBase.TraceCellChangedEventHandler TraceCellChanged

Event Type

SurfaceSeries3DBase.TraceCellChangedEventHandler