QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Qwt3DColor Class Referenceabstract

Abstract base class for color functors. More...

#include <qwt3d_color.h>

Inheritance diagram for Qwt3DColor:
Qwt3DColorMapColor Qwt3DStandardColor

Public Member Functions

virtual RGBA operator() (double x, double y, double z) const =0
 
virtual RGBA operator() (Triple const &t) const
 
virtual ColorVector & createVector (ColorVector &vec)
 
void destroy () const
 
void setActiveRange (double zMin, double zMax)
 Sets the active z-range used for color normalization (pushed by the owning Qwt3DPlotItem before VBO/legend build)
 

Protected Member Functions

double activeZMin () const
 Lower bound of the active z-range (default 0.0)
 
double activeZMax () const
 Upper bound of the active z-range (default 1.0)
 

Detailed Description

Abstract base class for color functors.

Use your own color model by providing an implementation of operator()(double x, double y, double z). Colors destructor has been declared protected, in order to use only heap based objects. Plot3D will handle the objects destruction. See Qwt3DStandardColor for an example.

Qwt3DColor is a pure value object: it holds no back-pointer to its owner and never notifies anyone when its state mutates. The owning Qwt3DPlotItem is responsible for triggering a rebuild after an in-place mutation (see Qwt3DSurface::invalidateColors). The active z-range used for color normalization is pushed in by the owner via setActiveRange() before the functor is queried. This mirrors the 2D module, where QwtColorMap is a silent value object and QwtPlotSpectrogram::setColorMap() drives the notification.

Member Function Documentation

◆ createVector()

virtual ColorVector & Qwt3DColor::createVector ( ColorVector &  vec)
inlinevirtual

Reimplemented in Qwt3DStandardColor.

◆ operator()()

virtual RGBA Qwt3DColor::operator() ( double  x,
double  y,
double  z 
) const
pure virtual

Implemented in Qwt3DStandardColor.


The documentation for this class was generated from the following file: