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

Scale BaseAxis properly #88

Merged
merged 12 commits into from
May 29, 2020
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

### Ignition Rendering 4.0.0

1. Scale BaseAxis properly
* [Pull request #88](https://github.com/ignitionrobotics/ign-rendering/pull/88)

1. Support setting skeleton node weights
* [BitBucket pull request 256](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-rendering/pull-requests/256)

Expand Down
11 changes: 11 additions & 0 deletions include/ignition/rendering/base/BaseAxisVisual.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ namespace ignition
public: virtual ~BaseAxisVisual();

public: virtual void Init();

// Documentation inherited.
public: virtual void SetLocalScale(const math::Vector3d &_scale) override;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should be able to just override this version with math::Vector3d arg. The other two just calls this function so can be removed.

};

//////////////////////////////////////////////////
Expand All @@ -51,6 +54,14 @@ namespace ignition
{
}

//////////////////////////////////////////////////
template <class T>
void BaseAxisVisual<T>::SetLocalScale(const math::Vector3d &_scale)
{
for (unsigned int i = 0; i < this->ChildCount(); ++i)
this->ChildByIndex(i)->SetLocalScale(_scale.X(), _scale.Y(), _scale.Z());
}

//////////////////////////////////////////////////
template <class T>
void BaseAxisVisual<T>::Init()
Expand Down