pub struct BoundingBox { /* private fields */ }Expand description
An oriented bounding box in 3D space.
Wrapper around C++ implementation maliput::math::BoundingBox.
The box is defined by a position (centroid), box_size (full extents along each axis),
and an orientation expressed as roll-pitch-yaw angles.
Implementations§
Source§impl BoundingBox
impl BoundingBox
Sourcepub fn new(
position: &Vector3,
box_size: &Vector3,
orientation: &RollPitchYaw,
tolerance: f64,
) -> BoundingBox
pub fn new( position: &Vector3, box_size: &Vector3, orientation: &RollPitchYaw, tolerance: f64, ) -> BoundingBox
Create a new BoundingBox.
§Arguments
position— Center of the box in the Inertial frame.box_size— Full extents of the box along each axis (length, width, height).orientation— Orientation of the box in the Inertial frame.tolerance— Tolerance used for containment/intersection queries.
Sourcepub fn position(&self) -> Vector3
pub fn position(&self) -> Vector3
Returns the position (centroid) of the bounding box in the Inertial frame.
Sourcepub fn box_size(&self) -> Vector3
pub fn box_size(&self) -> Vector3
Returns the full extents of the bounding box along each axis.
Sourcepub fn orientation(&self) -> RollPitchYaw
pub fn orientation(&self) -> RollPitchYaw
Returns the orientation of the bounding box as roll-pitch-yaw angles.
Sourcepub fn get_vertices(&self) -> Vec<Vector3>
pub fn get_vertices(&self) -> Vec<Vector3>
Returns the 8 vertices of the bounding box in the Inertial frame.
Sourcepub fn is_box_contained(&self, other: &BoundingBox) -> bool
pub fn is_box_contained(&self, other: &BoundingBox) -> bool
Returns true when this bounding box fully contains other.
Sourcepub fn is_box_intersected(&self, other: &BoundingBox) -> bool
pub fn is_box_intersected(&self, other: &BoundingBox) -> bool
Returns true when this bounding box intersects other.
Auto Trait Implementations§
impl Freeze for BoundingBox
impl RefUnwindSafe for BoundingBox
impl !Send for BoundingBox
impl !Sync for BoundingBox
impl Unpin for BoundingBox
impl UnsafeUnpin for BoundingBox
impl UnwindSafe for BoundingBox
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more