MyScript Interactive Ink SDK 4.2.0
Public Member Functions | Public Attributes | Friends | List of all members
myscript::iink::graphics::Point Struct Reference

#include <Point.h>

Public Member Functions

 Point ()=default
 
 Point (float x, float y) noexcept
 
bool isFinite () const noexcept
 
bool operator== (const Point &other) const noexcept
 
bool operator!= (const Point &other) const noexcept
 

Public Attributes

float x = 0.f
 
float y = 0.f
 

Friends

std::ostream & operator<< (std::ostream &os, const Point &p)
 

Detailed Description

Represents a point on the 2D plane.

Constructor & Destructor Documentation

◆ Point() [1/2]

myscript::iink::graphics::Point::Point ( )
default

Default constructor.

◆ Point() [2/2]

myscript::iink::graphics::Point::Point ( float  x,
float  y 
)
inlinenoexcept

Constructor.

Parameters
xthe x coordinate of the point.
ythe y coordinate of the point.

Member Function Documentation

◆ isFinite()

bool myscript::iink::graphics::Point::isFinite ( ) const
inlinenoexcept

Checks if point values are finite.

Returns
true if both x and y are finite, otherwise false.
Since
4.1

◆ operator==()

bool myscript::iink::graphics::Point::operator== ( const Point &  other) const
inlinenoexcept

Operator == overload.

Parameters
otherthe point to compare this with.
Returns
true if the points are strictly equal, otherwise false.

◆ operator!=()

bool myscript::iink::graphics::Point::operator!= ( const Point &  other) const
inlinenoexcept

Operator != overload.

Parameters
otherthe point to compare this with.
Returns
true if the points are strictly equal, otherwise false.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Point &  p 
)
friend

Inserts a textual representation of a point in the output stream.

Parameters
osthe output stream.
pthe point.
Returns
the stream.

Member Data Documentation

◆ x

float myscript::iink::graphics::Point::x = 0.f

The x position of the point.

◆ y

float myscript::iink::graphics::Point::y = 0.f

The y position of the point.


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