class mrpt::detectors::CDetectable2D

#include <mrpt/detectors/CDetectableObject.h>

class CDetectable2D: public mrpt::detectors::CDetectableObject
{
public:
    //
fields

    float m_x;
    float m_height;
    std::string m_id;
    mrpt::obs::CObservation::Ptr obs;

    // construction

    CDetectable2D(int x = 0, int y = 0, int height = 0, int width = 0);
    CDetectable2D(const CDetectable2D* d);

    //
methods

    double distanceTo(const CDetectable2D& d2);
};

// direct descendants

class CDetectable3D;

Inherited Members

public:
    //
methods

    void setObservation(mrpt::obs::CObservation::Ptr newObs);

Fields

float m_x

2D Coordinates of detected object

float m_height

Size of detected object.

std::string m_id

Must be an unique id for each detectable object.

mrpt::obs::CObservation::Ptr obs

Observation wich contain the deteted object.

Construction

CDetectable2D(int x = 0, int y = 0, int height = 0, int width = 0)

Extra constructor.

CDetectable2D(const CDetectable2D* d)

Copy pointer content constructor.

Methods

double distanceTo(const CDetectable2D& d2)

Compute distance between centers of two detectable 2D objects.

Returns:

calculated distance.