Пример #1
0
            public RectangleD3D GetBounds(Matrix3x3 additionalTransformation)
            {
                var t = _transformation.WithAppendedTransformation(additionalTransformation);

                var lx = new VectorD3D(t.M11, t.M21, t.M31).Length;
                var ly = new VectorD3D(t.M12, t.M22, t.M32).Length;
                var lz = new VectorD3D(t.M13, t.M23, t.M33).Length;

                return(new RectangleD3D(new PointD3D(t.M41 - lx, t.M42 - ly, t.M43 - lz), new VectorD3D(2 * lx, 2 * ly, 2 * lz)));
            }
Пример #2
0
 /// <summary>
 /// Returns a new <see cref="RectangularObjectOutline"/> object, at wich the provided transformation is appended.
 /// Thus, when having a <see cref="RectangularObjectOutline"/> in object coordinates, by calling this function with the current
 /// localToWorldTransformation, one gets a <see cref="RectangularObjectOutline"/> in world coordinates.
 /// </summary>
 /// <param name="transformation">The transformation to append.</param>
 /// <returns>New <see cref="RectangularObjectOutline"/> object with the provided transformation appended.</returns>
 public RectangularObjectOutline WithAdditionalTransformation(Matrix4x3 transformation)
 {
     return(new RectangularObjectOutline(_rectangle, _transformation.WithAppendedTransformation(transformation)));
 }