pcod-common v1.0.0
Shared preprocessing and postprocessing for point-cloud object detection
Loading...
Searching...
No Matches
pcod_common::BoundingBoxVertex Struct Reference

#include <bounding_box.hpp>

Public Member Functions

 BoundingBoxVertex (float x_in=0.0f, float y_in=0.0f)
 
BoundingBoxVertex operator+ (const BoundingBoxVertex &v) const
 
BoundingBoxVertex operator- (const BoundingBoxVertex &v) const
 
float cross (const BoundingBoxVertex &v) const
 

Public Attributes

float x
 X coordinate.
 
float y
 Y coordinate.
 

Detailed Description

Two-dimensional vertex used by rotated-box geometry operations.

Definition at line 18 of file bounding_box.hpp.

Constructor & Destructor Documentation

◆ BoundingBoxVertex()

pcod_common::BoundingBoxVertex::BoundingBoxVertex ( float x_in = 0.0f,
float y_in = 0.0f )
inline

Construct a vertex at (x_in, y_in).

Parameters
x_inX coordinate.
y_inY coordinate.

Definition at line 26 of file bounding_box.hpp.

26: x(x_in), y(y_in) {}

Member Function Documentation

◆ cross()

float pcod_common::BoundingBoxVertex::cross ( const BoundingBoxVertex & v) const
inline
Parameters
vOther vector.
Returns
Two-dimensional cross product.

Definition at line 33 of file bounding_box.hpp.

33{ return x * v.y - y * v.x; }

References x, and y.

Referenced by pcod_common::BoundingBox::intersection_area(), and pcod_common::Line::Line().

◆ operator+()

BoundingBoxVertex pcod_common::BoundingBoxVertex::operator+ ( const BoundingBoxVertex & v) const
inline
Parameters
vVertex to add.
Returns
Component-wise sum.

Definition at line 29 of file bounding_box.hpp.

29{ return {x + v.x, y + v.y}; }

References x, and y.

◆ operator-()

BoundingBoxVertex pcod_common::BoundingBoxVertex::operator- ( const BoundingBoxVertex & v) const
inline
Parameters
vVertex to subtract.
Returns
Component-wise difference.

Definition at line 31 of file bounding_box.hpp.

31{ return {x - v.x, y - v.y}; }

References x, and y.

Member Data Documentation

◆ x

float pcod_common::BoundingBoxVertex::x

X coordinate.

Definition at line 19 of file bounding_box.hpp.

Referenced by cross(), pcod_common::Line::Line(), pcod_common::Line::operator()(), operator+(), and operator-().

◆ y

float pcod_common::BoundingBoxVertex::y

Y coordinate.

Definition at line 20 of file bounding_box.hpp.

Referenced by cross(), pcod_common::Line::Line(), pcod_common::Line::operator()(), operator+(), and operator-().


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