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 oriented bounding box and convex hull types #8

Open
alice-i-cecile opened this issue Feb 20, 2022 · 0 comments
Open

Add oriented bounding box and convex hull types #8

alice-i-cecile opened this issue Feb 20, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@alice-i-cecile
Copy link
Contributor

/// A 2-dimensional oriented bounding box with coordinate type C
#[derive(Debug, Component, Clone, PartialEq)]
pub struct OrientedBoundingBox<C: Coordinate> {
    center: Position<C>,
    local_x: Direction,
    local_y: Direction,
    halfwidth_extent_x: C,
    halfwidth_extent_y: C,
}

/// A 2-dimensional convex hull with coordinate type C
#[derive(Debug, Component, Clone)]
pub struct ConvexHull<C: Coordinate> {
    /// The points which define a convex region
    pub hull_points: Vec<Position<C>>,
}
@alice-i-cecile alice-i-cecile added the enhancement New feature or request label Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant