Fawkes API  Fawkes Development Version
OldCentroid Class Reference

This class is used to save old centroids in order to check for reappearance. More...

#include "tabletop_objects_thread.h"

Public Member Functions

 OldCentroid (const unsigned int &id, const Eigen::Vector4f &centroid)
 Constructor. More...
 
 OldCentroid (const OldCentroid &other)
 Copy constructor. More...
 
virtual ~OldCentroid ()
 Destructor. More...
 
OldCentroidoperator= (const OldCentroid &other)
 Assignment operator. More...
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW unsigned int get_id () const
 Get the ID of the centroid. More...
 
const Eigen::Vector4f & get_centroid () const
 Get the position of the centroid. More...
 
unsigned int get_age () const
 Get the age of the centroid. More...
 
void increment_age ()
 Increment the age of the centroid. More...
 

Protected Attributes

unsigned int id_
 The ID of the centroid. More...
 
unsigned int age_
 The number of loops the centroid has been invisible for. More...
 
Eigen::Vector4f centroid_
 The position of centroid. More...
 

Detailed Description

This class is used to save old centroids in order to check for reappearance.

Definition at line 65 of file tabletop_objects_thread.h.

Constructor & Destructor Documentation

◆ OldCentroid() [1/2]

OldCentroid::OldCentroid ( const unsigned int &  id,
const Eigen::Vector4f &  centroid 
)
inline

Constructor.

Parameters
idThe ID which the centroid was assigned to
centroidThe position of the centroid

Definition at line 73 of file tabletop_objects_thread.h.

◆ OldCentroid() [2/2]

OldCentroid::OldCentroid ( const OldCentroid other)
inline

Copy constructor.

Parameters
otherThe other OldCentroid

Definition at line 80 of file tabletop_objects_thread.h.

◆ ~OldCentroid()

virtual OldCentroid::~OldCentroid ( )
inlinevirtual

Destructor.

Definition at line 86 of file tabletop_objects_thread.h.

Member Function Documentation

◆ get_age()

unsigned int OldCentroid::get_age ( ) const
inline

Get the age of the centroid.

Returns
the number of loops the centroids has been invisible

Definition at line 125 of file tabletop_objects_thread.h.

References age_.

Referenced by operator=().

◆ get_centroid()

const Eigen::Vector4f& OldCentroid::get_centroid ( ) const
inline

Get the position of the centroid.

Returns
a reference to the centroid

Definition at line 116 of file tabletop_objects_thread.h.

References centroid_.

Referenced by operator=().

◆ get_id()

EIGEN_MAKE_ALIGNED_OPERATOR_NEW unsigned int OldCentroid::get_id ( ) const
inline

Get the ID of the centroid.

Returns
the ID of the centroid

Definition at line 108 of file tabletop_objects_thread.h.

References id_.

Referenced by operator=().

◆ increment_age()

void OldCentroid::increment_age ( )
inline

Increment the age of the centroid.

Definition at line 132 of file tabletop_objects_thread.h.

References age_.

◆ operator=()

OldCentroid& OldCentroid::operator= ( const OldCentroid other)
inline

Assignment operator.

Parameters
otherThe other OldCentroid
Returns
reference to this instance

Definition at line 94 of file tabletop_objects_thread.h.

References age_, centroid_, get_age(), get_centroid(), get_id(), and id_.

Member Data Documentation

◆ age_

unsigned int OldCentroid::age_
protected

The number of loops the centroid has been invisible for.

Definition at line 141 of file tabletop_objects_thread.h.

Referenced by get_age(), increment_age(), and operator=().

◆ centroid_

Eigen::Vector4f OldCentroid::centroid_
protected

The position of centroid.

Definition at line 143 of file tabletop_objects_thread.h.

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

◆ id_

unsigned int OldCentroid::id_
protected

The ID of the centroid.

Definition at line 139 of file tabletop_objects_thread.h.

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


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