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

Add helper functions to create AxisAlignedBox objects from other shapes #666

Open
scpeters opened this issue Mar 4, 2025 · 0 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@scpeters
Copy link
Member

scpeters commented Mar 4, 2025

Desired behavior

Add helper functions that create an AxisAlignedBox object when passed a shape object like Box, Capsule, Cylinder, etc.

Alternatives considered

Implementation suggestion

Add static helper functions to a separate header file (such as include/gz/math/AxisAlignedBoxHelpers.hh) with the following API:

static gz::math::AxisAlignedBox ConvertToAxisAlignedBox(const gz::math::Box &);
static gz::math::AxisAlignedBox ConvertToAxisAlignedBox(const gz::math::Sphere &);
static gz::math::AxisAlignedBox ConvertToAxisAlignedBox(const gz::math::Capsule &);
etc.

Additional context

This was motivated by the feature proposed by @gabrielfpacheco in gazebosim/sdformat#1547.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Inbox
Development

No branches or pull requests

1 participant