Skip to main content

Class: Point

Common.Point(x, y, zopt, wopt)

Represents point geometry

Constructor

new Point(x, y, zopt, wopt)

Creates a point

Parameters:
NameTypeAttributesDescription
xfloatThe point's horizontal coordinate
yfloatThe point's vertical coordinate
zfloat<optional>The point's depth coordinate
wfloat<optional>The point's perspective value

Methods

abs() → Common.Point

Absolute point. The original point is not altered.

Returns:

Transform as new Point

Type

Common.Point

absSelf() → Common.Point

Absolute point

Returns:

Current point

Type

Common.Point

add(point) → Common.Point

Applys addition. The original point is not altered.

Parameters:
NameTypeDescription
pointCommon.Point
Returns:

Transform as new Point

Type

Common.Point

addSelf(point) → Common.Point

Applys addition

Parameters:
NameTypeDescription
pointCommon.Point
Returns:

Current point

Type

Common.Point

divide(point) → Common.Point

Applys division. The original point is not altered.

Parameters:
NameTypeDescription
pointCommon.Point
Returns:

Transform as new Point

Type

Common.Point

divideSelf(point) → Common.Point

Applys division

Parameters:
NameTypeDescription
pointCommon.Point
Returns:

Current point

Type

Common.Point

multiply(point) → Common.Point

Applys multiplication. The original point is not altered.

Parameters:
NameTypeDescription
pointCommon.Point
Returns:

Transform as new Point

Type

Common.Point

multiplySelf(point) → Common.Point

Applys multiplication

Parameters:
NameTypeDescription
pointCommon.Point
Returns:

Current point

Type

Common.Point

scale(factor) → Common.Point

Scale point. The original point is not altered.

Parameters:
NameTypeDescription
factorfloatScale factor
Returns:

Transform as new Point

Type

Common.Point

scaleSelf(factor) → Common.Point

Scale point

Parameters:
NameTypeDescription
factorfloatScale factor
Returns:

Current point

Type

Common.Point

subtract(point) → Common.Point

Applys subtraction. The original point is not altered.

Parameters:
NameTypeDescription
pointCommon.Point
Returns:

Transform as new Point

Type

Common.Point

subtractSelf(point) → Common.Point

Applys subtraction

Parameters:
NameTypeDescription
pointCommon.Point
Returns:

Current point

Type

Common.Point

transform(matrix) → Common.Point

Transform point. The original point is not altered.

Parameters:
NameTypeDescription
matrixCommon.MatrixTransform matrix
Returns:

Transformed point

Type

Common.Point

transformSelf(matrix) → Common.Point

Transform point

Parameters:
NameTypeDescription
matrixCommon.MatrixTransform matrix
Returns:

Current point

Type

Common.Point

(static) fromPoint(point) → Common.Point

Creates a point from a given point data

Parameters:
NameTypeDescription
pointCommon.Point|JSON|Array|TypedArrayPoint data
Returns:

Point instance

Type

Common.Point

Home