This bugzilla service is closed. All entries have been migrated to

Bug 1623

Summary: Add AlignedBox::extend(aligned_box, affine_transform) ?
Product: Eigen Reporter: Martin Pecka <peci1>
Component: GeometryAssignee: Nobody <eigen.nobody>
Status: REVIEWNEEDED ---    
Severity: Feature Request CC: chtz, gael.guennebaud, hauke.heibel, jacob.benoit.1, peci1
Priority: Normal    
Version: 3.4 (development)   
Hardware: All   
OS: All   

Description Martin Pecka 2018-11-16 15:56:36 UTC
For the Moveit project, I implemented a function that allows extending an AlignedBox with another AlignedBox transformed by an affine transform.

I just had the idea that it could be moved directly to Eigen if other people agree  such a function makes sense. For Moveit, it does, since we merge a lot of AABBs from robot links to create one big AABB of the whole robot. So what do you think about it?

There already are two extend() implementations in Eigen::AlignedBox - one for extending with points, the other for extending by another (untransformed) AlignedBox.

I have two suggestions on how this could be ported into Eigen and I'm not sure which one would be better, so please comment.

1) Add method `extend(const AlignedBox &b, AffineTransform &a)`.
2) Add method `transform(AffineTransform &a)` that would just apply the transform on the current AlignedBox. Merging with another one could be made using the already existing `extend(AlignedBox &b)` method.

Implementation is here:
Comment 1 Christoph Hertzberg 2018-11-18 11:50:30 UTC
I would go for option 2, unless combining both operations really makes a difference. 
It might actually be simpler to just overload operator*(Transform,AlignedBox).

The implementation you link to actually implements the requested functionality only for boxes centered at the origin.
Comment 3 Gael Guennebaud 2019-11-15 09:59:23 UTC
For consistency with Hyperplane and ParametrizedLine we should use a transform() method.
Comment 4 Nobody 2019-12-04 18:07:12 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: