OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::Point2DD Class Reference

2D Point with double values More...

#include "Point2D.h"

Inheritance diagram for ot::Point2DD:
ot::Serializable

Public Member Functions

 Point2DD ()
 
 Point2DD (double _x, double _y)
 
 Point2DD (const Point2DD &_other)
 
virtual ~Point2DD ()
 
Point2DDoperator= (const Point2DD &_other)
 
bool operator== (const Point2DD &_other) const
 
bool operator!= (const Point2DD &_other) const
 
Point2DD operator+ (const Point2DD &_other) const
 
Point2DDoperator+= (const Point2DD &_other)
 
Point2DD operator- (const Point2DD &_other) const
 
Point2DDoperator-= (const Point2DD &_other)
 
virtual void addToJsonObject (JsonValue &_object, JsonAllocator &_allocator) const override
 Add the object contents to the provided JSON object.
 
virtual void setFromJsonObject (const ConstJsonObject &_object) override
 Will set the object contents from the provided JSON object.
 
double x (void) const
 Returns the current X value.
 
double y (void) const
 Returns the current Y value.
 
void setX (double _x)
 Set the X value.
 
void setY (double _y)
 Set the Y value.
 
void set (double _x, double _y)
 Set the X and Y value.
 
Point2D toPoint2D (void) const
 
Point2DF toPoint2DF (void) const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
virtual void addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const =0
 Add the object contents to the provided JSON object.
 

Detailed Description

2D Point with double values

Constructor & Destructor Documentation

◆ Point2DD() [1/3]

ot::Point2DD::Point2DD ( )
inline

◆ Point2DD() [2/3]

ot::Point2DD::Point2DD ( double _x,
double _y )
inline

◆ Point2DD() [3/3]

ot::Point2DD::Point2DD ( const Point2DD & _other)
inline

◆ ~Point2DD()

virtual ot::Point2DD::~Point2DD ( )
inlinevirtual

Member Function Documentation

◆ addToJsonObject()

void ot::Point2DD::addToJsonObject ( JsonValue & _object,
JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_documentThe JSON document (used to get the allocator)
_objectThe JSON object to add the contents to

◆ operator!=()

bool ot::Point2DD::operator!= ( const Point2DD & _other) const
inline

◆ operator+()

Point2DD ot::Point2DD::operator+ ( const Point2DD & _other) const
inline

◆ operator+=()

Point2DD & ot::Point2DD::operator+= ( const Point2DD & _other)
inline

◆ operator-()

Point2DD ot::Point2DD::operator- ( const Point2DD & _other) const
inline

◆ operator-=()

Point2DD & ot::Point2DD::operator-= ( const Point2DD & _other)
inline

◆ operator=()

Point2DD & ot::Point2DD::operator= ( const Point2DD & _other)
inline

◆ operator==()

bool ot::Point2DD::operator== ( const Point2DD & _other) const
inline

◆ set()

void ot::Point2DD::set ( double _x,
double _y )
inline

Set the X and Y value.

Parameters
_xThe X value to set
_yThe y value to set

◆ setFromJsonObject()

void ot::Point2DD::setFromJsonObject ( const ConstJsonObject & _object)
overridevirtual

Will set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information
Exceptions
Willthrow an exception if the provided object is not valid (members missing or invalid types)

Implements ot::Serializable.

◆ setX()

void ot::Point2DD::setX ( double _x)
inline

Set the X value.

Parameters
_xThe X value to set

◆ setY()

void ot::Point2DD::setY ( double _y)
inline

Set the Y value.

Parameters
_yThe Y value to set

◆ toPoint2D()

ot::Point2D ot::Point2DD::toPoint2D ( void ) const

◆ toPoint2DF()

ot::Point2DF ot::Point2DD::toPoint2DF ( void ) const

◆ x()

double ot::Point2DD::x ( void ) const
inline

Returns the current X value.

◆ y()

double ot::Point2DD::y ( void ) const
inline

Returns the current Y value.


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