You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Saves/restores SIMD control word for each query (safer but slower). Omit this if you took care of it yourself in your app.
SimdGuard = 1,
}
bitflags::bitflags! {
/// Flags for [`PxGeometryQueryFlag`]
#[derive(Default)]
#[repr(transparent)]
pubstructPxGeometryQueryFlags:u32{
constSimdGuard = 1 << 0;
}
}
This will in most cases be harmless, particularly if the default is in fact 0, but for other cases it's either (silently) misleading or could cause crashes/incorrect behavior.
It should be relatively trivial to actually do impl Default for <> for both the enum and the bitflags if the enum in question does in fact have an eDEFAULT variant, otherwise we should leave the default off to force the user to consult the docs/code to make a decision rather than the current behavior.
The text was updated successfully, but these errors were encountered:
Currently, we
#[derive(Default)]
for generated bitflags! in physx-sys, which is 0, which might not actually align with what the default is in C++.Take
PxGeometryQueryFlags
https://github.com/NVIDIA-Omniverse/PhysX/blob/85befb639eb736bc8ec7d4a2e9726ec2ab1d0434/physx/include/geometry/PxGeometryQueryFlags.h#L47-L55
Which currently generates
physx-rs/physx-sys/src/physx_generated.rs
Lines 286 to 301 in 926eee8
This will in most cases be harmless, particularly if the default is in fact 0, but for other cases it's either (silently) misleading or could cause crashes/incorrect behavior.
It should be relatively trivial to actually do
impl Default for <>
for both the enum and the bitflags if the enum in question does in fact have aneDEFAULT
variant, otherwise we should leave the default off to force the user to consult the docs/code to make a decision rather than the current behavior.The text was updated successfully, but these errors were encountered: