Board  0.6.devel
 All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Macros
LibBoard::Point Struct Reference

#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:
xThe point's first coordinate.
yThe point's second coordinate.

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

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

Point constructor.

Parameters:
xThe point's first coordinate.
yThe point's second coordinate.
LibBoard::Point::Point ( double  xc,
double  yc 
)
inline

Point constructor.

Parameters:
xcThe point's first coordinate.
ycThe 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:
xoutReference to the x to be set.
youtReference to the y to be set.

References x, and y.

Referenced by LibBoard::Dot::rotate(), LibBoard::Line::rotate(), LibBoard::Line::rotated(), and LibBoard::Arrow::rotated().

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)
inline

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

Parameters:
angleThe rotation angle.

References x, and y.

Referenced by rotate(), LibBoard::Dot::rotate(), LibBoard::Line::rotate(), LibBoard::Circle::rotate(), LibBoard::Text::rotate(), LibBoard::Line::rotated(), and LibBoard::Arrow::rotated().

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

References rotate().

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

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

Parameters:
angleThe 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: