|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
3D line/curve plot item with VBO/VAO rendering 更多...
#include <qwt3d_line3d.h>
类 | |
| class | PrivateData |
Public 类型 | |
| enum | LineStyle { Lines , Tube , Dots } |
| Line rendering style 更多... | |
| enum | PointShape { Dot , Cube , Tetrahedron , Octahedron , Sphere } |
| Point marker shape for the Dots style and the point-marker overlay 更多... | |
Public 成员函数 | |
| Qwt3DLine () | |
| Constructs an empty line item | |
| ~Qwt3DLine () override | |
| Destructor — releases GL resources and data | |
| void | setSamples (const QVector< QwtPoint3D > &samples) |
| Set samples from a vector of 3D points | |
| void | setSamples (const QVector< double > &x, const QVector< double > &y, const QVector< double > &z) |
| Set samples from parallel x, y, z arrays | |
| void | setSamples (const QwtPoint3D *samples, size_t count) |
| Set samples from a raw array of 3D points (not held; copied internally) | |
| void | setSamples (QwtSeriesData< QwtPoint3D > *data) |
| Set the series data object (item takes ownership) | |
| const QwtSeriesData< QwtPoint3D > * | data () const |
| Returns the series data | |
| size_t | dataSize () const |
| Returns the number of samples | |
| LineStyle | lineStyle () const |
| Returns the line style | |
| void | setLineStyle (LineStyle style) |
| Sets the line style | |
| double | lineWidth () const |
| Returns the GL line width (Lines style only; > 1 not guaranteed in Core) | |
| void | setLineWidth (double width) |
| Sets the GL line width (Lines style only) | |
| double | tubeRadius () const |
| Returns the tube radius (<= 0 means auto = 0.5% of hull diagonal) | |
| void | setTubeRadius (double radius) |
| Sets the tube radius (<= 0 selects auto) | |
| int | tubeSegments () const |
| Returns the tube ring segment count | |
| void | setTubeSegments (int segments) |
| Sets the tube ring segment count (minimum 3) | |
| double | pointSize () const |
| Returns the point size (Dots style / point markers) | |
| void | setPointSize (double size) |
| Sets the point size (Dots style / point markers) | |
| bool | pointVisible () const |
| Returns true if point markers are drawn on top of Lines/Tube styles | |
| void | setPointVisible (bool on) |
| Draw point markers on top of Lines/Tube styles | |
| PointShape | pointShape () const |
| Returns the point marker shape | |
| void | setPointShape (PointShape shape) |
| Sets the point marker shape (Dot/Cube/Tetrahedron/Octahedron/Sphere) | |
| void | setColor (RGBA color) |
| Sets the solid line color | |
| RGBA | color () const |
| Returns the solid line color | |
| void | setDataColor (Qwt3DColor *color) |
| Sets the data color functor for per-vertex coloring (takes ownership) | |
| const Qwt3DColor * | dataColor () const |
| Returns the data color functor | |
| void | invalidateColors () |
| Marks per-vertex colors as stale, triggering a VBO rebuild on the next draw | |
| int | rtti () const override |
| 运行时类型信息 | |
| void | draw () override |
| Draw the item using the current GL context | |
| ParallelEpiped | hull () const override |
| Get the bounding hull of the item in 3D space | |
| void | populateLegendColors (ColorVector &colors) const override |
| Populate the legend color vector from the item's color functor | |
Public 成员函数 继承自 Qwt3DPlotItem | |
| Qwt3DPlotItem () | |
| Default constructor | |
| virtual | ~Qwt3DPlotItem () |
| Destructor — detaches from any plot | |
| void | attach (Qwt3DPlot *plot) |
| Attach the item to a plot | |
| void | detach () |
| Detach the item from its plot | |
| Qwt3DPlot * | plot () const |
| Get the plot this item is attached to | |
| void | setTitle (const QString &title) |
| Set the item title | |
| QString | title () const |
| Get the item title | |
| void | setZ (double z) |
| Set the z-order value (controls draw sequence) | |
| double | z () const |
| Get the z-order value | |
| void | setVisible (bool on) |
| Set item visibility | |
| bool | isVisible () const |
| Check if the item is visible | |
| virtual void | itemChanged () |
| Notify the plot that the item has changed | |
3D line/curve plot item with VBO/VAO rendering
Qwt3DLine is a Qwt3DPlotItem that renders a polyline through 3D space using modern OpenGL (VBO/VAO + GLSL shaders). It accepts a series of QwtPoint3D samples and draws them as a connected curve.
Three rendering styles are provided:
Colors may be solid (setColor) or driven per-vertex by a Qwt3DColor functor (setDataColor), e.g. to color the curve by position or arc length.
| enum Qwt3DLine::LineStyle |
|
overridevirtual |
Draw the item using the current GL context
实现了 Qwt3DPlotItem.
|
overridevirtual |
Get the bounding hull of the item in 3D space
实现了 Qwt3DPlotItem.
|
overridevirtual |
Populate the legend color vector from the item's color functor
重载 Qwt3DPlotItem .
|
overridevirtual |