Constructor GeoCoordinateSystem3
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GeoCoordinateSystem3(GeoPoint3, GeoVector3, GeoVector3)
Initializes a new coordinate system from an origin and two directions.
public GeoCoordinateSystem3(GeoPoint3 origin, GeoVector3 xAxis, GeoVector3 yAxis)
Parameters
originGeoPoint3The origin point.
xAxisGeoVector3The direction the local X axis should follow.
yAxisGeoVector3A direction on the positive Y side of the local XY plane.
Remarks
Two directions are parallel by the angle between them, whatever their lengths: where the sine of it is within the global vector tolerance of 1E-5. Two directions 0.002 long and square to each other span a system, where the length of their cross product, 4E-6, was read against that tolerance and they were refused as parallel; two 10 long and 5E-6 of a radian apart are parallel, where their cross product of 5E-4 passed.
The X direction is taken however short, only one of no length refused: (0, 6E-7, 8E-7) points the X axis along (0, 0.6, 0.8), where the global vector tolerance of 1E-5, read as a length, refused it as having none. So a scaling however small keeps a system's axes through TransformBy(GeoTransform3).
Exceptions
- ArgumentException
Thrown when either direction has zero length, or when the two are parallel, since parallel directions do not span a plane and leave the third axis undefined.
GeoCoordinateSystem3(GeoPlane3)
Initializes a coordinate system whose XY plane is a given plane.
public GeoCoordinateSystem3(GeoPlane3 plane)
Parameters
planeGeoPlane3The plane; its normal becomes the local Z axis.
Remarks
A plane fixes only one axis, so the in-plane pair comes from GetAxes(out GeoVector3, out GeoVector3) and is unspecified beyond being orthonormal and right-handed.