openshot-audio
0.1.5
|
#include <juce_Point.h>
Public Types | |
typedef TypeHelpers::SmallestFloatType< ValueType >::type | FloatType |
Public Member Functions | |
Point () noexcept | |
Point (const Point &other) noexcept | |
Point (ValueType initialX, ValueType initialY) noexcept | |
Point & | operator= (const Point &other) noexcept |
bool | operator== (Point other) const noexcept |
bool | operator!= (Point other) const noexcept |
bool | isOrigin () const noexcept |
bool | isFinite () const noexcept |
ValueType | getX () const noexcept |
ValueType | getY () const noexcept |
void | setX (ValueType newX) noexcept |
void | setY (ValueType newY) noexcept |
Point | withX (ValueType newX) const noexcept |
Point | withY (ValueType newY) const noexcept |
void | setXY (ValueType newX, ValueType newY) noexcept |
void | addXY (ValueType xToAdd, ValueType yToAdd) noexcept |
Point | translated (ValueType deltaX, ValueType deltaY) const noexcept |
Point | operator+ (Point other) const noexcept |
Point & | operator+= (Point other) noexcept |
Point | operator- (Point other) const noexcept |
Point & | operator-= (Point other) noexcept |
template<typename OtherType > | |
Point | operator* (Point< OtherType > other) const noexcept |
template<typename OtherType > | |
Point & | operator*= (Point< OtherType > other) noexcept |
template<typename OtherType > | |
Point | operator/ (Point< OtherType > other) const noexcept |
template<typename OtherType > | |
Point & | operator/= (Point< OtherType > other) noexcept |
template<typename FloatType > | |
Point | operator* (FloatType multiplier) const noexcept |
template<typename FloatType > | |
Point | operator/ (FloatType divisor) const noexcept |
template<typename FloatType > | |
Point & | operator*= (FloatType multiplier) noexcept |
template<typename FloatType > | |
Point & | operator/= (FloatType divisor) noexcept |
Point | operator- () const noexcept |
ValueType | getDistanceFromOrigin () const noexcept |
ValueType | getDistanceFrom (Point other) const noexcept |
FloatType | getAngleToPoint (Point other) const noexcept |
Point | rotatedAboutOrigin (ValueType angleRadians) const noexcept |
Point< FloatType > | getPointOnCircumference (float radius, float angle) const noexcept |
Point< FloatType > | getPointOnCircumference (float radiusX, float radiusY, float angle) const noexcept |
FloatType | getDotProduct (Point other) const noexcept |
void | applyTransform (const AffineTransform &transform) noexcept |
Point | transformedBy (const AffineTransform &transform) const noexcept |
Point< int > | toInt () const noexcept |
Point< float > | toFloat () const noexcept |
Point< double > | toDouble () const noexcept |
Point< int > | roundToInt () const noexcept |
String | toString () const |
Public Attributes | |
ValueType | x |
ValueType | y |
A pair of (x, y) coordinates.
The ValueType template should be a primitive type such as int, float, double, rather than a class.
typedef TypeHelpers::SmallestFloatType<ValueType>::type Point< ValueType >::FloatType |
This type will be double if the Point's type is double, otherwise it will be float.
Creates a point at the origin
|
inlinenoexcept |
Creates a copy of another point.
|
inlinenoexcept |
Creates a point from an (x, y) position.
|
inlinenoexcept |
Adds a pair of coordinates to this value.
|
inlinenoexcept |
Uses a transform to change the point's coordinates. This will only compile if ValueType = float!
|
inlinenoexcept |
Returns the angle from this point to another one.
The return value is the number of radians clockwise from the 12 o'clock direction, where this point is the centre and the other point is on the circumference.
|
inlinenoexcept |
Returns the straight-line distance between this point and another one.
|
inlinenoexcept |
Returns the straight-line distance between this point and the origin.
|
inlinenoexcept |
Returns the dot-product of two points (x1 * x2 + y1 * y2).
|
inlinenoexcept |
Taking this point to be the centre of a circle, this returns a point on its circumference.
radius | the radius of the circle. |
angle | the angle of the point, in radians clockwise from the 12 o'clock position. |
|
inlinenoexcept |
Taking this point to be the centre of an ellipse, this returns a point on its circumference.
radiusX | the horizontal radius of the circle. |
radiusY | the vertical radius of the circle. |
angle | the angle of the point, in radians clockwise from the 12 o'clock position. |
|
inlinenoexcept |
Returns the point's x coordinate.
|
inlinenoexcept |
Returns the point's y coordinate.
|
inlinenoexcept |
Returns true if the coordinates are finite values.
|
inlinenoexcept |
Returns true if the point is (0, 0).
|
inlinenoexcept |
|
inlinenoexcept |
Multiplies two points together
|
inlinenoexcept |
Returns a point whose coordinates are multiplied by a given scalar value.
|
inlinenoexcept |
Multiplies another point's coordinates to this one
|
inlinenoexcept |
Multiplies the point's coordinates by a scalar value.
|
inlinenoexcept |
Adds two points together
|
inlinenoexcept |
Adds another point's coordinates to this one
|
inlinenoexcept |
Subtracts one points from another
Returns the inverse of this point.
|
inlinenoexcept |
Subtracts another point's coordinates to this one
|
inlinenoexcept |
Divides one point by another
|
inlinenoexcept |
Returns a point whose coordinates are divided by a given scalar value.
|
inlinenoexcept |
Divides this point's coordinates by another
|
inlinenoexcept |
Divides the point's coordinates by a scalar value.
|
inlinenoexcept |
Copies this point from another one.
|
inlinenoexcept |
|
inlinenoexcept |
Returns the point that would be reached by rotating this point clockwise about the origin by the specified angle.
Casts this point to a Point<int> object using roundToInt() to convert the values.
|
inlinenoexcept |
Sets the point's x coordinate.
|
inlinenoexcept |
Changes the point's x and y coordinates.
|
inlinenoexcept |
Sets the point's y coordinate.
Casts this point to a Point<double> object.
Casts this point to a Point<float> object.
Casts this point to a Point<int> object.
Returns the point as a string in the form "x, y".
|
inlinenoexcept |
Returns the position of this point, if it is transformed by a given AffineTransform.
|
inlinenoexcept |
Returns a point with a given offset from this one.
Returns a point which has the same Y position as this one, but a new X.
Returns a point which has the same X position as this one, but a new Y.
ValueType Point< ValueType >::x |
The point's X coordinate.
ValueType Point< ValueType >::y |
The point's Y coordinate.