本页内容

Qt3DRender::QPointSize Class

class Qt3DRender::QPointSize

指定栅格化点的大小。既可以静态设置,也可以通过着色器程序设置。更多...

头文件: #include <qpointsize.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
在 QML 中: PointSize
继承自: Qt3DRender::QRenderState
状态: 已弃用

该类已弃用。我们强烈建议不要在新代码中使用它。

公共类型

enum SizeMode { Fixed, Programmable }

属性

公共函数

Qt3DRender::QPointSize::SizeMode sizeMode() const
float value() const

公共槽位

void setSizeMode(Qt3DRender::QPointSize::SizeMode sizeMode)
void setValue(float value)

信号

void sizeModeChanged(Qt3DRender::QPointSize::SizeMode sizeMode)
void valueChanged(float value)

详细说明

当sizeMode 属性设置为SizeMode::Fixed 时,如果可用,则使用glPointSize()设置该值。当使用SizeMode::Programmable 时,必须在着色器程序中设置gl_PointSize,在这种情况下,提供给此RenderState 的值将被忽略。

成员类型文档

enum QPointSize::SizeMode

此枚举指定了大小模式的值。

常量值描述
Qt3DRender::QPointSize::Fixed0点大小由QPointSize::value 定义。
Qt3DRender::QPointSize::Programmable1点大小值必须在着色器中设置

属性文档

sizeMode : SizeMode

指定要使用的 sizeMode。

访问函数:

Qt3DRender::QPointSize::SizeMode sizeMode() const
void setSizeMode(Qt3DRender::QPointSize::SizeMode sizeMode)

通知器信号:

void sizeModeChanged(Qt3DRender::QPointSize::SizeMode sizeMode)

value : float

指定要使用的点大小值。

访问函数:

float value() const
void setValue(float value)

通知信号:

void valueChanged(float value)

© 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.