CARLA
Public Member Functions | Public Attributes | List of all members
carla::geom::BoundingBox Class Reference

#include <BoundingBox.h>

+ Collaboration diagram for carla::geom::BoundingBox:

Public Member Functions

 BoundingBox ()=default
 
 BoundingBox (const Location &in_location, const Vector3D &in_extent, const Rotation &in_rotation)
 
 BoundingBox (const Location &in_location, const Vector3D &in_extent)
 
 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. More...
 
std::array< Location, 8 > GetLocalVertices () const
 Returns the positions of the 8 vertices of this BoundingBox in local space. More...
 
std::array< Location, 8 > GetLocalVerticesNoRotation () const
 Returns the positions of the 8 vertices of this BoundingBox in local space without its own rotation. More...
 
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. More...
 
 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. More...
 
Location location
 Center of the BoundingBox in local space. More...
 
Rotation rotation
 Rotation of the BoundingBox in local space. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ BoundingBox() [1/4]

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

Referenced by operator!=().

+ Here is the caller graph for this function:

◆ BoundingBox() [2/4]

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.

◆ BoundingBox() [3/4]

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.

◆ BoundingBox() [4/4]

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

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

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 carla::geom::Transform::InverseTransformPoint(), location, carla::geom::Vector3D::x, carla::geom::Vector3D::y, and carla::geom::Vector3D::z.

+ Here is the call graph for this function:

◆ 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::Rotation::RotateVector().

Referenced by GetWorldVertices(), and TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 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_transformThe Transform from this BoundingBox space to world space.

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

References GetLocalVertices(), and carla::geom::Transform::TransformPoint().

Referenced by TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MSGPACK_DEFINE_ARRAY()

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

Referenced by operator!=().

+ Here is the caller graph for this function:

◆ 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(), FBoundingBox::Extent, extent, location, MSGPACK_DEFINE_ARRAY(), FBoundingBox::Origin, FBoundingBox::Rotation, and rotation.

+ Here is the call graph for this function:

◆ operator==()

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

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

References extent, location, and rotation.

Member Data Documentation

◆ extent

Vector3D carla::geom::BoundingBox::extent

◆ location

Location carla::geom::BoundingBox::location

◆ rotation

Rotation carla::geom::BoundingBox::rotation

Rotation of the BoundingBox in local space.

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

Referenced by operator!=(), operator==(), and carla::road::Map::SDFToMesh().


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