Public Member Functions | Data Fields

LibBoard::Point Struct Reference

Struct representing a 2D point. More...

#include <Point.h>

Public Member Functions

 Point ()
 Point (const Point &other)
 Point (double xc, double yc)
Pointrotate (double angle)
void get (double &xout, double &yout) const
Point rotated (double angle) const
Pointrotate (double angle, const Point &center)
Pointrotated (double angle, const Point &center) const
Pointoperator+= (const Point &other)
Pointoperator-= (const Point &other)
Pointoperator*= (double s)
Pointoperator/= (double s)
Point operator- ()
double norm () const

Data Fields

double x
double y

Detailed Description

Struct representing a 2D point.

The Point structure.


Constructor & Destructor Documentation

LibBoard::Point::Point (  )  [inline]

Point constructor.

Parameters:
x The point's first coordinate.
y The point's second coordinate.

Referenced by operator-(), and rotated().

LibBoard::Point::Point ( const Point other  )  [inline]

Point constructor.

Parameters:
x The point's first coordinate.
y The point's second coordinate.
LibBoard::Point::Point ( double  xc,
double  yc 
) [inline]

Point constructor.

Parameters:
xc The point's first coordinate.
yc The point's second coordinate.

Member Function Documentation

void LibBoard::Point::get ( double &  xout,
double &  yout 
) const [inline]

Get the values of the x and y values.

Parameters:
xout Reference to the x to be set.
yout Reference to the y to be set.

References x, and y.

double LibBoard::Point::norm (  )  const [inline]

References x, and y.

Referenced by LibBoard::Rectangle::flushSVG(), and LibBoard::Text::rotate().

Point & LibBoard::Point::operator*= ( double  s  )  [inline]

References x, and y.

Point & LibBoard::Point::operator+= ( const Point other  )  [inline]

References x, and y.

Point LibBoard::Point::operator- (  )  [inline]

References Point(), x, and y.

Point & LibBoard::Point::operator-= ( const Point other  )  [inline]

References x, and y.

Point & LibBoard::Point::operator/= ( double  s  )  [inline]

References x, and y.

Point & LibBoard::Point::rotate ( double  angle,
const Point center 
) [inline]

References rotate().

Point & LibBoard::Point::rotate ( double  angle  )  [inline]

Rotate the point with a given angle around the origin (0,0)

Parameters:
angle The rotation angle.

References x, and y.

Referenced by LibBoard::Text::rotate(), LibBoard::Circle::rotate(), and rotate().

Point LibBoard::Point::rotated ( double  angle  )  const [inline]

Rotate the point with a given angle around the origin (0,0)

Parameters:
angle The rotation angle.
Returns:
The rotated point.

References Point().

Referenced by LibBoard::Ellipse::rotate().

Point & LibBoard::Point::rotated ( double  angle,
const Point center 
) const [inline]

References Point().


Field Documentation


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