Qt Quick 3D - Level of Detail Helper Beispiel

Demonstriert die Verwendung von Level of Detail Helper.

Dieses Beispiel veranschaulicht die Verwendung der LODManager-Hilfsfunktion. Der LODManager ändert die Sichtbarkeit seiner untergeordneten Knoten basierend auf dem Abstand zur angegebenen Kamera. Die Distance-Eigenschaft ist eine Liste von Abstandsschwellenwerten, die bestimmen, wann die Sichtbarkeit eines Childs geändert wird. Das erste Kind wird angezeigt, wenn es am nächsten ist, und das letzte Kind, wenn es am weitesten entfernt ist.

LodManager {
    camera: camera
    distances: [100, 140, 180]
    fadeDistance: 10

    Model {
        scale: Qt.vector3d(100, 100, 100);
        source: "meshes/marble_bust_01_LOD_0.mesh"
        materials: [ marbleMaterial ]
    }

    Model {
        scale: Qt.vector3d(100, 100, 100);
        source: "meshes/marble_bust_01_LOD_1.mesh"
        materials: [ marbleMaterial ]
    }

    Model {
        scale: Qt.vector3d(100, 100, 100);
        source: "meshes/marble_bust_01_LOD_2.mesh"
        materials: [ marbleMaterial ]
    }

    Model {
        scale: Qt.vector3d(100, 100, 100);
        source: "meshes/marble_bust_01_LOD_3.mesh"
        materials: [ marbleMaterial ]
    }
}

Beispielprojekt @ code.qt.io

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