lookupTable2D

geo.webgl. lookupTable2D

new lookupTable2D(arg) → {geo.webgl.lookupTable2D}

Description:
  • Create a new instance of class webgl_lookupTable2D.

Source:
Parameters:
Name Type Description
arg object

Options object.

Properties
Name Type Attributes Description
maxWidth number <optional>

Maximum width to use for the texture. If the number of colors set is less than this, the texture is 1D. If greater, it will be a rectangle of maxWidth x whatever height is necessary.

colorTable Array.<number> <optional>

Initial color table for the texture. This is of the form RGBARGBA... where each value is an integer on the scale [0,255].

Returns:
Type
geo.webgl.lookupTable2D

Extends

Methods

bind(renderState)

Description:
  • Create texture and if already created use it.

Source:
Inherited From:
Parameters:
Name Type Description
renderState vgl.renderState

colorTable(valopt) → {Array.<number>|this}

Description:
  • Get/set color table.

Source:
Parameters:
Name Type Attributes Description
val Array.<number> <optional>

An array of RGBARGBA... integers on a scale of [0, 255]. undefined to get the current value.

Returns:
Type
Array.<number> | this

computeInternalFormatUsingImage()

Description:
  • Compute internal format of the texture.

Source:
Inherited From:

image() → {vgl.image}

Description:
  • Get image used by the texture.

Source:
Inherited From:
Returns:
Type
vgl.image

maxWidth() → {number}

Description:
  • Get maxWidth value.

Source:
Returns:

The maxWidth of the texture used.

Type
number

nearestPixel() → {boolean}

Description:
  • Get nearest pixel flag for the texture.

Source:
Inherited From:
Returns:
Type
boolean

setImage(image) → {boolean}

Description:
  • Set image for the texture.

Source:
Inherited From:
Parameters:
Name Type Description
image vgl.image
Returns:
Type
boolean

setNearestPixel(nearest) → {boolean}

Description:
  • Set nearest pixel flag for the texture.

Source:
Inherited From:
Parameters:
Name Type Description
nearest boolean

pixel flag

Returns:
Type
boolean

setTextureUnit(unit) → {boolean}

Description:
  • Set texture unit of the texture. Default is 0.

Source:
Inherited From:
Parameters:
Name Type Description
unit number
Returns:
Type
boolean

setup(renderState)

Description:
  • Create lookup table, initialize parameters, and bind data to it.

Source:
Overrides:
Parameters:
Name Type Description
renderState vgl.renderState

An object that contains the context used for drawing.

textureHandle() → {number}

Description:
  • Return the texture handle.

Source:
Inherited From:
Returns:
Type
number

textureUnit() → {number}

Description:
  • Get texture unit of the texture.

Source:
Inherited From:
Returns:
Type
number

undoBind(renderState)

Description:
  • Turn off the use of this texture.

Source:
Inherited From:
Parameters:
Name Type Description
renderState vgl.renderState

updateDimensions()

Description:
  • Update texture dimensions.

Source:
Inherited From: