Skip to content

Class QAccelPlot::HeatmapMaterial

ClassList > QAccelPlot > HeatmapMaterial

Material that colors each fragment by the value of the heatmap cell under it. More...

  • #include <HeatmapMaterial.hpp>

Inherits the following classes: QSGMaterial

Inheritance diagram

flowchart TB
  classQAccelPlot_1_1HeatmapMaterial["QAccelPlot::HeatmapMaterial"]

  external_base_classQAccelPlot_1_1HeatmapMaterial_1["QSGMaterial"]
  external_base_classQAccelPlot_1_1HeatmapMaterial_1 --> classQAccelPlot_1_1HeatmapMaterial

Public Attributes

Type Name
QVector2D cellOffset = {0.0f, 0.0f}
Offset of the cell mapping along X and Y.
QVector2D cellRate = {0.0f, 0.0f}
Per-pixel rate of the non-affine cell mappings along X and Y.
QVector2D cellScale = {1.0f, 1.0f}
Factor of the cell mapping along X and Y.
QVector2D cellShift = {0.0f, 0.0f}
log1p argument at pixel 0 of the logarithmic cell mappings along X and Y.
GradientTexture colorMap
Colormap lookup texture sampled at binding 2.
int columnMapping = {0}
Internal::HeatmapShaderMapping::Mode along X.
int columns = {0}
Cells per row.
int rowMapping = {0}
Internal::HeatmapShaderMapping::Mode along Y.
int rows = {0}
Number of rows.
float valueLogScale = {0.0f}
1.0 to place values on the ramp in log10 instead of linearly.
float valueMax = {1.0f}
Value mapped to colormap position 1.
float valueMin = {0.0f}
Value mapped to colormap position 0.
DataTexture values
Cell values, row by row, sampled at binding 1.

Public Functions

Type Name
HeatmapMaterial ()
Constructs a HeatmapMaterial with blending enabled and batching disabled.
int compare (const QSGMaterial * other) override const
Compares the uniforms and the texture identities.
QSGMaterialShader * createShader (QSGRendererInterface::RenderMode) override const
Creates and returns the heatmap shader program.
QSGMaterialType * type () override const
Returns the unique material type identifier for this class.

Detailed Description

Item-local pixels map to fractional cell coordinates per dimension, by the formula that columnMapping and rowMapping select from Internal::HeatmapShaderMapping::Mode. The fragment shader reads the cell value from values and looks up its color in colorMap.

Public Attributes Documentation

variable cellOffset

Offset of the cell mapping along X and Y.

QVector2D QAccelPlot::HeatmapMaterial::cellOffset;


variable cellRate

Per-pixel rate of the non-affine cell mappings along X and Y.

QVector2D QAccelPlot::HeatmapMaterial::cellRate;


variable cellScale

Factor of the cell mapping along X and Y.

QVector2D QAccelPlot::HeatmapMaterial::cellScale;


variable cellShift

log1p argument at pixel 0 of the logarithmic cell mappings along X and Y.

QVector2D QAccelPlot::HeatmapMaterial::cellShift;


variable colorMap

Colormap lookup texture sampled at binding 2.

GradientTexture QAccelPlot::HeatmapMaterial::colorMap;


variable columnMapping

Internal::HeatmapShaderMapping::Mode along X.

int QAccelPlot::HeatmapMaterial::columnMapping;


variable columns

Cells per row.

int QAccelPlot::HeatmapMaterial::columns;


variable rowMapping

Internal::HeatmapShaderMapping::Mode along Y.

int QAccelPlot::HeatmapMaterial::rowMapping;


variable rows

Number of rows.

int QAccelPlot::HeatmapMaterial::rows;


variable valueLogScale

1.0 to place values on the ramp in log10 instead of linearly.

float QAccelPlot::HeatmapMaterial::valueLogScale;


variable valueMax

Value mapped to colormap position 1.

float QAccelPlot::HeatmapMaterial::valueMax;


variable valueMin

Value mapped to colormap position 0.

float QAccelPlot::HeatmapMaterial::valueMin;


variable values

Cell values, row by row, sampled at binding 1.

DataTexture QAccelPlot::HeatmapMaterial::values;


Public Functions Documentation

function HeatmapMaterial

Constructs a HeatmapMaterial with blending enabled and batching disabled.

QAccelPlot::HeatmapMaterial::HeatmapMaterial () 


function compare

Compares the uniforms and the texture identities.

int QAccelPlot::HeatmapMaterial::compare (
    const QSGMaterial * other
) override const


function createShader

Creates and returns the heatmap shader program.

QSGMaterialShader * QAccelPlot::HeatmapMaterial::createShader (
    QSGRendererInterface::RenderMode
) override const


function type

Returns the unique material type identifier for this class.

QSGMaterialType * QAccelPlot::HeatmapMaterial::type () override const



The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/materials/HeatmapMaterial.hpp