QGeometryRenderer Class

class Qt3DRender::QGeometryRenderer

지오메트리 렌더링을 캡슐화합니다. 더 보기...

Header: #include <QGeometryRenderer>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
QML에서: GeometryRenderer
상속합니다: Qt3DCore::QBoundingVolume
상속받는 사람:

Qt3DExtras::QConeMesh, Qt3DExtras::QCuboidMesh, Qt3DExtras::QCylinderMesh, Qt3DExtras::QExtrudedTextMesh, Qt3DExtras::QPlaneMesh, Qt3DExtras::QSphereMesh, Qt3DExtras::QTorusMesh, and Qt3DRender::QMesh

Status: Deprecated

공개 유형

enum PrimitiveType { Points, Lines, LineLoop, LineStrip, Triangles, …, Patches }

속성

공용 기능

QGeometryRenderer(Qt3DCore::QNode *parent = nullptr)
int firstInstance() const
int firstVertex() const
Qt3DCore::QGeometry *geometry() const
int indexBufferByteOffset() const
int indexOffset() const
int instanceCount() const
bool primitiveRestartEnabled() const
Qt3DRender::QGeometryRenderer::PrimitiveType primitiveType() const
int restartIndexValue() const
float sortIndex() const
int vertexCount() const
int verticesPerPatch() const

공용 슬롯

void setFirstInstance(int firstInstance)
void setFirstVertex(int firstVertex)
void setGeometry(Qt3DCore::QGeometry *geometry)
void setIndexBufferByteOffset(int offset)
void setIndexOffset(int indexOffset)
void setInstanceCount(int instanceCount)
void setPrimitiveRestartEnabled(bool enabled)
void setPrimitiveType(Qt3DRender::QGeometryRenderer::PrimitiveType primitiveType)
void setRestartIndexValue(int index)
void setSortIndex(float sortIndex)
void setVertexCount(int vertexCount)
void setVerticesPerPatch(int verticesPerPatch)

신호

void firstInstanceChanged(int firstInstance)
void firstVertexChanged(int firstVertex)
void geometryChanged(Qt3DCore::QGeometry *geometry)
void indexBufferByteOffsetChanged(int offset)
void indexOffsetChanged(int indexOffset)
void instanceCountChanged(int instanceCount)
void primitiveRestartEnabledChanged(bool primitiveRestartEnabled)
void primitiveTypeChanged(Qt3DRender::QGeometryRenderer::PrimitiveType primitiveType)
void restartIndexValueChanged(int restartIndexValue)
void sortIndexChanged(float sortIndex)
void vertexCountChanged(int vertexCount)
void verticesPerPatchChanged(int verticesPerPatch)

상세 설명

Qt3DRender::QGeometryRendererQt3DCore::QGeometry 을 그리는 데 필요한 모든 정보를 보유합니다. QGeometry 는 지오메트리 데이터의 좌표를 보유하며, QGeometryRenderer 는 해당 데이터를 해석하는 방법을 지정합니다.

멤버 유형 문서

enum QGeometryRenderer::PrimitiveType

프리미티브의 유형입니다.

Constant설명
Qt3DRender::QGeometryRenderer::Points0x0000점 목록
Qt3DRender::QGeometryRenderer::Lines0x0001선 목록
Qt3DRender::QGeometryRenderer::LineLoop0x0002루프를 형성하는 끝에서 연결된 선의 연결된 그룹
Qt3DRender::QGeometryRenderer::LineStrip0x0003연결된 선의 그룹
Qt3DRender::QGeometryRenderer::Triangles0x0004삼각형 목록
Qt3DRender::QGeometryRenderer::TriangleStrip0x0005연결된 삼각형 목록
Qt3DRender::QGeometryRenderer::TriangleFan0x0006모든 트라이앵글이 첫 번째 버텍스를 공유하는 연결된 트라이앵글의 목록입니다.
Qt3DRender::QGeometryRenderer::LinesAdjacency0x000A지오메트리 셰이더가 선 목록에서 인접한 선에 액세스할 수 있도록 허용합니다.
Qt3DRender::QGeometryRenderer::TrianglesAdjacency0x000C지오메트리 셰이더가 트라이앵글 목록에서 인접한 트라이앵글에 액세스할 수 있도록 허용합니다.
Qt3DRender::QGeometryRenderer::LineStripAdjacency0x000B지오메트리 셰이더가 선 스트립에서 인접한 선에 액세스할 수 있도록 허용합니다.
Qt3DRender::QGeometryRenderer::TriangleStripAdjacency0x000D지오메트리 셰이더가 삼각형 스트립에서 인접한 삼각형에 액세스할 수 있도록 허용합니다.
Qt3DRender::QGeometryRenderer::Patches0x000E패치가 임의의 수의 버텍스로 구성된 테셀레이션 셰이더에서 허용되는 프리미티브 유형만 허용됩니다.

