Struct GeoCoordinateSystem3
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
Represents a 3D local coordinate system: an origin and three orthonormal axes.
The axes are always orthonormal, whatever is passed in. The supplied X direction is kept, the Z axis is taken as X × Y, and the Y axis is then rebuilt as Z × X. That third step is what makes the system square: keeping the supplied Y unchanged would leave a skewed frame in which ToLocal(GeoPoint3) and ToGlobal(GeoPoint3) stop being inverses of each other, and every measurement taken through it would be quietly wrong.
public readonly struct GeoCoordinateSystem3 : IEquatable<GeoCoordinateSystem3>
- Implements
- Inherited Members
- Extension Methods
Constructors
- GeoCoordinateSystem3(GeoPlane3)
Initializes a coordinate system whose XY plane is a given plane.
- GeoCoordinateSystem3(GeoPoint3, GeoVector3, GeoVector3)
Initializes a new coordinate system from an origin and two directions.
Properties
- Global
Gets the global coordinate system: origin at (0, 0, 0) with the world axes.
- IsValid
Gets whether this is a shape a constructor could have made: the origin is a valid point and the axes of unit length, square to each other and right-handed.
- Origin
Gets the origin point of the coordinate system.
- XAxis
Gets the local X axis, a unit vector.
- YAxis
Gets the local Y axis, a unit vector perpendicular to the other two.
- ZAxis
Gets the local Z axis, a unit vector perpendicular to the other two.
Methods
- Clone()
Creates a copy of this coordinate system.
- Equals(GeoCoordinateSystem3)
Determines whether another coordinate system has exactly the same origin and axes.
- Equals(object)
Determines whether the specified object is equal to the current coordinate system.
- GetHashCode()
Returns the hash code for this instance.
- GetPlane()
Gets the XY plane of this coordinate system, oriented along the local Z axis.
- IsEqualTo(GeoCoordinateSystem3)
Compares whether this coordinate system equals another using the default tolerance.
- IsEqualTo(GeoCoordinateSystem3, Tolerance)
Compares whether this coordinate system equals another within a tolerance.
- ToGlobal(GeoPoint3)
Converts a point given in this system's local coordinates into world coordinates.
- ToGlobal(GeoVector3)
Converts a vector given in this system's local coordinates into world coordinates.
- ToLocal(GeoPoint3)
Converts a point given in world coordinates into this system's local coordinates.
- ToLocal(GeoVector3)
Converts a vector given in world coordinates into this system's local coordinates.
- ToString()
Returns a string that represents the current coordinate system.
- ToTransform()
Gets the transformation that takes local coordinates to world coordinates.
- TransformBy(GeoTransform3)
Applies a transformation to this coordinate system.
Operators
- operator ==(GeoCoordinateSystem3, GeoCoordinateSystem3)
Checks if two coordinate systems have exactly the same origin and axes.
- operator !=(GeoCoordinateSystem3, GeoCoordinateSystem3)
Checks if two coordinate systems differ in origin or any axis.