Skip to content

Commit

Permalink
Merge pull request #874 from S-Dafarra/fix/boxVisualization
Browse files Browse the repository at this point in the history
Fix the visualization of boxes.
  • Loading branch information
traversaro authored Jun 7, 2021
2 parents 065fcda + c7d37d9 commit 7febf5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- The example file `examples/python/KinDynComputationsTutorial.py` has been fixed to work with Python 3 and iDynTree >= 2.0 (https://github.com/robotology/idyntree/pull/873).
- Fix of a bug introduced by https://github.com/robotology/idyntree/pull/845 in the visualization of boxes (https://github.com/robotology/idyntree/pull/874)

## [3.2.0] - 2021-05-15

Expand Down
7 changes: 6 additions & 1 deletion src/model/src/SolidShapes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ namespace iDynTree
m_texture = texture;
}

SolidShape::SolidShape(): nameIsValid(false), m_isMaterialSet(false) {}
SolidShape::SolidShape()
: nameIsValid(false)
, link_H_geometry(iDynTree::Transform::Identity())
, m_isMaterialSet(false)
{
}

SolidShape::~SolidShape()
{
Expand Down
4 changes: 0 additions & 4 deletions src/visualization/src/IrrlichtUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ inline irr::scene::ISceneNode * addGeometryToSceneManager(const iDynTree::SolidS

irr::scene::IMesh* boxMesh = smgr->getGeometryCreator()->createCubeMesh(irr::core::vector3df(box->getX(),box->getY(),box->getZ()));

irr::core::matrix4 irr2idyntree;
irr2idyntree.buildRotateFromTo(irr::core::vector3df(0.0,1.0,0.0),irr::core::vector3df(0.0,0.0,1.0));
smgr->getMeshManipulator()->transform(boxMesh,irr2idyntree);

geomNode = smgr->addMeshSceneNode(boxMesh,linkNode);

boxMesh->drop();
Expand Down

0 comments on commit 7febf5a

Please sign in to comment.