Interface Transformation.Builder

    • Method Detail

      • origin

        Transformation.Builder origin​(Vector3d 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
      • mirror

        Transformation.Builder mirror​(Axis axis)
        Performs a reflection of -1 in the direction of the given Axis, where the plane from which scaling is performed is normal to this axis and contains the origin(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
      • performRounding

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