Struct representing a 2D point.
More...
#include <Board/Point.h>
◆ Point() [1/3]
LibBoard::Point::Point |
( |
| ) |
|
|
inline |
◆ Point() [2/3]
LibBoard::Point::Point |
( |
const Point & | other | ) |
|
|
inline |
Point constructor.
- Parameters
-
Definition at line 43 of file Point.h.
43:
x(other.x),
y(other.y) { }
References Point(), x, and y.
◆ Point() [3/3]
LibBoard::Point::Point |
( |
double | xc, |
|
|
double | yc ) |
|
inline |
Point constructor.
- Parameters
-
xc | The point's first coordinate. |
yc | The point's second coordinate. |
Definition at line 58 of file Point.h.
References x, and y.
◆ get()
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. |
Definition at line 103 of file Point.h.
References x, and y.
◆ norm()
double LibBoard::Point::norm |
( |
| ) |
const |
|
inline |
◆ operator*=()
Point & LibBoard::Point::operator*= |
( |
double | s | ) |
|
|
inline |
Definition at line 162 of file Point.h.
163{
166 return *this;
167}
References x, and y.
◆ operator+=()
Point & LibBoard::Point::operator+= |
( |
const Point & | other | ) |
|
|
inline |
Definition at line 146 of file Point.h.
147{
150 return *this;
151}
References Point(), x, and y.
◆ operator-()
Point LibBoard::Point::operator- |
( |
| ) |
|
|
inline |
◆ operator-=()
Point & LibBoard::Point::operator-= |
( |
const Point & | other | ) |
|
|
inline |
Definition at line 154 of file Point.h.
155{
158 return *this;
159}
References Point(), x, and y.
◆ operator/=()
Point & LibBoard::Point::operator/= |
( |
double | s | ) |
|
|
inline |
Definition at line 170 of file Point.h.
171{
174 return *this;
175}
References x, and y.
◆ operator=()
Point & LibBoard::Point::operator= |
( |
const Point & | other | ) |
|
|
default |
Default assignment operator.
- Parameters
-
References Point().
◆ rotate() [1/2]
Point & LibBoard::Point::rotate |
( |
double | angle | ) |
|
|
inline |
Rotate the point with a given angle around the origin (0,0)
- Parameters
-
Definition at line 190 of file Point.h.
191{
192 double newx = cos(
angle ) * Point::x - sin(
angle ) * Point::y;
193 double newy = sin(
angle ) * Point::x + cos(
angle ) * Point::y;
196 return *this;
197}
double angle(const DGtal::Z2i::RealPoint &point)
References angle(), x, and y.
Referenced by LibBoard::Text::rotate(), rotated(), and rotated().
◆ rotate() [2/2]
Point & LibBoard::Point::rotate |
( |
double | angle, |
|
|
const Point & | center ) |
|
inline |
Definition at line 206 of file Point.h.
207{
209 (*this).rotate(
angle );
211 return *this;
212}
Point center(const std::vector< Point > &points)
References angle(), and Point().
◆ rotated() [1/2]
Point LibBoard::Point::rotated |
( |
double | angle | ) |
const |
|
inline |
◆ rotated() [2/2]
Point LibBoard::Point::rotated |
( |
double | angle, |
|
|
const Point & | center ) const |
|
inline |
double LibBoard::Point::x |
The point's first coordinate
Definition at line 29 of file Point.h.
Referenced by LibBoard::Board::drawTriangle(), LibBoard::Board::fillGouraudTriangle(), LibBoard::Board::fillGouraudTriangle(), LibBoard::Board::fillTriangle(), LibBoard::GouraudTriangle::flushPostscript(), LibBoard::GouraudTriangle::flushSVG(), get(), norm(), LibBoard::operator!=(), LibBoard::operator*(), LibBoard::operator*(), LibBoard::operator*(), operator*=(), LibBoard::operator+(), operator+=(), LibBoard::operator-(), operator-(), operator-=(), LibBoard::operator/(), operator/=(), LibBoard::operator==(), Point(), Point(), Point(), LibBoard::Ellipse::rotate(), rotate(), LibBoard::Text::rotate(), LibBoard::Board::scale(), LibBoard::Board::scale(), LibBoard::Group::scale(), LibBoard::Group::scale(), LibBoard::Line::scale(), LibBoard::Path::scale(), LibBoard::ShapeList::scale(), LibBoard::Arrow::scaled(), LibBoard::Line::scaled(), and LibBoard::Board::State::unit().
double LibBoard::Point::y |
The point's second coordinate
Definition at line 30 of file Point.h.
Referenced by LibBoard::Board::drawTriangle(), LibBoard::Board::fillGouraudTriangle(), LibBoard::Board::fillGouraudTriangle(), LibBoard::Board::fillTriangle(), LibBoard::GouraudTriangle::flushPostscript(), LibBoard::GouraudTriangle::flushSVG(), get(), norm(), LibBoard::operator!=(), LibBoard::operator*(), LibBoard::operator*(), LibBoard::operator*(), operator*=(), LibBoard::operator+(), operator+=(), LibBoard::operator-(), operator-(), operator-=(), LibBoard::operator/(), operator/=(), LibBoard::operator==(), Point(), Point(), Point(), LibBoard::Ellipse::rotate(), rotate(), LibBoard::Text::rotate(), LibBoard::Board::scale(), LibBoard::Board::scale(), LibBoard::Group::scale(), LibBoard::Group::scale(), LibBoard::Line::scale(), LibBoard::Path::scale(), LibBoard::ShapeList::scale(), LibBoard::Arrow::scaled(), LibBoard::Line::scaled(), and LibBoard::Board::State::unit().
The documentation for this struct was generated from the following file: