-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up OpenSim::PointForceDirection #3890
Conversation
…y and make it a non-virtual class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple minor suggestions and one (non-blocking) question about upgrading the PhysicalFrame
member to a Socket
.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @adamkewley)
CHANGELOG.md
line 13 at r1 (raw file):
- `PointForceDirection` no longer has a virtual destructor, is `final`, and its `scale` functionality has been marked as `[[deprecated]]`
v4.6
is the upcoming release, so you can move this under that section.
OpenSim/Simulation/Model/PointForceDirection.h
line 38 at r1 (raw file):
* Force (or any other object) with multiple points of contact through * which forces are applied to bodies. This represents one such point and an * array of these objects defines a complete Force distribution (ie. path).
Suggestion:
* array of these objects defines a complete Force distribution (i.e., path).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @adamkewley)
OpenSim/Simulation/Model/PointForceDirection.h
line 84 at r1 (raw file):
/** The frame in which the point is defined */ const PhysicalFrame* _frame;
Do you think it's worth it to upgrade this to a Socket?
Not in this particular case: the class is a plain C++ class, rather than an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐴
/** get the body in which the point is defined */ | ||
const PhysicalFrame& frame() {return _frame; } | ||
const PhysicalFrame& frame() { return *_frame; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to bring this up to date, I think the comment on L66 (and similar) should refer to PhysicalFrame
rather than "body" since not all PhysicalFrame
s are Body
s.
Thanks for the comments @nickbianco and @tkuchida - I've addressed them as best as possible, including rewriting some of the documentation. Since this is a minor change, I'll go ahead and merge it, rather than doing multiple rounds |
Minor clean-up. The motivation for doing so is that I'm currently working on a new
ForceEmitter
base class, which can re-usePointForceDirection
, rather than (e.g.) having to introduce its own point-force holding class.Fixes issue N/A
Brief summary of changes
virtual
destructor. It's unused codebase-widescale
feature. It's unused inopensim-core
, which uses the magnitude ofdirection
to encode the forcefinal
qualifier to the class, which will cause all code that was inheritingPointForceDirection
to no longer compile, which is a requirement for removing the virtual destructorGeometryPath
Testing I've completed
Looking for feedback on...
CHANGELOG.md (choose one)
final
and[[deprecated]]
changes. Unlikely to affect downstream users.This change is