Qt Quick 3D Physics API从技术预览更改

Qt Quick 3D Physics API Changes from Tech Preview

Qt Quick 3D Physics API从技术预览更改

Starting with the Qt 6.5.0 release, the Qt Quick 3D Physics module is no longer in Tech Preview. As a result of the API feedback and review process, some source-incompatible changes were made.

从Qt 6.5.0版本开始,Qt Quick 3D Physics模块不再处于技术预览中。由于API的反馈和审查过程,做出了一些源代码兼容的更改。

The majority of the changes are renaming types and properties for consistency with other APIs and to make the names more descriptive. The most noticeable rename is changing DynamicsWorld to PhysicsWorld, which will affect all applications.

​大多数更改是重命名类型和属性,以与其他API保持一致,并使名称更具描述性。最引人注目的重命名是将DynamicsWorld更改为PhysicsWorld,这将影响所有应用程序。

The most important behavioral change is the handling of kinematic bodies. Changing the position/orientation of a kinematic body is no longer done by using the Node properties (positionrotation, etc.), but instead by using the new properties: kinematicPositionkinematicEulerRotationkinematicRotation, and kinematicPivot. The reason for this change was to make sure that the visual movement of kinematic bodies is synchronized with the rest of the simulation, instead of happening one simulation step too early.

​最重要的行为变化是对运动体的处理。更改运动体的位置/方向不再使用节点属性(位置、旋转等),而是使用新属性:kinematicPosition、kinematicEulerRotation、kinematicRotation和kinematicPivot。这一变化的原因是确保运动体的视觉运动与模拟的其余部分同步,而不是过早地进行一个模拟步骤。

The DynamicRigidBody.density property no longer treats negative values (and zero) as a special case. Instead, there are two new massMode enumeration values replacing Density:

​DynamicRigidBody.density属性不再将负值(和零)视为特殊情况。相反,有两个新的massMode枚举值取代了Density:

DefaultDensity

The density of the body is defined by PhysicsWorld.defaultDensity. This is the default.

​物体的密度由PhysicsWorld.defaultDensity定义。这是默认设置。

CustomDensity

The density of the body is defined by the density property.

​物体的密度由密度属性定义。

The enableTriggerReports property has been renamed to sendTriggerReports. In addition, physics objects can now be notified when they enter a trigger body by setting receiveTriggerReports.

​enableTriggerReports属性已重命名为sendTriggerReportes。此外,通过设置receiveTriggerReports,物理对象现在可以在进入触发器体时收到通知。

The following is a complete list of all the API changes:

以下是所有API更改的完整列表:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值