Hide menu
Loading...
Searching...
No Matches
Transformation

Describes object transformation in 3D space.

Constructors

new Transformation()

new Transformation(rotation?, translation?, scaleFactor?): Transformation

Parameters

rotation?

Matrix3d

Rotation matrix of the transformation.

translation?

Vector

Translation vector of the transformation.

scaleFactor?

number

Scale factor.

Returns

Transformation

new Transformation()

new Transformation(axis): Transformation

Parameters

axis

Axis3d

Axis.

Returns

Transformation

new Transformation()

new Transformation(source, target): Transformation

Parameters

source

Axis3d

Source axis.

target

Axis3d

Target axis.

Returns

Transformation

new Transformation()

new Transformation(vector, angle, translation?): Transformation

Parameters

vector

Vector

Rotation vector.

angle

number

Rotation angle.

translation?

Vector

Translation vector of the transformation.

Returns

Transformation

new Transformation()

new Transformation(axis, angle, translation?): Transformation

Parameters

axis

Axis1d

Rotation axis.

angle

number

Rotation angle.

translation?

Vector

Translation vector of the transformation.

Returns

Transformation

Properties

rotation

rotation: Matrix3d

Rotation matrix of the transformation


scaleFactor

scaleFactor: number = 1

Scale factor


translation

translation: Vector

Translation vector of the transformation

Methods

clone()

clone(): Transformation

Creates new Transformation object same as this.

Returns

Transformation


copy()

copy(other): this

Copies other transformation to this.

Parameters

other

Transformation

Copied object.

Returns

this


invert()

invert(): this

Inverts this transformation.

Returns

this


inverted()

inverted(): Transformation

Returns new Point object received by performing a invert() operation to this object.

Returns

Transformation


isEqual()

isEqual(other): boolean

Returns true if other transformation is equal to this transformation.

Parameters

other

Transformation

Other transformation.

Returns

boolean


isIdentity()

isIdentity(): boolean

Returns true if transformation is identity.

Returns

boolean


isNegative()

isNegative(): boolean

Returns true if rotation matrix determinant less than 0.

Returns

boolean


multiplied()

multiplied(other): Transformation

Returns new Transformation object received by performing a multiply() operation to this object.

Parameters

other

Transformation

Other transformation.

Returns

Transformation


multiply()

multiply(other): this

Multiplies this transformation with other.

Parameters

other

Transformation

Other transformation.

Returns

this


power()

power(num): this

Powers this transformation.

Parameters

num

number

Power value.

Returns

this


powered()

powered(num): Transformation

Returns new Transformation object received by performing a power() operation to this object.

Parameters

num

number

Power value.

Returns

Transformation


resetToIdentity()

resetToIdentity(): this

Returns

this


setRotation()

Call Signature

setRotation(matrix): this

Sets rotation matrix of transformation.

Parameters

matrix

Matrix3d

Rotation matrix.

Returns

this

Call Signature

setRotation(axis, angle): this

Sets transformation as rotation around axis on angle.

Parameters

axis

Axis1d

Rotation axis.

angle

number

Rotation angle.

Returns

this

Call Signature

setRotation(vector, angle): this

Sets transformation as rotation around vector on angle.

Parameters

vector

Vector

Rotation vector.

angle

number

Rotation angle.

Returns

this


setScaleFactor()

setScaleFactor(scaleFactor): this

Sets scale factor of transformation.

Parameters

scaleFactor

number

Scale factor.

Returns

this


setTranslation()

Call Signature

setTranslation(vector): this

Sets translation vector of transformation.

Parameters

vector

Vector

Translation vector.

Returns

this

Call Signature

setTranslation(point1, point2): this

Sets translation vector of transformation.

Parameters

point1

Point

First point of translation vector.

point2

Point

Second point of translation vector.

Returns

this


mirrorTransformation()

Call Signature

static mirrorTransformation(point): Transformation

Returns new Transformation object that represent mirror transformation relative to the point.

Parameters

point

Point

Mirror point.

Returns

Transformation

Call Signature

static mirrorTransformation(axis): Transformation

Returns new Transformation object that represent mirror transformation relative to the axis.

Parameters

axis

Axis1d

Mirror axis.

Returns

Transformation

Call Signature

static mirrorTransformation(axis): Transformation

Returns new Transformation object that represent mirror transformation relative to the axis.

Parameters

axis

Axis3d

Mirror axis.

Returns

Transformation


rotateTransformation()

Call Signature

static rotateTransformation(vector, angle): Transformation

Returns new Transformation object that represent rotate transformation.

Parameters

vector

Vector

Rotation vector.

angle

number

Rotation angle.

Returns

Transformation

Call Signature

static rotateTransformation(axis, angle): Transformation

Returns new Transformation object that represent rotate transformation.

Parameters

axis

Axis1d

Rotation axis.

angle

number

Rotation angle.

Returns

Transformation


scaleTransformation()

static scaleTransformation(point, scale): Transformation

Returns new Transformation object that represent scale transformation.

Parameters

point

Point

Point.

scale

number

Scale.

Returns

Transformation


translateTransformation()

static translateTransformation(vector): Transformation

Returns new Transformation object that represent translate transformation.

Parameters

vector

Vector

Translation vector.

Returns

Transformation