ColorTransferFunction

ColorTransferFunction()

The ColorTransferFunction class represents a color segmentation function.

Methods

addRGBPoint()

Add the x and corresponding y coordinates of a piecewise point of the piecewise function.

getColor()

Get the x-corresponding color value on the piecewise function.

getSize()

Returns the number of segmentation points of the piecewise function.

getTable()

Discretize the y of the piecewise function and fill it into an array. Among them, xStart and xEnd are the start and end positions of the x values ​​on the piecewise function. size is the size of the array to fill. table is an output item, of type Float32Array, which is the array to be filled.

removeAllPoints()

Removes all piecewise points of the piecewise function.

removePoint()

Remove the piecewise point at the x position of the piecewise function.