Interface Transformation.Builder
 All Superinterfaces:
ResettableBuilder<Transformation,Transformation.Builder>
 Enclosing interface:
 Transformation
transformations
.
Apart from the origin
transformation, all
actions will be performed in the order specified in the builder. Thus,
a translation then a rotation will not produce the same results as
the reverse.

Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aTransformation
Performs a reflection of 1 in the direction of the givenAxis
, where the plane from which scaling is performed is normal to this axis and contains theorigin(Vector3d)
.Specifies the origin for position transformations.performRounding(boolean round)
Attempts to round the result to attempt to compensate for machine precision.Performs a simple additive translation of a positionVector3d
by this supplied vector.Methods inherited from interface org.spongepowered.api.util.ResettableBuilder
reset

Method Details

origin
Specifies the origin for position transformations.This is a special transform in that this translation is performed before the rest of the transformations are made. Once all transformations are performed, this transformation is undone. This is especially useful if you are only transforming around a given origin which is not at (0, 0, 0), as other transformations specified in this object will be performed around this origin instead.
This does not affect
Transformation.transformDirection(Vector3d)
 Parameters:
origin
 The origin to transform around Returns:
 This builder, for chaining

rotate
 Parameters:
rotation
 TheRotation
to perform Returns:
 This builder, for chaining

mirror
Performs a reflection of 1 in the direction of the givenAxis
, where the plane from which scaling is performed is normal to this axis and contains theorigin(Vector3d)
.For example, for a point (1, 2, 3), using this transformation in the direction the x axis where the origin is at (0, 0, 0) will result in a transformation to (1, 2, 3).
This action is effectively a scaling of 1 in the axis direction.
 Parameters:
axis
 The axis that represents the direction of scaling Returns:
 This builder, for chaining

translate
Performs a simple additive translation of a positionVector3d
by this supplied vector.This does not affect
Transformation.transformDirection(Vector3d)
 Parameters:
translate
 The translation Returns:
 This builder, for chaining

performRounding
Attempts to round the result to attempt to compensate for machine precision. Defaults totrue
. Parameters:
round
 Whether to perform rounding Returns:
 This builder, for chaining
 See Also:
Transformation.performsRounding()

build
Transformation build()Builds aTransformation
 Returns:
 A
Transformation
