[eigen] Patch to AlignedBox

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

Dear list,
I've recently converted all the maths in an OpenGL 3D viewing app I wrote to Eigen, and it's working really well. I was very happy when I came across the AlignedBox class, as it matched pretty well to some code I'd already written. However, it was missing two bits of functionality I really needed:
1) A convenient way to get all the corners of the bounding box in a Matrix, in an order consistent with CornerType.
2) A way to expand or contract the bounding box along each axis independently.
I've attached a patch that adds this functionality to AlignedBox. I have no idea whether this would be useful to anyone else, or whether I've coded it up in a particularly good way.

I also took the liberty of adding some extra names to the CornerType enum that would go some way to fixing bug 476 (But without marking the old names as deprecated, because I don't know what mechanisms exist in Eigen for such marking). Because I combined the two together in one patch, I thought it would be better to initially send it here rather than Bugzilla.

Best wishes,
Toby Wood

Attachment: TCW_AlignedBoxPatch.diff
Description: TCW_AlignedBoxPatch.diff

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/