|
Base Module
VST 3.6.5
SDK for developing VST Plug-in
|
#include <fpoint.h>
Public Member Functions | |
| Point (UCoord h=0, UCoord v=0) | |
| Construct a Point from (h, v). More... | |
| bool | inside (const Rect &rect) const |
Checks if point is inside rect. More... | |
| double | distance (const Point &other) const |
| Distance from the other to this point. More... | |
| double | angle (const Point &other) const |
| Angle from other to this Point. More... | |
| double | length () const |
| Calculate length (absolute value) of vector. More... | |
| Point | projection (const Point &other) const |
| Orthogonal vector projection of "this" on "other". More... | |
| bool | isLocated (Direction dir, const Point &from) |
Querying and Setting Values. | |
| UCoord | getH () const |
| Return the X value of this Point. More... | |
| UCoord | getV () const |
| Return the Y value of this Point. More... | |
| void | setH (UCoord h) |
| Set the X value of this Point. More... | |
| void | setV (UCoord v) |
| Set the Y value of this Point. More... | |
| void | offset (UCoord h, UCoord v=0) |
| Offset this Point by (x, y). More... | |
| void | offset (const Point &p) |
| Offset this Point by Point p. More... | |
| bool | bound (const Rect &rect) |
| Set this to the intersection of this and rect. More... | |
Operations on Point. | |
| Point & | operator() (UCoord h, UCoord v) |
| Reinitialize to given coordinates. More... | |
| Point | operator+ (const Point &p) const |
| Return p + this Point as a Point. More... | |
| Point | operator- (const Point &p) const |
| Return this Point minus p as a Point. More... | |
| Point | operator/ (int32 n) const |
| Return this Point divided by n as a Point (scalar divide). More... | |
| Point | operator* (int32 n) const |
| Return this Point times n as a Point (scalar multiply). More... | |
| Point & | operator+= (const Point &p) |
| Add p to this Point. More... | |
| Point & | operator-= (const Point &p) |
| Subtract p from this Point. More... | |
| Point & | operator*= (int32 n) |
| Scalar multiply n times this Point. More... | |
| Point & | operator/= (int32 n) |
| Scalar divide this Point by n. More... | |
| int32 | operator* (const Point &p) const |
| Scalar multiply this point with p. More... | |
| bool | operator!= (const Point &p) const |
| Not equal. More... | |
| Point & | operator= (const Point &p) |
| Assignment. More... | |
| Point | operator- () const |
| Reinitialize to given coordinates. More... | |
Data Fields | |
| UCoord | h |
| UCoord | v |
|
inline |
Return the X value of this Point.
|
inline |
Return the Y value of this Point.
|
inline |
Set the X value of this Point.
|
inline |
Set the Y value of this Point.
|
inline |
Offset this Point by (x, y).
| bool bound | ( | const Rect & | rect | ) |
Set this to the intersection of this and rect.
|
inline |
Reinitialize to given coordinates.
|
inline |
Scalar multiply this point with p.
|
inline |
Not equal.
|
inline |
Reinitialize to given coordinates.
| bool inside | ( | const Rect & | rect | ) | const |
Checks if point is inside rect.
| double distance | ( | const Point & | other | ) | const |
Distance from the other to this point.
| double length | ( | ) | const |
Calculate length (absolute value) of vector.
| bool isLocated | ( | Direction | dir, |
| const Point & | from | ||
| ) |
| UCoord h |
| UCoord v |