Geometry QML Type

사용자 지정 지오메트리를 위한 기본 유형입니다. 더 보기...

Import Statement: import QtQuick3D
In C++: QQuick3DGeometry
Inherits:

Object3D

Inherited By:

GridGeometry, HeightFieldGeometry, and ProceduralMesh

상세 설명

사용자 지정 지오메트리를 사용하면 애플리케이션에서 생성된 버텍스 및 인덱스 데이터를 사용할 수 있으며 동적으로 변경될 수도 있습니다. 사용자 지정 지오메트리를 사용하려면 .mesh 파일을 source 으로 모델에 할당하지 마세요. 대신 geometry 속성을 설정하여 지오메트리 객체를 참조하도록 하세요.

사용자 지정 지오메트리를 구현하는 일반적인 방법은 C++에서 QQuick3DGeometry 서브클래스를 생성하고 새 유형을 등록하여 QML에 사용하는 것입니다.

Helpers 모듈에 내장된 사용자 지정 지오메트리 공급자 GridGeometry 를 사용할 수도 있습니다. 다음은 GridGeometry 의 예입니다. 애플리케이션에서 제공하는 모든 지오메트리 서브클래스를 동일한 방식으로 사용할 수 있습니다.

import QtQuick3D.Helpers

Model {
    geometry: GridGeometry {
    }
    materials: [
        DefaultMaterial {
            diffuseColor: "white"
            lighting: DefaultMaterial.NoLighting
        }
    ]
}

Qt Quick 3D - 사용자 정의 지오메트리 예제, Model, 및 QQuick3DGeometry참조하세요 .

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