Transform the bounding box using the provided projection transform

@param transform
projection transform
@return transformed bounding box
@since 3.0.0
480533
public BoundingBox transform(ProjectionTransform transform) {
		BoundingBox transformed = this;
		if (transform.isSameProjection()) {
			transformed = new BoundingBox(transformed);
		} else {
			if (transform.getFromProjection().isUnit(Units.DEGREES)) {
				transformed = TileBoundingBoxUtils
						.boundDegreesBoundingBoxWithWebMercatorLimits(transformed);
			}
			GeometryEnvelope envelope = buildEnvelope(transformed);
			GeometryEnvelope transformedEnvelope = transform
					.transform(envelope);
			transformed = new BoundingBox(transformedEnvelope);
		}
		return transformed;
	}
902063
public T params(Map transformation) {
        this.transformation = transformation;
        transformations.add(transformation);
        return (T) this;
    }
1199377
private Rectangle2D transformedBounds(Shape shape) {
        Rectangle2D rectangle2D = shape.getBounds2D();
        Point2D minPoint = new Point2D.Double(rectangle2D.getMinX(), rectangle2D.getMinY());
        Point2D maxPoint = new Point2D.Double(rectangle2D.getMaxX(), rectangle2D.getMaxY());

        transform.transform(minPoint, minPoint);
        transform.transform(maxPoint, maxPoint);

        // may be flipped by transformation
        double minX = Math.min(minPoint.getX(), maxPoint.getX());
        double maxX = Math.max(minPoint.getX(), maxPoint.getX());
        double minY = Math.min(minPoint.getY(), maxPoint.getY());
        double maxY = Math.max(minPoint.getY(), maxPoint.getY());

        return new Rectangle2D.Double(minX, minY, maxX - minX, maxY - minY);
    }
1359364
function transform(transform) {
  for (let i = 0; i < this.length; i += 1) {
    const elStyle = this[i].style;
    elStyle.webkitTransform = transform;
    elStyle.transform = transform;
  }
  return this;
}
461118
@Pure
	public double[] toDoubleArray(Transform3D transform) {
		double[] clone = new double[this.numCoords];
		if (transform==null) {
			for(int i=0; i<this.numCoords; ++i) {
				clone[i] = this.coords[i];
			}
		}
		else {
			Point3f p = new Point3f();
			for(int i=0; i<clone.length;) {
				p.x = this.coords[i];
				p.y = this.coords[i+1];
				p.y = this.coords[i+2];
				transform.transform(p);
				clone[i++] = p.x;
				clone[i++] = p.y;
				clone[i++] = p.z;
			}
		}
		return clone;
	}
1281960
public Matrix4f getTransform(Item item, TransformType transformType)
	{
		switch (transformType)
		{
			case THIRD_PERSON_LEFT_HAND:
				return thirdPersonLeftHand;
			case THIRD_PERSON_RIGHT_HAND:
				return thirdPersonRightHand;
			case FIRST_PERSON_LEFT_HAND:
				return firstPersonLeftHand;
			case FIRST_PERSON_RIGHT_HAND:
				return firstPersonRightHand;
			case HEAD:
				return head;
			case GUI:
				return gui;
			case GROUND:
				return ground;
			case FIXED:
				return fixed;
			default:
				return null;
		}
	}
618999
public Object transformObject(TransformationDescription description, Object source, Object target)
        throws InstantiationException, IllegalAccessException, ClassNotFoundException {
        checkNeededValues(description);
        Class<?> sourceClass = modelRegistry.loadModel(description.getSourceModel());
        Class<?> targetClass = modelRegistry.loadModel(description.getTargetModel());
        if (!sourceClass.isAssignableFrom(source.getClass())) {
            throw new IllegalArgumentException("The given source object does not match the given description");
        }
        this.source = source;
        if (target == null) {
            this.target = targetClass.newInstance();
        } else {
            this.target = target;
        }
        for (TransformationStep step : description.getTransformingSteps()) {
            performTransformationStep(step);
        }
        return this.target;
    }
1241236
private BoundingBox transform(BoundingBox boundingBox, final Widget widget) {
        return transform(boundingBox, widget.getTransform()
                .getLocalModelMatrix4f());
    }
228513
public Matrix3 setToTransform (IVector translation, double rotation, double scale) {
        return setToRotation(rotation).set(m00 * scale, m10 * scale, translation.x(),
                                           m01 * scale, m11 * scale, translation.y(),
                                           0f, 0f, 1f);
    }