프로퍼티 문서

firstInstance : int

기본 인스턴스를 보유합니다.

함수에 액세스합니다:

int firstInstance() const
void setFirstInstance(int firstInstance)

알림 신호:

void firstInstanceChanged(int firstInstance)

firstVertex : int

베이스 버텍스를 보유합니다.

함수에 액세스합니다:

int firstVertex() const
void setFirstVertex(int firstVertex)

알림 신호:

void firstVertexChanged(int firstVertex)

geometry : Qt3DCore::QGeometry*

지오메트리를 보유합니다.

함수에 액세스합니다:

Qt3DCore::QGeometry *geometry() const
void setGeometry(Qt3DCore::QGeometry *geometry)

알림 신호:

void geometryChanged(Qt3DCore::QGeometry *geometry)

indexBufferByteOffset : int

인덱스 버퍼에 바이트 오프셋을 보관합니다.

함수에 액세스합니다:

int indexBufferByteOffset() const
void setIndexBufferByteOffset(int offset)

알림 신호:

void indexBufferByteOffsetChanged(int offset)

indexOffset : int

베이스 버텍스를 보유합니다.

함수에 액세스합니다:

int indexOffset() const
void setIndexOffset(int indexOffset)

알림 신호:

void indexOffsetChanged(int indexOffset)

instanceCount : int

인스턴스 수를 보유합니다.

함수에 액세스합니다:

int instanceCount() const
void setInstanceCount(int instanceCount)

알림 신호:

void instanceCountChanged(int instanceCount)

primitiveRestartEnabled : bool

원시 재시작 플래그를 보유합니다.

기능에 액세스합니다:

bool primitiveRestartEnabled() const
void setPrimitiveRestartEnabled(bool enabled)

알림 신호:

void primitiveRestartEnabledChanged(bool primitiveRestartEnabled)

primitiveType : PrimitiveType

원시 유형을 보유합니다.

기능에 액세스합니다:

Qt3DRender::QGeometryRenderer::PrimitiveType primitiveType() const
void setPrimitiveType(Qt3DRender::QGeometryRenderer::PrimitiveType primitiveType)

알림 신호:

void primitiveTypeChanged(Qt3DRender::QGeometryRenderer::PrimitiveType primitiveType)

restartIndexValue : int

재시작 인덱스를 보유합니다.

기능에 액세스합니다:

int restartIndexValue() const
void setRestartIndexValue(int index)

알림 신호:

void restartIndexValueChanged(int restartIndexValue)

[since 6.0] sortIndex : float

뎁스 정렬이 활성화된 경우 정렬 인덱스를 재정의합니다.

프레임 그래프에서 뎁스 정렬이 활성화된 경우 렌더러는 바운딩 볼륨의 중심이 카메라에서 얼마나 멀리 떨어져 있는지에 따라 오브젝트를 정렬하고 가장 먼 오브젝트부터 가장 가까운 오브젝트까지 렌더링합니다.

이 속성을 사용하여 깊이 인덱스를 재정의하고 오브젝트가 렌더링되는 순서를 정밀하게 제어할 수 있습니다. 모든 오브젝트가 카메라에서 동일한 물리적 거리에 있을 때 유용합니다.

실제 값은 중요하지 않으며 오브젝트를 정렬하는 순서를 정의할 뿐입니다. 가장 작은 값을 가진 오브젝트가 먼저 그려진 다음 두 번째로 작은 오브젝트가 그려지는 식으로 정렬됩니다.

참고: -1.f로 설정하면 이 엔티티에 대한 명시적 정렬이 비활성화되고 바운딩 볼륨의 중심으로부터의 거리를 사용하는 것으로 되돌아갑니다.

이 속성은 Qt 6.0에 도입되었습니다.

함수 액세스:

float sortIndex() const
void setSortIndex(float sortIndex)

알림 신호:

void sortIndexChanged(float sortIndex)

Qt3DRender::QSortPolicy참조하십시오 .

vertexCount : int

원시 개수를 보유합니다.

함수에 액세스합니다:

int vertexCount() const
void setVertexCount(int vertexCount)

알림 신호:

void vertexCountChanged(int vertexCount)

verticesPerPatch : int

패치당 정점을 보유합니다.

액세스 함수:

int verticesPerPatch() const
void setVerticesPerPatch(int verticesPerPatch)

알림 신호:

void verticesPerPatchChanged(int verticesPerPatch)

멤버 함수 문서

[explicit] QGeometryRenderer::QGeometryRenderer(Qt3DCore::QNode *parent = nullptr)

parent 를 사용하여 새로운 QGeometryRenderer를 구축합니다.

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