Script
|
#include <math.h>
Public Slots | |
void | setXY (double, double) |
Set the value of x, y coordinate. | |
Point2d & | round () |
round x and y to floor with a resolution of 1.0/64.0 | |
Point2d & | round (double quantum) |
round x and y to floor with a resolution given | |
Point2d & | round (Vector2d v) |
Rounds this point in the direction of the given vector and using the resolution of 1.0/64.0. | |
Point2d & | round (Vector2d v, double quantum) |
Rounds this point in the direction of the given vector and using the given resolution. | |
Vector2d | toVector2d () |
Copy Point2d into a Vector2d container. | |
double | distance (Point2d p2) |
Calculate distance between two points. | |
double | distanceSq (Point2d p2) |
Calculate square distance between two points. | |
Vector2d | minus (Point2d p2) |
Substracts current Point2d with specified Point2d. | |
Point2d | minus (Vector2d v) |
Substracts current Point2d with specified Vector2d. | |
Point2d | add (Vector2d v) |
Add specified Vector2d to current Point2d. | |
Point2d & | addEq (Vector2d v) |
Add specified Vector2d to current Point2d. | |
Point2d & | minusEq (Vector2d v) |
Substract current Point2d with specified Vector2d. | |
Point2d & | interpolate (double t, Point2d p1, Point2d p2) |
Calculate Point2d as interpolation between two points. | |
Public Member Functions | |
Point2d () | |
Create a new empty Point2d. | |
Point2d (double x, double y) | |
Create a new Point2d. | |
Properties | |
double | x |
x value | |
double | y |
y value | |
The Point2d class defines a bi-dimensional point container. Point2d objects can be instantiated in the scripting environment.
You can use it in both Script Editor and scriptModule.
Point2d::Point2d | ( | ) |
Create a new empty Point2d.
Point2d::Point2d | ( | double | x, |
double | y | ||
) |
Create a new Point2d.
x | X value |
y | Y value |
|
slot |
|
slot |
|
slot |
round x and y to floor with a resolution of 1.0/64.0
|
slot |
round x and y to floor with a resolution given
Rounds this point in the direction of the given vector and using the resolution of 1.0/64.0.
Rounds this point in the direction of the given vector and using the given resolution.
|
slot |
Set the value of x, y coordinate.
|
readwrite |
x value
|
readwrite |
y value