maliput
BoundingBox Class Reference

Detailed Description

Implements BoundingRegion abstract class for non-axis-aligned-box-shaped bounding regions.

#include <include/maliput/math/bounding_box.h>

Inheritance diagram for BoundingBox:
[legend]

Public Member Functions

 BoundingBox (const Vector3 &position, const Vector3 &box_size, const RollPitchYaw &orientation, double tolerance)
 Constructs a BoundingBox object. More...
 
 ~BoundingBox ()=default
 
std::vector< Vector3get_vertices () const
 
const RollPitchYawget_orientation () const
 
const Vector3box_size () const
 
bool IsBoxContained (const BoundingBox &other) const
 
bool IsBoxIntersected (const BoundingBox &other) const
 
- Public Member Functions inherited from BoundingRegion< Vector3 >
virtual ~BoundingRegion ()=default
 
const Vector3position () const
 Obtains the bounding region's position in the Inertial-frame. More...
 
bool Contains (const Vector3 &position) const
 Determines whether a position in the Inertial-frame is contained in this bounding region. More...
 
OverlappingType Overlaps (const BoundingRegion< Vector3 > &other) const
 Determines the overlapping type with other BoundingRegion instance. More...
 

Additional Inherited Members

- Protected Member Functions inherited from BoundingRegion< Vector3 >
 BoundingRegion ()=default
 

Constructor & Destructor Documentation

◆ BoundingBox()

BoundingBox ( const Vector3 position,
const Vector3 box_size,
const RollPitchYaw orientation,
double  tolerance 
)

Constructs a BoundingBox object.

The box is defined by a position, dimensions(length, width and height) and orientation.

Parameters
positionPosition of the bounding box in the Inertial-frame. The position matches with the centroid of the box.
box_sizeThe size of the bounding box on XYZ (length/width,height)
orientationOrientation of the box in the Inertial-frame.
toleranceUsed to compute IsBoxContained() and IsBoxIntersected() against other BoundingBoxes.
Exceptions
maliput::common::assertion_errorWhen tolerance or any box_size's component are negative.

◆ ~BoundingBox()

~BoundingBox ( )
default

Member Function Documentation

◆ box_size()

const Vector3 & box_size ( ) const
Returns
The size of the box in length, width and height.

◆ get_orientation()

const RollPitchYaw & get_orientation ( ) const
Returns
The orientation of the box in the Inertial-frame.

◆ get_vertices()

std::vector< Vector3 > get_vertices ( ) const
Returns
The vertices of the bounding box in the Inertial-frame.

◆ IsBoxContained()

bool IsBoxContained ( const BoundingBox other) const
Returns
True when this region contains other .

◆ IsBoxIntersected()

bool IsBoxIntersected ( const BoundingBox other) const
Returns
True when this region intersects other .

The documentation for this class was generated from the following files: