ReUseX  0.0.1
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
ReUseX::vision::common::object::Box Struct Reference

Axis-aligned bounding box defined by (left, top, right, bottom) coordinates. More...

#include <object.hpp>

Public Member Functions

 Box ()=default
 Box (float l, float t, float r, float b)
 Construct a Box with explicit corner coordinates.
float width () const noexcept
 Returns the width of the box.
float height () const noexcept
 Returns the height of the box.
float center_x () const noexcept
 Returns the x-coordinate of the box center.
float center_y () const noexcept
 Returns the y-coordinate of the box center.
float area () const noexcept
 Returns the area of the box.

Public Attributes

float left = 0.0f
 Left edge x-coordinate.
float top = 0.0f
 Top edge y-coordinate.
float right = 0.0f
 Right edge x-coordinate.
float bottom = 0.0f
 Bottom edge y-coordinate.

Friends

std::ostream & operator<< (std::ostream &os, const Box &box)

Detailed Description

Axis-aligned bounding box defined by (left, top, right, bottom) coordinates.

Definition at line 27 of file object.hpp.

Constructor & Destructor Documentation

◆ Box() [1/2]

ReUseX::vision::common::object::Box::Box ( )
default

Referenced by operator<<.

◆ Box() [2/2]

ReUseX::vision::common::object::Box::Box ( float l,
float t,
float r,
float b )

Construct a Box with explicit corner coordinates.

Parameters
lLeft edge.
tTop edge.
rRight edge.
bBottom edge.

Member Function Documentation

◆ area()

float ReUseX::vision::common::object::Box::area ( ) const
inlinenoexcept

Returns the area of the box.

Definition at line 55 of file object.hpp.

References height(), and width().

◆ center_x()

float ReUseX::vision::common::object::Box::center_x ( ) const
inlinenoexcept

Returns the x-coordinate of the box center.

Definition at line 49 of file object.hpp.

References left, and right.

◆ center_y()

float ReUseX::vision::common::object::Box::center_y ( ) const
inlinenoexcept

Returns the y-coordinate of the box center.

Definition at line 52 of file object.hpp.

References bottom, and top.

◆ height()

float ReUseX::vision::common::object::Box::height ( ) const
inlinenoexcept

Returns the height of the box.

Definition at line 46 of file object.hpp.

References bottom, and top.

Referenced by area().

◆ width()

float ReUseX::vision::common::object::Box::width ( ) const
inlinenoexcept

Returns the width of the box.

Definition at line 43 of file object.hpp.

References left, and right.

Referenced by area().

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Box & box )
friend

References Box().

Member Data Documentation

◆ bottom

float ReUseX::vision::common::object::Box::bottom = 0.0f

Bottom edge y-coordinate.

Definition at line 31 of file object.hpp.

Referenced by center_y(), and height().

◆ left

float ReUseX::vision::common::object::Box::left = 0.0f

Left edge x-coordinate.

Definition at line 28 of file object.hpp.

Referenced by center_x(), and width().

◆ right

float ReUseX::vision::common::object::Box::right = 0.0f

Right edge x-coordinate.

Definition at line 30 of file object.hpp.

Referenced by center_x(), and width().

◆ top

float ReUseX::vision::common::object::Box::top = 0.0f

Top edge y-coordinate.

Definition at line 29 of file object.hpp.

Referenced by center_y(), and height().


The documentation for this struct was generated from the following file:
  • libs/reusex/include/ReUseX/vision/common/object.hpp