Class GeoTransform2
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
Represents a 2D transformation as a 3x3 homogeneous matrix, covering translation, rotation, scaling and mirroring.
The matrix is stored row-major and applied on the left, so a.Multiply(b) means "apply b, then
a", the usual convention for column vectors. Instances are immutable: every operation returns a new
transformation rather than changing this one. It is the counterpart in the plane of
GeoTransform3, and the two are built and read the same way.
public sealed class GeoTransform2 : IEquatable<GeoTransform2>
- Inheritance
-
GeoTransform2
- Implements
- Inherited Members
Constructors
- GeoTransform2()
Initializes an identity transformation.
- GeoTransform2(double[,])
Initializes a transformation from a 3x3 matrix.
Properties
- Identity
Gets the identity transformation, which leaves everything where it is.
- this[int, int]
Gets the matrix entry at a row and column, counted from zero.
Methods
- Clone()
Creates a copy of this transformation.
- Equals(GeoTransform2)
Determines whether another transformation holds exactly the same matrix.
- Equals(object)
Determines whether the specified object is an equal transformation.
- FromCoordinateSystem(GeoCoordinateSystem2)
Gets the transformation that places geometry built about the origin into a local coordinate system.
- FromFrame(GeoPoint2, GeoVector2)
Creates the transformation that takes the world frame to a local frame: the origin to
originand the X axis alongxAxis.
- GetDeterminant()
Gets the determinant of the linear part: the factor the transformation multiplies areas by, negative when it also turns shapes round.
- GetHashCode()
Returns the hash code for this transformation.
- Inverse()
Gets the transformation that undoes this one, using the default tolerance.
- Inverse(Tolerance)
Gets the transformation that undoes this one, within a tolerance.
- IsEqualTo(GeoTransform2)
Determines whether another transformation is the same within the default tolerance.
- IsEqualTo(GeoTransform2, Tolerance)
Determines whether another transformation is the same within a tolerance.
- Mirror(GeoLine2)
Creates a reflection across the line carrying a segment.
- Multiply(GeoTransform2)
Multiplies this transformation by another: the result applies
otherfirst, then this one.
- Rotation(GeoPoint2, double)
Creates a rotation about a point.
- Rotation(double)
Creates a rotation about the origin.
- Scaling(GeoPoint2, double)
Creates a uniform scaling about a point.
- Scaling(double)
Creates a uniform scaling about the origin.
- Scaling(double, double)
Creates a scaling about the origin with a factor per axis.
- ToCoordinateSystem(GeoCoordinateSystem2)
Gets the transformation that reads geometry of the drawing in a local coordinate system, the reverse of FromCoordinateSystem(GeoCoordinateSystem2).
- ToString()
Describes the transformation.
- Transform(GeoCircle2)
Transforms a circle.
- Transform(GeoFace2)
Transforms a face and its holes.
- Transform(GeoLine2)
Transforms a segment.
- Transform(GeoPoint2)
Transforms a point.
- Transform(GeoPolygon2)
Transforms a polygon.
- Transform(GeoPolyline2)
Transforms a chain.
- Transform(GeoRectangle2)
Transforms a rectangle.
- Transform(GeoTriangle2)
Transforms a triangle, corner by corner.
- Transform(GeoVector2)
Transforms a vector, which the translation does not touch.
- Transform(IEnumerable<GeoPoint2>)
Transforms a sequence of points.
- Translation(GeoVector2)
Creates a translation.
- TryGetInverse(out GeoTransform2)
Tries to get the transformation that undoes this one, using the default tolerance.
- TryGetInverse(out GeoTransform2, Tolerance)
Tries to get the transformation that undoes this one, within a tolerance.
Operators
- operator *(GeoTransform2, GeoTransform2)
Multiplies two transformations: the result applies
rightfirst, thenleft.