Surface3DSeries QML Type
在三维曲面图中表示数据序列。更多
| Import Statement: | import QtGraphs |
| In C++: | QSurface3DSeries |
| Inherits: |
- 所有成员(包括继承成员)列表
- Surface3DSeries 是Qt Graphs QML Types for 3D 的一部分。
属性
- baseColor : color
- baseGradient : Gradient
- colorStyle : GraphsTheme.ColorStyle
- dataArray : SurfaceDataArray
- dataProxy : SurfaceDataProxy
- drawMode : DrawFlag
- flatShadingSupported : bool
- invalidSelectionPosition : point
- itemLabel : string
- itemLabelFormat : string
- itemLabelVisible : bool
- lightingMode : Abstract3DSeries.LightingMode
(since 6.10) - mesh : Abstract3DSeries.Mesh
- meshRotation : quaternion
- meshSmooth : bool
- multiHighlightColor : color
- multiHighlightGradient : Gradient
- name : string
- selectedPoint : point
- shading : Shading
- singleHighlightColor : color
- singleHighlightGradient : Gradient
- textureFile : string
- type : Abstract3DSeries.SeriesType
- userDefinedMesh : string
- visible : bool
- wireframeColor : color
信号
- baseColorChanged(color color)
- baseGradientChanged(Gradient gradient)
- colorStyleChanged(GraphsTheme.ColorStyle style)
- dataArrayChanged(SurfaceDataArray array)
- dataProxyChanged(SurfaceDataProxy proxy)
- drawModeChanged(DrawFlag mode)
- flatShadingSupportedChanged(bool enable)
- itemLabelChanged(string label)
- itemLabelFormatChanged(string format)
- itemLabelVisibilityChanged(bool visible)
- lightingModeChanged(Abstract3DSeries.LightingMode lightingMode)
(since 6.10) - meshChanged(Abstract3DSeries.Mesh mesh)
- meshRotationChanged(quaternion rotation)
- meshSmoothChanged(bool enabled)
- multiHighlightColorChanged(color color)
- multiHighlightGradientChanged(Gradient gradient)
- nameChanged(string name)
- rowsSanitizedChanged(bool enabled)
- selectedPointChanged(point position)
- shadingChanged(const Shading shading)
- singleHighlightColorChanged(color color)
- singleHighlightGradientChanged(Gradient gradient)
- textureFileChanged(string filename)
- userDefinedMeshChanged(string fileName)
- visibilityChanged(bool visible)
- wireframeColorChanged(color color)
方法
- void setMeshAxisAndAngle(vector3d axis, real angle)
详细说明
该类型管理系列特定的可视化元素以及系列数据(通过数据代理)。
Surface3DSeries 支持以下 itemLabelFormat 格式标签:
| @xTitle | 来自 x 轴的标题 |
| @yTitle | 来自 y 轴的标题 |
| @zTitle | 来自 Z 轴的标题 |
| @xLabel | 使用 x 轴格式的项目值。更多信息,请参阅labelFormat 。 |
| @yLabel | 使用 Y 轴格式的项目值。更多信息,请参阅labelFormat 。 |
| @zLabel | 使用 Z 轴格式的项目值。更多信息,请参阅labelFormat 。 |
| @seriesName | 系列名称 |
有关更完整的说明,请参阅QSurface3DSeries 。
另请参阅 Qt Graphs 3D 数据处理。
属性文档
baseColor : color
该系列的基色。
另请参阅 colorStyle 和GraphsTheme.seriesColors 。
baseGradient : Gradient
系列的基准梯度。
另请参见 colorStyle 。
colorStyle : GraphsTheme.ColorStyle
该系列的色彩风格。
另请参见 GraphsTheme.ColorStyle 。
dataArray : SurfaceDataArray
保存数据数组的引用。
dataArrayChanged 设置数据数组时会发出信号,除非newDataArray 与前一个相同。
注意: 在对 dataArray 做任何操作之前,必须为相关代理创建一个系列。
dataProxy : SurfaceDataProxy
活动数据代理。该系列拥有任何设置给它的代理的所有权,并在添加新代理时删除任何以前设置的代理。代理不能为空或设置为其他系列。
drawMode : DrawFlag
将绘图模式设置为Surface3DSeries.DrawFlag{QSurface3DSeries.DrawFilledSurface} 中的一种。必须设置 DrawWireframe 或 DrawSurface
flatShadingSupported : bool [read-only]
表示当前系统是否支持曲面平面着色。它至少需要 GLSL 1.2 版本和 GL_EXT_gpu_shader4 扩展。
注意: 此只读属性会在第一次渲染后设置为正确值。在此之前,它始终是true 。
invalidSelectionPosition : point [read-only]
提供无效选择位置的常量属性。该位置将分配给selectedPoint 属性,以清除该系列中的选择。
另请参见 GraphsItem3D::clearSelection()。
itemLabel : string [read-only]
格式化的项目标签。如果没有选中项目或选中项目不可见,则返回空字符串。
另请参阅 itemLabelFormat 。
itemLabelFormat : string
本系列数据项的标签格式。该格式用于单个项目标签,例如,当选择一个项目时。如何解释格式取决于系列类型。
另请参阅 Bar3DSeries,Scatter3DSeries, 和Surface3DSeries 。
itemLabelVisible : bool
如果true ,项目标签将在图形中绘制为浮动标签。否则,不绘制项目标签。若要在外部控件中显示项目标签,则将此属性设置为false 。默认值为true 。
另请参阅 itemLabelFormat 和itemLabel 。
lightingMode : Abstract3DSeries.LightingMode [since 6.10]
系列中项目的照明模式。默认值为QAbstract3DSeries::LightingMode::Shaded
此属性在 Qt 6.10 中引入。
另请参阅 QAbstract3DSeries::LightingMode 。
mesh : Abstract3DSeries.Mesh
系列中项目的网格,或Surface3DSeries 情况下的选择指针。如果网格是Abstract3DSeries.Mesh.UserDefined ,则必须同时设置userDefinedMesh 属性才能正确渲染项目。默认值取决于图形类型。
另请参阅 QAbstract3DSeries::Mesh 。
meshRotation : quaternion
应用于系列中所有项目的网格旋转。旋转应为归一化四元数。Bar3DSeries 会忽略任何非绕 Y 轴的旋转。Surface3DSeries 只对选择指针应用旋转。默认为不旋转。
meshSmooth : bool
如果true ,将使用通过mesh 属性设置的预定义网格的平滑版本。当网格设置为Abstract3DSeries.Mesh.UserDefined 时,此属性不会影响使用的自定义网格。默认为false 。
multiHighlightColor : color
系列中多个项目的高亮颜色。
另请参阅 colorStyle 和GraphsTheme.multiHighlightColor 。
multiHighlightGradient : Gradient
系列中多个项目的高亮渐变。
另请参阅 colorStyle 和GraphsTheme.multiHighlightGradient 。
name : string
系列名称。可与标签@seriesName 一起用于项目标签格式。
另请参阅 itemLabelFormat 。
selectedPoint : point
将曲面网格点设置在所选系列数据数组中某一行和某一列指定的位置。一次只能选择一个点。
要清除此序列的选择,请将invalidSelectionPosition 指定为位置。如果将此序列添加到图表中,图表会根据用户交互或当选择无效时调整选择。
在所选点的行之前从系列中移除行或插入行都会调整选区,使同一点保持在选区中。
另请参见 GraphsItem3D::clearSelection()。
shading : Shading
将曲面平面阴影设置为可见。默认设置为Surface3DSeries.Shading.Flat 。禁用时,曲面上的法线会被内插,使边缘看起来更圆。可见时,三角形上的法线保持不变,三角形的颜色为纯色。这将使数据更容易从模型中读取。
注意: 平着色曲面至少需要 GLSL 1.2 版本和 GL_EXT_gpu_shader4 扩展。flatShadingSupported 属性的值表示运行时是否支持平面着色。
singleHighlightColor : color
系列中单个项目的高亮颜色。
另请参阅 colorStyle 和GraphsTheme.singleHighlightColor 。
singleHighlightGradient : Gradient
系列中单个项目的高亮渐变。
另请参阅 colorStyle 和GraphsTheme.singleHighlightGradient 。
textureFile : string
曲面纹理的纹理文件名。若要清除纹理,则设置一个空文件名。
type : Abstract3DSeries.SeriesType [read-only]
系列类型。QAbstract3DSeries::SeriesType 值之一。
userDefinedMesh : string
mesh 时使用的用户自定义对象网格的文件名是Abstract3DSeries.Mesh.UserDefined 。
注: 文件必须是QtQuick3D 网格格式。使用balsam 转换工具可从其他 3D 模型格式创建网格。
visible : bool
系列的可见性。如果false ,则不渲染系列。
wireframeColor : color
用于绘制曲面线框网格线的颜色。
信号文档
baseColorChanged(color color)
当baseColor 更改为color 时会发出该信号。
注: 相应的处理程序是onBaseColorChanged 。
baseGradientChanged(Gradient gradient)
当baseGradient 更改为gradient 时会发出该信号。
注: 相应的处理程序是onBaseGradientChanged 。
colorStyleChanged(GraphsTheme.ColorStyle style)
当colorStyle 更改为style 时会发出该信号。
注: 相应的处理程序是onColorStyleChanged 。
dataArrayChanged(SurfaceDataArray array)
当dataArray 更改为array 时会发出该信号。
注: 相应的处理程序是onDataArrayChanged 。
dataProxyChanged(SurfaceDataProxy proxy)
当dataProxy 更改为proxy 时会发出该信号。
注: 相应的处理程序是onDataProxyChanged 。
drawModeChanged(DrawFlag mode)
当drawMode 更改为mode 时会发出该信号。
注: 相应的处理程序是onDrawModeChanged 。
flatShadingSupportedChanged(bool enable)
当flatShadingSupported 更改为enable 时会发出该信号。
注: 相应的处理程序是onFlatShadingSupportedChanged 。
itemLabelChanged(string label)
当itemLabel 更改为label 时会发出该信号。
注: 相应的处理程序是onItemLabelChanged 。
itemLabelFormatChanged(string format)
当itemLabelFormat 更改为format 时会发出该信号。
注: 相应的处理程序是onItemLabelFormatChanged 。
itemLabelVisibilityChanged(bool visible)
当 itemLabelVisibility 变更为visible 时发出此信号。
注: 相应的处理程序是onItemLabelVisibilityChanged 。
[since 6.10] lightingModeChanged(Abstract3DSeries.LightingMode lightingMode)
当lightingMode 更改为lightingMode 时会发出该信号。
注: 相应的处理程序是onLightingModeChanged 。
此信号在 Qt 6.10 中引入。
meshChanged(Abstract3DSeries.Mesh mesh)
当mesh 更改为mesh 时会发出该信号。
注: 相应的处理程序是onMeshChanged 。
meshRotationChanged(quaternion rotation)
当meshRotation 更改为rotation 时会发出该信号。
注: 相应的处理程序是onMeshRotationChanged 。
meshSmoothChanged(bool enabled)
当meshSmooth 更改为enabled 时会发出该信号。
注: 相应的处理程序是onMeshSmoothChanged 。
multiHighlightColorChanged(color color)
当multiHighlightColor 更改为color 时会发出该信号。
注: 相应的处理程序是onMultiHighlightColorChanged 。
multiHighlightGradientChanged(Gradient gradient)
当multiHighlightGradient 更改为gradient 时会发出该信号。
注: 相应的处理程序是onMultiHighlightGradientChanged 。
nameChanged(string name)
当name 更改为name 时会发出该信号。
注: 相应的处理程序是onNameChanged 。
rowsSanitizedChanged(bool enabled)
当 rowsSanitized 变更为enabled 时,将发出此信号。
注: 相应的处理程序是onRowsSanitizedChanged 。
selectedPointChanged(point position)
当selectedPoint 更改为position 时会发出该信号。
注: 相应的处理程序是onSelectedPointChanged 。
shadingChanged(const Shading shading)
当shading 更改为shading 时会发出该信号。
注: 相应的处理程序是onShadingChanged 。
singleHighlightColorChanged(color color)
当singleHighlightColor 更改为color 时会发出该信号。
注: 相应的处理程序是onSingleHighlightColorChanged 。
singleHighlightGradientChanged(Gradient gradient)
当singleHighlightGradient 更改为gradient 时会发出该信号。
注: 相应的处理程序是onSingleHighlightGradientChanged 。
textureFileChanged(string filename)
当textureFile 更改为filename 时会发出该信号。
注: 相应的处理程序是onTextureFileChanged 。
userDefinedMeshChanged(string fileName)
当userDefinedMesh 更改为fileName 时会发出该信号。
注: 相应的处理程序是onUserDefinedMeshChanged 。
visibilityChanged(bool visible)
当系列可见性更改为visible 时,将发出此信号。
注: 相应的处理程序是onVisibilityChanged 。
wireframeColorChanged(color color)
当wireframeColor 更改为color 时会发出该信号。
注: 相应的处理程序是onWireframeColorChanged 。
方法文档
void setMeshAxisAndAngle(vector3d axis, real angle)
从axis 和angle 构建网格旋转四元数的便捷函数。
另请参见 meshRotation 。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.