Skip to content
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

Proposal: Merge Skeleton::setPositions() and Skeleton::setPositionSegment() #383

Closed
mxgrey opened this issue May 11, 2015 · 6 comments
Closed
Milestone

Comments

@mxgrey
Copy link
Member

mxgrey commented May 11, 2015

Rather than having two differently named functions for essentially the same purpose, I think it would make sense to just have one overloaded function:

void Skeleton::setPositions(const Eigen::VectorXd& _positions);
void Skeleton::setPositions(const Eigen::VectorXd& _positions, const std::vector<size_t>& _indices)

This proposal also applies to all the other functions that have a "Segment" version, such as Skeleton::setVelocitySegment() and Skeleton::setAccelerationSegment().

@jslee02
Copy link
Member

jslee02 commented May 11, 2015

Sounds good to me.

@mxgrey
Copy link
Member Author

mxgrey commented May 11, 2015

Actually, to match the existing pattern of setPosition(size_t, double), I'm thinking we should make it setPositions(const std::vector<size_t>&, const Eigen::VectorXd&).

@jslee02
Copy link
Member

jslee02 commented May 12, 2015

Matching pattern looks good as well. How about applying this change to getPositionSegment()?

@mxgrey
Copy link
Member Author

mxgrey commented May 12, 2015

Yep, I intend to do the same with every get[X]Segment function as well.

@jslee02
Copy link
Member

jslee02 commented May 12, 2015

Great!

@mxgrey
Copy link
Member Author

mxgrey commented May 15, 2015

This issue has been resolved in the memory_management branch #369

@mxgrey mxgrey closed this as completed May 15, 2015
@jslee02 jslee02 added this to the Release DART 5.0 milestone May 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants