Transformer

smile.modeling.Transformer
object Transformer

Contains methods for transforming positions, particularly for rotation and scaling operations.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

final def rotate(position: Pos, angleInDegrees: Double): Pos

Rotates a Pos instance around the origin by a given angle.

Rotates a Pos instance around the origin by a given angle.

Value parameters

angleInDegrees

the angle (in degrees), the amount of which to rotate

position

position to be rotated

Attributes

Returns

a rotated Pos instance

final def rotate(positions: Seq[Pos], angleInDegrees: Double): Seq[Pos]

Rotates a sequence of Pos instances around the origin by a given angle.

Rotates a sequence of Pos instances around the origin by a given angle.

Value parameters

angleInDegrees

the angle (in degrees), the amount of which to rotate

positions

positions to be rotated

Attributes

Returns

a sequence of rotated Pos instances

final def rotate(position: Pos, angleInDegrees: Double, centerOfRotation: Pos): Pos

Rotates a Pos instance around a given point by a given angle.

Rotates a Pos instance around a given point by a given angle.

Value parameters

angleInDegrees

the angle (in degrees), the amount of which to rotate

centerOfRotation

center point of the rotation

position

position to be rotated

Attributes

Returns

a rotated Pos instance

final def rotate(positions: Seq[Pos], angleInDegrees: Double, centerOfRotation: Pos): Seq[Pos]

Rotates a sequence of Pos instances around a given point by a given angle.

Rotates a sequence of Pos instances around a given point by a given angle.

Value parameters

angleInDegrees

the angle (in degrees), the amount of which to rotate

centerOfRotation

center point of the rotation

positions

positions to be rotated

Attributes

Returns

a sequence of rotated Pos instances

final def rotateBy180Degs(position: Pos): Pos

Rotates a Pos instance around the origin (0,0) by 180 degrees.

Rotates a Pos instance around the origin (0,0) by 180 degrees.

Value parameters

position

position to be rotated

Attributes

Returns

a rotated Pos instance

final def rotateBy180Degs(positions: Seq[Pos]): Seq[Pos]

Rotates a sequence of Pos instances around the origin (0,0) by 180 degrees.

Rotates a sequence of Pos instances around the origin (0,0) by 180 degrees.

Value parameters

positions

positions to be rotated

Attributes

Returns

a sequence of rotated Pos instances

final def rotateBy180Degs(position: Pos, centerOfRotation: Pos): Pos

Rotates a Pos instance around a given point by 180 degrees.

Rotates a Pos instance around a given point by 180 degrees.

Value parameters

centerOfRotation

center point of the rotation

position

position to be rotated

Attributes

Returns

a rotated Pos instance

final def rotateBy180Degs(positions: Seq[Pos], centerOfRotation: Pos): Seq[Pos]

Rotates a sequence of Pos instances around a given point by 180 degrees.

Rotates a sequence of Pos instances around a given point by 180 degrees.

Value parameters

centerOfRotation

center point of the rotation

positions

positions to be rotated

Attributes

Returns

a sequence of rotated Pos instances

final def rotateBy90DegsCCW(position: Pos): Pos

Rotates a Pos instance around the origin (0,0) by 90 degrees counterclockwise.

Rotates a Pos instance around the origin (0,0) by 90 degrees counterclockwise.

Value parameters

position

position to be rotated

Attributes

Returns

a rotated Pos instance

final def rotateBy90DegsCCW(positions: Seq[Pos]): Seq[Pos]

Rotates a sequence of Pos instances around the origin (0,0) by 90 degrees counterclockwise.

Rotates a sequence of Pos instances around the origin (0,0) by 90 degrees counterclockwise.

Value parameters

positions

positions to be rotated

Attributes

Returns

a sequence of rotated Pos instances

final def rotateBy90DegsCCW(position: Pos, centerOfRotation: Pos): Pos

Rotates a Pos instance around a given point by 90 degrees counterclockwise.

Rotates a Pos instance around a given point by 90 degrees counterclockwise.

Value parameters

centerOfRotation

center point of the rotation

position

position to be rotated

Attributes

Returns

a rotated Pos instance

final def rotateBy90DegsCCW(positions: Seq[Pos], centerOfRotation: Pos): Seq[Pos]

Rotates a sequence of Pos instances around a given point by 90 degrees counterclockwise.

Rotates a sequence of Pos instances around a given point by 90 degrees counterclockwise.

Value parameters

centerOfRotation

center point of the rotation

positions

positions to be rotated

Attributes

Returns

a sequence of rotated Pos instances

final def rotateBy90DegsCW(position: Pos): Pos

Rotates a Pos instance around the origin (0,0) by 90 degrees clockwise.

Rotates a Pos instance around the origin (0,0) by 90 degrees clockwise.

Value parameters

position

position to be rotated

Attributes

Returns

a rotated Pos instance

final def rotateBy90DegsCW(positions: Seq[Pos]): Seq[Pos]

Rotates a sequence of Pos instances around the origin (0,0) by 90 degrees clockwise.

Rotates a sequence of Pos instances around the origin (0,0) by 90 degrees clockwise.

Value parameters

positions

positions to be rotated

Attributes

Returns

a sequence of rotated Pos instances

final def rotateBy90DegsCW(position: Pos, centerOfRotation: Pos): Pos

Rotates a Pos instance around a given point by 90 degrees clockwise.

Rotates a Pos instance around a given point by 90 degrees clockwise.

Value parameters

centerOfRotation

center point of the rotation

position

position to be rotated

Attributes

Returns

a rotated Pos instance

final def rotateBy90DegsCW(positions: Seq[Pos], centerOfRotation: Pos): Seq[Pos]

Rotates a sequence of Pos instances around a given point by 90 degrees clockwise.

Rotates a sequence of Pos instances around a given point by 90 degrees clockwise.

Value parameters

centerOfRotation

center point of the rotation

positions

positions to be rotated

Attributes

Returns

a sequence of rotated Pos instances

final def scale(position: Pos, scalingFactor: Double): Pos

Scales a Pos instance (i.e., its position) in relation to the origin (0,0) by a given factor.

Scales a Pos instance (i.e., its position) in relation to the origin (0,0) by a given factor.

Value parameters

position

position to be scaled

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a scaled Pos instance

final def scale(positions: Seq[Pos], scalingFactor: Double): Seq[Pos]

Scales a sequence of Pos instances (i.e., their positions) in relation to the origin (0,0) by a given factor.

Scales a sequence of Pos instances (i.e., their positions) in relation to the origin (0,0) by a given factor.

Value parameters

positions

positions to be scaled

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a sequence of scaled Pos instances

final def scale(position: Pos, horizontalScalingFactor: Double, verticalScalingFactor: Double): Pos

Scales a Pos instance (i.e., its position) in relation to the origin (0,0) by given factors.

Scales a Pos instance (i.e., its position) in relation to the origin (0,0) by given factors.

Value parameters

horizontalScalingFactor

factor describing the magnitude of horizontal scaling

position

position to be scaled

verticalScalingFactor

factor describing the magnitude of vertical scaling

Attributes

Returns

a scaled Pos instance

final def scale(positions: Seq[Pos], horizontalScalingFactor: Double, verticalScalingFactor: Double): Seq[Pos]

Scales a sequence of Pos instances (i.e., their positions) in relation to the origin (0,0) by given factors.

Scales a sequence of Pos instances (i.e., their positions) in relation to the origin (0,0) by given factors.

Value parameters

horizontalScalingFactor

factor describing the magnitude of horizontal scaling

positions

positions to be scaled

verticalScalingFactor

factor describing the magnitude of vertical scaling

Attributes

Returns

a sequence of scaled Pos instances

final def scale(position: Pos, scalingFactor: Double, relativityPoint: Pos): Pos

Scales a Pos instance (i.e., its position) in relation to a given point by a given factor.

Scales a Pos instance (i.e., its position) in relation to a given point by a given factor.

Value parameters

position

position to be scaled

relativityPoint

point, relative to which to scale

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a scaled Pos instance

final def scale(positions: Seq[Pos], scalingFactor: Double, relativityPoint: Pos): Seq[Pos]

Scales a sequence of Pos instances (i.e., their positions) in relation to a given point by a given factor.

