CARLA
Loading...
Searching...
No Matches
carla::geom::BoundingBox Class Reference

#include <BoundingBox.h>

Public Member Functions

 BoundingBox ()=default
 BoundingBox (const FBoundingBox &Box)
 BoundingBox (const Location &in_location, const Vector3D &in_extent)
 BoundingBox (const Location &in_location, const Vector3D &in_extent, const Rotation &in_rotation)
 BoundingBox (const Vector3D &in_extent)
bool Contains (const Location &in_world_point, const Transform &in_bbox_to_world_transform) const
 Whether this BoundingBox contains in_world_point in world space.
std::array< Location, 8 > GetLocalVertices () const
 Returns the positions of the 8 vertices of this BoundingBox in local space.
std::array< Location, 8 > GetLocalVerticesNoRotation () const
 Returns the positions of the 8 vertices of this BoundingBox in local space without its own rotation.
std::array< Location, 8 > GetWorldVertices (const Transform &in_bbox_to_world_tr) const
 Returns the positions of the 8 vertices of this BoundingBox in world space.
 MSGPACK_DEFINE_ARRAY (location, extent, rotation)
bool operator!= (const BoundingBox &rhs) const
bool operator== (const BoundingBox &rhs) const

Public Attributes

Vector3D extent
 Half the size of the BoundingBox in local space.
Location location
 Center of the BoundingBox in local space.
Rotation rotation
 Rotation of the BoundingBox in local space.

Detailed Description

Definition at line 26 of file LibCarla/source/carla/geom/BoundingBox.h.

Constructor & Destructor Documentation

◆ BoundingBox() [1/5]

carla::geom::BoundingBox::BoundingBox ( )
default

Referenced by operator!=(), and operator==().

◆ BoundingBox() [2/5]

carla::geom::BoundingBox::BoundingBox ( const Location & in_location,
const Vector3D & in_extent,
const Rotation & in_rotation )
inlineexplicit

Definition at line 35 of file LibCarla/source/carla/geom/BoundingBox.h.

References extent, location, and rotation.

◆ BoundingBox() [3/5]

carla::geom::BoundingBox::BoundingBox ( const Location & in_location,
const Vector3D & in_extent )
inlineexplicit

Definition at line 40 of file LibCarla/source/carla/geom/BoundingBox.h.

References extent, location, and rotation.

◆ BoundingBox() [4/5]

carla::geom::BoundingBox::BoundingBox ( const Vector3D & in_extent)
inlineexplicit

Definition at line 45 of file LibCarla/source/carla/geom/BoundingBox.h.

References extent, location, and rotation.

◆ BoundingBox() [5/5]

carla::geom::BoundingBox::BoundingBox ( const FBoundingBox & Box)
inline

Definition at line 137 of file LibCarla/source/carla/geom/BoundingBox.h.

References extent, location, and rotation.

Member Function Documentation

◆ Contains()

bool carla::geom::BoundingBox::Contains ( const Location & in_world_point,
const Transform & in_bbox_to_world_transform ) const
inline

Whether this BoundingBox contains in_world_point in world space.

Parameters
in_world_pointthe point in world space that you want to query whether it is inside or not.
in_bbox_to_world_transformthe transformation from BoundingBox space to World space.

Definition at line 63 of file LibCarla/source/carla/geom/BoundingBox.h.

References extent, carla::geom::Transform::InverseTransformPoint(), location, carla::geom::Vector3D::x, carla::geom::Vector3D::y, and carla::geom::Vector3D::z.

◆ GetLocalVertices()

std::array< Location, 8 > carla::geom::BoundingBox::GetLocalVertices ( ) const
inline

Returns the positions of the 8 vertices of this BoundingBox in local space.

Definition at line 76 of file LibCarla/source/carla/geom/BoundingBox.h.

References carla::geom::Location::Location(), location, carla::geom::Rotation::RotateVector(), and rotation.

Referenced by GetWorldVertices(), and TEST().

◆ GetLocalVerticesNoRotation()

std::array< Location, 8 > carla::geom::BoundingBox::GetLocalVerticesNoRotation ( ) const
inline

Returns the positions of the 8 vertices of this BoundingBox in local space without its own rotation.

Definition at line 93 of file LibCarla/source/carla/geom/BoundingBox.h.

References extent, carla::geom::Location::Location(), location, carla::geom::Vector3D::x, carla::geom::Vector3D::y, and carla::geom::Vector3D::z.

◆ GetWorldVertices()

std::array< Location, 8 > carla::geom::BoundingBox::GetWorldVertices ( const Transform & in_bbox_to_world_tr) const
inline

Returns the positions of the 8 vertices of this BoundingBox in world space.

Parameters
in_bbox_to_world_trThe Transform from this BoundingBox space to world space.

Definition at line 111 of file LibCarla/source/carla/geom/BoundingBox.h.

References GetLocalVertices().

Referenced by TEST().

◆ MSGPACK_DEFINE_ARRAY()

carla::geom::BoundingBox::MSGPACK_DEFINE_ARRAY ( location ,
extent ,
rotation  )

References extent, location, and rotation.

◆ operator!=()

bool carla::geom::BoundingBox::operator!= ( const BoundingBox & rhs) const
inline

Definition at line 127 of file LibCarla/source/carla/geom/BoundingBox.h.

References BoundingBox().

◆ operator==()

bool carla::geom::BoundingBox::operator== ( const BoundingBox & rhs) const
inline

Definition at line 123 of file LibCarla/source/carla/geom/BoundingBox.h.

References BoundingBox(), extent, location, and rotation.

Member Data Documentation

◆ extent

◆ location

◆ rotation

Rotation carla::geom::BoundingBox::rotation

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