Skip to content

Class QAccelPlot::PointCloudMaterial

ClassList > QAccelPlot > PointCloudMaterial

QSGMaterial for PointCloud rendering.More...

  • #include <PointCloudMaterial.hpp>

Inherits the following classes: QAccelPlot::DataTextureMaterial

Inheritance diagram

flowchart TB
  classQAccelPlot_1_1PointCloudMaterial["QAccelPlot::PointCloudMaterial"]

  classQAccelPlot_1_1DataTextureMaterial["QAccelPlot::DataTextureMaterial"]
  classQAccelPlot_1_1DataTextureMaterial --> classQAccelPlot_1_1PointCloudMaterial
  click classQAccelPlot_1_1DataTextureMaterial "../classQAccelPlot_1_1DataTextureMaterial/" "Open QAccelPlot::DataTextureMaterial"

  external_base_classQAccelPlot_1_1DataTextureMaterial_1["QSGMaterial"]
  external_base_classQAccelPlot_1_1DataTextureMaterial_1 --> classQAccelPlot_1_1DataTextureMaterial

Public Attributes

Type Name
float antialiasingEnabled = {1.0f}
1.0 when GPU anti-aliasing is active.
float antialiasingFeather = {1.0f}
Anti-aliasing feather width in pixels.
GradientTexture colorMap
Colormap lookup texture sampled at binding 2.
float markerFilled = {1.0f}
1.0 for filled markers, 0.0 for hollow outlines.
float markerSize = {3.0f}
Marker radius in pixels.
float markerStrokeWidth = {1.0f}
Outline width in pixels for hollow markers.
int shapeType = {0}
Marker shape: MarkerShape value minus one (0 = Circle).
float stride = {2.0f}
Floats per point in the data texture: 2 (x, y) or 3 (x, y, value).
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.

Public Attributes inherited from QAccelPlot::DataTextureMaterial

See QAccelPlot::DataTextureMaterial

Type Name
QColor color = {Qt::blue}
Line/fill color uniform.
std::shared_ptr< DataTexture > dataTexture
Data texture sampled by the shader. Materials drawing the same samples may share one.
QVector2D domainMax = {1.0f, 1.0f}
Maximum data-space coordinate.
QVector2D domainMin = {0.0f, 0.0f}
Minimum data-space coordinate.
float logScaleX = {0.0f}
1.0 when the X axis uses log scale (float for std140 UBO compatibility).
float logScaleY = {0.0f}
1.0 when the Y axis uses log scale (float for std140 UBO compatibility).
float useVertexColor = {0.0f}
1.0 when per-vertex color overrides color (float for std140 UBO compatibility).
QVector2D viewportSize = {800.0f, 600.0f}
Viewport size in pixels.

Public Functions

Type Name
PointCloudMaterial ()
Constructs a PointCloudMaterial with default uniform values.
QSGMaterialShader * createShader (QSGRendererInterface::RenderMode) override const
Creates and returns the point cloud shader program.
QSGMaterialType * type () override const
Returns the unique material type identifier for this class.

Public Functions inherited from QAccelPlot::DataTextureMaterial

See QAccelPlot::DataTextureMaterial

Type Name
DataTextureMaterial ()
Constructs an empty DataTextureMaterial .
int compare (const QSGMaterial * other) override const
Compares shared uniform fields; delegates type-specific fields to compareExtra() .
QSGTexture * sampledTexture () const
Returns the texture the shader samples, or nullptr beforedataTexture holds an upload.
void uploadTexture (QQuickWindow * window, const float * data, int floatCount)
Uploads floatCount raw floats from__data intodataTexture , creating it when it isnullptr .
~DataTextureMaterial () override

Public Static Functions inherited from QAccelPlot::DataTextureMaterial

See QAccelPlot::DataTextureMaterial

Type Name
const QSGGeometry::AttributeSet & attributeSet ()
Returns the shared vertex attribute set: {float id, float param, uchar4 color} (12 bytes).
void commitTexture (QSGMaterialShader::RenderState & state, int binding, QSGTexture ** texture, const DataTexture * data)
Commits the texture of data to sampler__binding (call fromupdateSampledImage ). Does nothing before an upload.
const QSGGeometry::AttributeSet & vertexIndexAttributeSet ()
Returns the attribute set of marker quads: one ignored uchar4 placeholder (4 bytes).
bool writeCommonUniforms (char * buf, int bufSize, const QMatrix4x4 & matrix, const DataTextureMaterial * mat)
Writes the shared UBO prefix (transform + color + domain + flags) into buf .

Protected Functions

Type Name
virtual int compareExtra (const QSGMaterial * other) override const
Compares point-cloud-specific uniforms and the colormap texture identity.

Protected Functions inherited from QAccelPlot::DataTextureMaterial

See QAccelPlot::DataTextureMaterial

Type Name
virtual int compareExtra (const QSGMaterial * other) const
Subclass hook for compare() — called after the shared fields compare equal.

Detailed Description

Point positions (and optional per-point values) are read from the inherited data texture with stride floats per point. In value-color mode (useVertexColor == 1) the fragment shader maps each value through colorMap.

** **

  • 116–119 float markerSize
  • 120–123 float antialiasingEnabled
  • 124–127 float antialiasingFeather
  • 128–131 float valueMin
  • 132–135 float valueMax
  • 136–139 float stride
  • 140–143 int shapeType
  • 144–147 float markerStrokeWidth
  • 148–151 float markerFilled
  • 152–155 float valueLogScale
  • 156–159 float opacity (inherited item opacity from the render state)

Public Attributes Documentation

variable antialiasingEnabled

1.0 when GPU anti-aliasing is active.

float QAccelPlot::PointCloudMaterial::antialiasingEnabled;


variable antialiasingFeather

Anti-aliasing feather width in pixels.

float QAccelPlot::PointCloudMaterial::antialiasingFeather;


variable colorMap

Colormap lookup texture sampled at binding 2.

GradientTexture QAccelPlot::PointCloudMaterial::colorMap;


variable markerFilled

1.0 for filled markers, 0.0 for hollow outlines.

float QAccelPlot::PointCloudMaterial::markerFilled;


variable markerSize

Marker radius in pixels.

float QAccelPlot::PointCloudMaterial::markerSize;


variable markerStrokeWidth

Outline width in pixels for hollow markers.

float QAccelPlot::PointCloudMaterial::markerStrokeWidth;


variable shapeType

Marker shape: MarkerShape value minus one (0 = Circle).

int QAccelPlot::PointCloudMaterial::shapeType;


variable stride

Floats per point in the data texture: 2 (x, y) or 3 (x, y, value).

float QAccelPlot::PointCloudMaterial::stride;


variable valueLogScale

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

float QAccelPlot::PointCloudMaterial::valueLogScale;


variable valueMax

Value mapped to colormap position 1.

float QAccelPlot::PointCloudMaterial::valueMax;


variable valueMin

Value mapped to colormap position 0.

float QAccelPlot::PointCloudMaterial::valueMin;


Public Functions Documentation

function PointCloudMaterial

Constructs a PointCloudMaterial with default uniform values.

QAccelPlot::PointCloudMaterial::PointCloudMaterial () 


function createShader

Creates and returns the point cloud shader program.

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


function type

Returns the unique material type identifier for this class.

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


Protected Functions Documentation

function compareExtra

Compares point-cloud-specific uniforms and the colormap texture identity.

virtual int QAccelPlot::PointCloudMaterial::compareExtra (
    const QSGMaterial * other
) override const

Implements QAccelPlot::DataTextureMaterial::compareExtra



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