1187267
public BoundingBox getBoundingBox(Projection projection) {
        ProjectionTransform webMercatorToProjection = ProjectionFactory
                .getProjection(ProjectionConstants.EPSG_WEB_MERCATOR)
                .getTransformation(projection);
        return webMercatorBoundingBox
                .transform(webMercatorToProjection);
    }
703549
@SuppressWarnings("deprecation")
   private void updateParentBoundingBox(SvgElement obj)
   {
      if (obj.parent == null)       // skip this if obj is root element
         return;
      if (obj.boundingBox == null)  // empty bbox, possibly as a result of a badly defined element (eg bad use reference etc)
         return;

      // Convert the corners of the child bbox to world space
      Matrix  m = new Matrix();
      // Get the inverse of the child transform
      if (matrixStack.peek().invert(m)) {
         float[] pts = {obj.boundingBox.minX, obj.boundingBox.minY,
                        obj.boundingBox.maxX(), obj.boundingBox.minY,
                        obj.boundingBox.maxX(), obj.boundingBox.maxY(),
                        obj.boundingBox.minX, obj.boundingBox.maxY()};
         // Now concatenate the parent's matrix to create a child-to-parent transform
         m.preConcat(canvas.getMatrix());
         m.mapPoints(pts);
         // Finally, find the bounding box of the transformed points
         RectF  rect = new RectF(pts[0], pts[1], pts[0], pts[1]);
         for (int i=2; i<=6; i+=2) {
            if (pts[i] < rect.left) rect.left = pts[i]; 
            if (pts[i] > rect.right) rect.right = pts[i]; 
            if (pts[i+1] < rect.top) rect.top = pts[i+1]; 
            if (pts[i+1] > rect.bottom) rect.bottom = pts[i+1]; 
         }
         // Update the parent bounding box with the transformed bbox
         SvgElement  parent = (SvgElement) parentStack.peek();
         if (parent.boundingBox == null)
            parent.boundingBox = Box.fromLimits(rect.left, rect.top, rect.right, rect.bottom);
         else
            parent.boundingBox.union(Box.fromLimits(rect.left, rect.top, rect.right, rect.bottom));
      }
   }
302563
public Matrix4 setToTransform (IVector3 translation, IQuaternion rotation, IVector3 scale) {
        double sx = scale.x(), sy = scale.y(), sz = scale.z();
        return setToRotation(rotation).set(
            m00 * sx, m10 * sy, m20 * sz, translation.x(),
            m01 * sx, m11 * sy, m21 * sz, translation.y(),
            m02 * sx, m12 * sy, m22 * sz, translation.z(),
            0f, 0f, 0f, 1f);
    }
144315
private static double[] transformToLabelProjection(
            final MathTransform toLabelProjection,
            final Coordinate borderIntersection) {
        try {
            double[] labelProj = new double[2];
            toLabelProjection
                    .transform(new double[]{borderIntersection.x, borderIntersection.y}, 0, labelProj, 0, 1);
            return labelProj;
        } catch (TransformException e) {
            throw new RuntimeException(e);
        }
    }
714593
private static CmsRectangle transformRegionBack(I_CmsTransform transform, CmsRectangle region) {

        CmsPoint topLeft = region.getTopLeft();
        CmsPoint bottomRight = region.getBottomRight();
        return CmsRectangle.fromPoints(transform.transformBack(topLeft), transform.transformBack(bottomRight));
    }
78390
@Override
	public void transform(Transform3D transform) {
		if (transform!=null) {
			Point3D p = new Point3f();
			for(int i=0; i<this.numCoords;) {
				p.set(this.coords[i], this.coords[i+1], this.coords[i+2]);
				transform.transform(p);
				this.coords[i++] = p.getX();
				this.coords[i++] = p.getY();
				this.coords[i++] = p.getZ();
			}
			this.graphicalBounds = null;
			this.logicalBounds = null;
		}
	}
170425
public void setBoundingBox(BoundingBox boundingBox, Projection projection) {
        ProjectionTransform projectionToWebMercator = projection
                .getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR);
        webMercatorBoundingBox = boundingBox
                .transform(projectionToWebMercator);
    }
561638
public BoundingBox getBoundingBox(Projection projection) {

		BoundingBox boundingBox = null;

		List<String> tables = null;
		try {
			tables = getTables();
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to query for contents tables", e);
		}

		for (String table : tables) {
			BoundingBox tableBoundingBox = getBoundingBox(projection, table);
			if (tableBoundingBox != null) {
				if (boundingBox != null) {
					boundingBox = boundingBox.union(tableBoundingBox);
				} else {
					boundingBox = tableBoundingBox;
				}
			}
		}

		return boundingBox;
	}