-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Labels
enhancementNew feature or requestNew feature or request
Description
One common change in PhysX 5 was to consolidate constructors, providing default values to preserve the behavior of the default constructor.
-PX_INLINE PxCapsuleGeometry() : PxGeometry(PxGeometryType::eCAPSULE), radius(0), halfHeight(0) {}
-PX_INLINE PxCapsuleGeometry(PxReal radius_, PxReal halfHeight_) : PxGeometry(PxGeometryType::eCAPSULE), radius(radius_), halfHeight(halfHeight_) {}
+PX_INLINE PxCapsuleGeometry(PxReal radius_=0.0f, PxReal halfHeight_=0.0f) : PxGeometry(PxGeometryType::eCAPSULE), radius(radius_), halfHeight(halfHeight_) {}We could generate bindings to preserve the API in these cases, but that honestly feels a bit wasteful, that being said, it's a bit tedious to consult the C++ code to figure out which defaults are being used, so it would be nice to add the defaults as inline comments for each parameter so that the user can see the defaults in an overlay if they are using something like RLS, or at least be present in the physx_generated.rs code that they can inspect manually.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request