FXUtil

Profile: desktop, common

Overview

Script Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
public-readZERO_POINTPoint2D

The zero-point with coordinates (0.0; 0.0).

Inherited Variables

Script Function Summary

public add(p1: javafx.geometry.Point2D, p2: javafx.geometry.Point2D) : javafx.geometry.Point2D

Adds two Point2D objects.

Adds two Point2D objects. This function is immutable, the result is returned.

Parameters
p1

The first Point2D.

p2

The second Point2D.

Returns
Point2D
Result of the addition.

Profile: desktop

 
public createPoint(origin: javafx.geometry.Point2D, angle: Number, radius: Number) : javafx.geometry.Point2D

This function creates a new Point2D from given polar-coordinates.

This function creates a new Point2D from given polar-coordinates. The new Point2D is created from polar-coordinates (angle, radius) using a given Point2D as origin.

Parameters
origin
The origin to start calculation from.
angle
The angle of the polar-coordinates.
radius
The radius of the polar-coordinates.
Returns
Point2D
The created Point2D .

Profile: desktop

 
public distanceSqrd(p1: javafx.geometry.Point2D, p2: javafx.geometry.Point2D) : Number

Calculates the squared distance between two Point2D objects.

Calculates the squared distance between two Point2D objects.

Parameters
p1

The first Point2D.

p2

The second Point2D.

Returns
Number
The squared distance between the points.

Profile: desktop

 
public getAngle(start: javafx.geometry.Point2D, end: javafx.geometry.Point2D) : Number

Returns the angle between the x-axis and a line defined by two points.

Returns the angle between the x-axis and a line defined by two points. The result will be in radians and in the range between -pi and pi.

Parameters
start
The startpoint of the vector of the requested angle.
end
The endpoint of the vector of the requested angle.
Returns
Number
The angle theta.

Profile: desktop

 
public interpolate(start: javafx.geometry.Point2D, end: javafx.geometry.Point2D, t: Number) : javafx.geometry.Point2D

Calculates the interpolated point between two Point2D objects.

Calculates the interpolated point between two Point2D objects.

Parameters
start

The first Point2D.

end

The second Point2D.

t
The interpolation-factor in the range [0..1].
Returns
Point2D
The interpolated Point2D .

Profile: desktop

 

Inherited Functions