Scales a sequence of Pos instances (i.e., their positions) in relation to a given point by a given factor.

Value parameters

positions

positions to be scaled

relativityPoint

point, relative to which to scale

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a sequence of scaled Pos instances

final def scale(position: Pos, horizontalScalingFactor: Double, verticalScalingFactor: Double, relativityPoint: Pos): Pos

Scales a Pos instance (i.e., its position) in relation to a given point by given factors.

Scales a Pos instance (i.e., its position) in relation to a given point by given factors.

Value parameters

horizontalScalingFactor

factor describing the magnitude of horizontal scaling

position

position to be scaled

relativityPoint

point, relative to which to scale

verticalScalingFactor

factor describing the magnitude of vertical scaling

Attributes

Returns

a scaled Pos instance

final def scale(positions: Seq[Pos], horizontalScalingFactor: Double, verticalScalingFactor: Double, relativityPoint: Pos): Seq[Pos]

Scales a sequence of Pos instances (i.e., their positions) in relation to a given point by given factors.

Scales a sequence of Pos instances (i.e., their positions) in relation to a given point by given factors.

Value parameters

horizontalScalingFactor

factor describing the magnitude of horizontal scaling

positions

positions to be scaled

relativityPoint

point, relative to which to scale

verticalScalingFactor

factor describing the magnitude of vertical scaling

Attributes

Returns

a sequence of scaled Pos instances

final def scaleHorizontally(position: Pos, scalingFactor: Double): Pos

Scales a Pos instance's distance from the Y axis by a given factor.

Scales a Pos instance's distance from the Y axis by a given factor.

Value parameters

position

position to be scaled

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a scaled Pos instance

final def scaleHorizontally(positions: Seq[Pos], scalingFactor: Double): Seq[Pos]

Scales distances of a sequence of Pos instances from the Y axis by a given factor.

Scales distances of a sequence of Pos instances from the Y axis by a given factor.

Value parameters

positions

positions to be scaled

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a sequence of scaled Pos instances

final def scaleHorizontally(position: Pos, scalingFactor: Double, relativityPoint: Pos): Pos

Scales a Pos instance's X-wise distance from a given point by a given factor.

Scales a Pos instance's X-wise distance from a given point by a given factor.

Value parameters

position

position to be scaled

relativityPoint

point, relative to which to scale

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a scaled Pos instance

final def scaleHorizontally(positions: Seq[Pos], scalingFactor: Double, relativityPoint: Pos): Seq[Pos]

Scales X-wise distances of a sequence of Pos instances from a given point by a given factor.

Scales X-wise distances of a sequence of Pos instances from a given point by a given factor.

Value parameters

positions

positions to be scaled

relativityPoint

point, relative to which to scale

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a sequence of scaled Pos instances

final def scaleVertically(position: Pos, scalingFactor: Double): Pos

Scales a Pos instance's distance from the X axis by a given factor.

Scales a Pos instance's distance from the X axis by a given factor.

Value parameters

position

position to be scaled

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a scaled Pos instance

final def scaleVertically(positions: Seq[Pos], scalingFactor: Double): Seq[Pos]

Scales distances of a sequence of Pos instances from the X axis by a given factor.

Scales distances of a sequence of Pos instances from the X axis by a given factor.

Value parameters

positions

positions to be scaled

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a sequence of scaled Pos instances

final def scaleVertically(position: Pos, scalingFactor: Double, relativityPoint: Pos): Pos

Scales a Pos instance's Y-wise distance from a given point by a given factor.

Scales a Pos instance's Y-wise distance from a given point by a given factor.

Value parameters

position

position to be scaled

relativityPoint

point, relative to which to scale

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a scaled Pos instance

final def scaleVertically(positions: Seq[Pos], scalingFactor: Double, relativityPoint: Pos): Seq[Pos]

Scales Y-wise distances of a sequence of Pos instances from a given point by a given factor.

Scales Y-wise distances of a sequence of Pos instances from a given point by a given factor.

Value parameters

positions

positions to be scaled

relativityPoint

point, relative to which to scale

scalingFactor

factor describing the magnitude of scaling

Attributes

Returns

a sequence of scaled Pos instances