이 페이지에서

Geometry QML Type (Uncreatable)

사용자 정의 지오메트리의 기본 유형. 더 보기...

참고: 이 타입은 생성할 수 없는 타입입니다. QML에서 인스턴스화할 수 없습니다.

상세 설명

사용자 정의 기하 구조를 사용하면 애플리케이션에서 생성한 정점 및 인덱스 데이터를 활용할 수 있으며, 이러한 데이터는 동적으로 변경될 수도 있습니다. 사용자 정의 기하 구조를 사용하려면 모델(Model)의 기하 구조( source )로 ` .mesh ` 파일을 할당하지 마십시오. 대신, 모델의 ` geometry ` 속성을 `Geometry` 객체를 참조하도록 설정하십시오.

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

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

import QtQuick3D.Helpers

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

Qt Quick 3D - 사용자 정의 기하학 예제, Model 및 QQuick3DGeometry도 참조하십시오 .

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