Qt Quick 3D Physics 技術プレビューからの API の変更
Qt 6.5.0 リリースから、Qt Quick 3D Physics モジュールは技術プレビューではなくなりました。APIのフィードバックとレビュープロセスの結果、いくつかのソースと互換性のない変更が行われました。
変更の大部分は、他のAPIとの一貫性を保ち、より説明的な名前にするために、型とプロパティの名前を変更することです。最も顕著な名前の変更は、DynamicsWorld
をPhysicsWorld に変更したことです。
最も重要な動作の変更は、kinematic bodies の処理です。キネマティック・ボディの位置/向きの変更は、Node プロパティ(position
,rotation
など)を使用するのではなく、新しいプロパティを使用することで行われるようになりました:kinematicPosition kinematicEulerRotation 、kinematicRotation 、kinematicPivot 。この変更の理由は、キネマティックボディの視覚的な動きをシミュレーションの他の部分と同期させるためです。
DynamicRigidBody.density プロパティは、負の値(およびゼロ)を特別なケースとして扱わなくなりました。代わりに、Density
に代わって、massMode の2つの新しい列挙値があります:
DefaultDensity | 体の密度はPhysicsWorld.defaultDensity で定義されます。これがデフォルトです。 |
CustomDensity | 体の密度はdensity プロパティで定義されます。 |
enableTriggerReports
プロパティはsendTriggerReports に名前が変更されました。さらに、物理オブジェクトがトリガーボディに入ったときに、receiveTriggerReports を設定することで通知できるようになりました。
以下は、すべてのAPI変更の完全なリストです:
- CollisionShape:
- enableDebugView の名前がenableDebugDraw
- 抽象ベースタイプ
CollisionNode
の名前をPhysicsNode- enableTriggerReportsをsendTriggerReports 。receiveTriggerReports
- CharacterController
speed
の名前をmovement
- ConvexMeshShape
- の名前を
meshSource
に変更した。source
- の名前を
- HeightFieldShape
- の名前を
heightMap
に変更した。source
- の名前を
- TriangleMeshShape
- の名前を
meshSource
に変更した。source
- の名前を
- PhysicsWorld ( からリネーム)
DynamicsWorld
forceDebugView
からforceDebugDrawminTimestep
/maxTimestep
をminimumTimestep/ にリネーム。maximumTimestep- シーンノードを削除
- 追加scene
- 追加viewport
- DynamicRigidBody
axisLockLinearX/Y/Z
プロパティを、ビットフィールドを取る単一のプロパティlinearAxisLock に変更。axisLockAngularX/Y/Z
プロパティを、ビットフィールドを取る単一のプロパティangularAxisLock に変更。- 新しいプロパティkinematicPosition,kinematicEulerRotation,kinematicRotation, を追加。kinematicPivot
Density
enum 値をDefaultDensity/CustomDensity に変更し、負の値の特殊ケーシングを削除。linearVelocity
プロパティをメソッドsetLinearVelocity に置き換えた。angularVelocity
プロパティをsetAngularVelocity メソッドに置き換えた。
© 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.