AI Watch A1
Multi-person 3D skeleton detection using Intel RealSense and OpenPose with Kafka support.
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Point Class Reference

Point class is used for point creations and manipulations. More...

#include <Point.hpp>

Inheritance diagram for Point:
BodyKeyPoint Point3D

Public Member Functions

 Point (float x, float y, Point *decorated=nullptr)
 Construct a new Point object. More...
 
 ~Point (void)
 Destroy the Point object. More...
 
float getX (void)
 Get the Point's x coordinate value. More...
 
float getY (void)
 Get the Point's y coordinate value. More...
 
const PointgetDecorated (void)
 Get the pointer to Point used to check if that's a "decorated" Point. More...
 

Protected Member Functions

void setX (float x)
 Set the Point's x coordinate value. More...
 
void setY (float y)
 Set the Point's y coordinate value. More...
 

Private Attributes

float x
 Point's x coordinate. More...
 
float y
 Point's y coordinate. More...
 
const Pointdecorated
 A pointer to Point. More...
 

Detailed Description

Point class is used for point creations and manipulations.

Point class is a class that represents a 2D Point with its own x coordinate and y coordinate. Furthermore, the Decorator pattern it's implemented with a raw pointer to a Point.

Definition at line 21 of file Point.hpp.

Constructor & Destructor Documentation

◆ Point()

Point::Point ( float  x,
float  y,
Point decorated = nullptr 
)
inline

Construct a new Point object.

Parameters
xPoint's x coordinate value.
yPoint's y coordinate value.
decoratedA pointer to Point.

Definition at line 53 of file Point.hpp.

54 setX(x);
55 setY(y);
56 }
const Point * decorated
A pointer to Point.
Definition: Point.hpp:34
float x
Point's x coordinate.
Definition: Point.hpp:26
void setY(float y)
Set the Point's y coordinate value.
Definition: Point.cpp:19
float y
Point's y coordinate.
Definition: Point.hpp:30
void setX(float x)
Set the Point's x coordinate value.
Definition: Point.cpp:15

References setX(), setY(), x, and y.

◆ ~Point()

Point::~Point ( void  )

Destroy the Point object.

Definition at line 23 of file Point.cpp.

23 {
24 if (getDecorated() != nullptr) delete getDecorated();
25}
const Point * getDecorated(void)
Get the pointer to Point used to check if that's a "decorated" Point.
Definition: Point.cpp:37

References getDecorated().

Member Function Documentation

◆ getDecorated()

const Point * Point::getDecorated ( void  )

Get the pointer to Point used to check if that's a "decorated" Point.

Returns
const Point *

Definition at line 37 of file Point.cpp.

37 {
38 return this->decorated;
39}

References decorated.

Referenced by ~Point().

◆ getX()

float Point::getX ( void  )

Get the Point's x coordinate value.

Returns
float

Definition at line 29 of file Point.cpp.

29 {
30 return this->x;
31}

References x.

◆ getY()

float Point::getY ( void  )

Get the Point's y coordinate value.

Returns
float

Definition at line 33 of file Point.cpp.

33 {
34 return this->y;
35}

References y.

◆ setX()

void Point::setX ( float  x)
protected

Set the Point's x coordinate value.

Parameters
xPoint's x coordinate value.

Definition at line 15 of file Point.cpp.

15 {
16 this->x = x;
17}

References x.

Referenced by Point().

◆ setY()

void Point::setY ( float  y)
protected

Set the Point's y coordinate value.

Parameters
yPoint's y coordinate value.

Definition at line 19 of file Point.cpp.

19 {
20 this->y = y;
21}

References y.

Referenced by Point().

Member Data Documentation

◆ decorated

const Point* Point::decorated
private

A pointer to Point.

Definition at line 34 of file Point.hpp.

Referenced by getDecorated().

◆ x

float Point::x
private

Point's x coordinate.

Definition at line 26 of file Point.hpp.

Referenced by getX(), Point(), and setX().

◆ y

float Point::y
private

Point's y coordinate.

Definition at line 30 of file Point.hpp.

Referenced by getY(), Point(), and setY().


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