Logo Euclid

Euclid Namespace

Type/Module Description

AutoOpenLine2D

When Euclid is opened this module will be auto-opened. It only contains extension members for type Line2D.

AutoOpenLine3D

When Euclid is opened this module will be auto-opened. It only contains extension members for type Line3D.

AutoOpenMatrix

When Euclid is opened this module will be auto-opened. It only contains extension members for type Matrix.

AutoOpenPnt

When Euclid is opened this module will be auto-opened. It only contains extension members for type Pnt.

AutoOpenPPlane

When Euclid is opened this module will be auto-opened. It only contains extension members for type PPlane.

AutoOpenPt

When Euclid is opened this module will be auto-opened. It only contains extension members for type Pt.

AutoOpenQuaternion

When Euclid is opened, this module will be auto-opened. It only contains extension members for the type Quaternion.

AutoOpenRigidMatrix

When Euclid is opened this module will be auto-opened. It only contains extension members for type RigidMatrix.

AutoOpenUnitVc

When Euclid is opened this module will be auto-opened. It only contains extension members for type UnitVc.

AutoOpenUnitVec

When Euclid is opened this module will be auto-opened. It only contains extension members for type UnitVec.

AutoOpenVc

When Euclid is opened this module will be auto-opened. It only contains extension members for type Vc.

AutoOpenVec

When Euclid is opened this module will be auto-opened. It only contains extension members for type Vec.

BBox

A struct of 6 floats representing an immutable 3D bounding box. This implementation guarantees the box to always be valid. That means the Min X, Y, and Z values are always smaller or equal to the respective Max values.

   Z-axis       Y-axis
   ^           /
   |   7      /        6 MaxPnt
   |   +---------------+
   |  /|    /         /|
   | / |   /         / |
 4 |/  |  /       5 /  |
   +---------------+   |
   |   |/          |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+----> X-axis
   0 MinPnt        1

 From the center of a BBox, the points have these signs of X, Y and Z coordinates:
 Pnt0 (-,-,-)
 Pnt1 (+,-,-)
 Pnt2 (+,-,+)
 Pnt3 (-,-,+)
 Pnt4 (-,+,-)
 Pnt5 (+,+,-)
 Pnt6 (+,+,+)
 Pnt7 (-,+,+)

Box

A struct of 9 floats representing an immutable 3D box with any rotation in 3D space. Described by z, y and z of the Origin and x, y and z for each of the three Edge vectors. Similar to PPlane, however the three vectors are not unitized. This implementation guarantees the box to be always valid. That means the Min X, Y and Z axes cannot be flipped individually. However the length of one of these axes might still be zero.

   local        local
   Z-axis       Y-axis
   ^           /
   |   7      /        6
   |   +---------------+
   |  /|    /         /|
   | / |   /         / |
 4 |/  |  /       5 /  |
   +---------------+   |
   |   |/          |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/     local
   +---------------+----> X-axis
   0               1

BRect

A struct of 4 floats representing an immutable 2D bounding rectangle. Sometimes also called 2D a bounding box. This implementation guarantees the rectangle to be always valid. That means the Min X and Y values are always smaller or equal than the respective Max values.

   Y-axis
   ^
   |
   |             2 max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-min X,Y      1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Cosine

A module of precalculated cosine values for faster checking the angles of dot products of unit-vectors.

EuclidErrors

An internal module for Euclid specific exceptions and failure functions.

Format

A module with functions for formatting floats with adaptive precision.

FreeBox

A mutable class containing a flat array of 24 floats representing an arbitrary 3D box-like topology. The 8 corner points are stored interleaved as x0, y0, z0, x1, y1, z1, ... x7, y7, z7. The points can be in arbitrary position in space. The instance members for transformations, like Move, Scale or Rotate, mutate the FreeBox in place and return unit. Their static counterparts, like FreeBox.move, FreeBox.scale or FreeBox.rotate, return a new FreeBox and leave the input unchanged. The indexed point setters and movers, setPoint, setXYZ, movePoint and moveXYZ, mutate in place and return unit, as instance and as static members. So do the setters of the corner properties, like Pnt0 or Pnt0X. Taking a point index alone does not mean mutation: getPoint and getLine only read the FreeBox. XYZs and xyzs expose the live coordinate array, changes to it change the FreeBox.

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Line2D

A struct containing 4 floats, representing an immutable finite line in 2D.

Line3D

A struct containing 6 floats, representing an immutable finite line in 3D.

Matrix

A struct containing 16 floats, representing an immutable 4x4 transformation matrix. The matrix is represented in the following column-vector syntax form:

 M11 M21 M31 X41
 M12 M22 M32 Y42
 M13 M23 M33 Z43
 M14 M24 M34 M44
Where X41, Y42 and Z43 refer to the translation part of the matrix. Note: Never use the struct default constructor Matrix() as it will create an invalid zero Matrix. Use Matrix.create or Matrix.createUnchecked instead.

MatrixDecomposition

A struct containing 13 floats, representing an immutable affine 4x4 Matrix decomposed into translation, rotation, scale and shear. Use Matrix.decompose to create one, and d.ToMatrix to recompose it. The components are applied to a point in this order: first Scale, then Shear, then Rotation and last Translation. So the recomposed matrix is the same as:

 Matrix.createScale d.ScaleX d.ScaleY d.ScaleZ
 *** Matrix.createShear(0, 0, d.ShearYX, 0, d.ShearZX, d.ShearZY)
 *** Matrix.createFromQuaternion d.Rotation
 *** Matrix.createTranslation d.Translation
The shear is upper triangular, so the X-axis is never sheared, the Y-axis is only sheared towards the X-axis, and the Z-axis is sheared towards the X- and Y-axis. A mirroring matrix has a negative ScaleX. Interpolating two decompositions component by component gives smooth animations between two matrices. Note: Never use the struct default constructor MatrixDecomposition() as it will create an invalid zero rotation. Use MatrixDecomposition.create instead.

NPlane

A struct containing a point and a unit normal, representing an unparametrized plane defined by a point and a normal vector. As opposed to the PPlane, this plane is not parametrized in X, Y, and Z directions. Internally it is stored as 6 floats (the Origin point coordinates and the normal vector components), just like the PPlane type. The Origin and Normal properties reconstruct the Pnt and UnitVec on demand. Note: Never use the struct default constructor NPlane() as it will create an invalid zero plane. Use NPlane.createFromNormal or NPlane.createUnchecked instead.

Offset2D

A module containing the core algorithms for offsetting 2D polylines. For a simpler interface, prefer the offset functions in the Polyline2D or Points2D module.

Offset3D

A module containing the core algorithms for offsetting 3D polylines. For a simpler interface, prefer the offset functions in the Polyline3D module. Each point gets its own offset direction: a local plane, with an in-plane direction perpendicular to each adjacent segment, and the direction perpendicular to that plane. At a corner the local plane contains both adjacent segments. A collinear point takes the plane interpolated between the neighboring corners.

Pnt

A struct containing 3 floats, representing an immutable 3D point. X, Y, and Z. A 3D point represents a location in space, but not direction. (use Vec for that.) (2D Points are called 'Pt' )

Points2D

A type containing only static member functions for operating on multiple 2D points or set of 2D points. Aka point-clouds

Points3D

A type containing only static member functions for operating on multiple 3D points or set of 3D points. Aka point-clouds

Polyline2D

A class holding a list of 2D points representing a mutable 2D Polyline. If the last point is the same as the first point, the Polyline2D is considered closed. The source-of-truth storage is an interleaved float buffer: x0, y0, x1, y1, ... The instance members for transformations, like Move, Scale or Rotate, and for clean up, like Reverse, Close or RemoveDuplicatePoints, mutate the Polyline2D in place and return unit. Their static counterparts, like Polyline2D.move, Polyline2D.reverse or Polyline2D.removeDuplicatePoints, return a new Polyline2D and leave the input unchanged. The indexed point setters and movers, setPoint, setPointPreservingClosure, setXY, setXYPreservingClosure, movePoint, moveXY, movePointPreservingClosure and moveXYPreservingClosure, and the append functions addPoint and addXY mutate in place and return unit, as instance and as static members. Taking a point index alone does not mean mutation: getPoint, getX, getY and getLine only read the Polyline2D. XYs and xys expose the live coordinate buffer, changes to it change the Polyline2D.

Polyline3D

A class holding a list of 3D points representing a mutable 3D Polyline. If the last point is the same as the first point, the Polyline3D is closed. The source-of-truth storage is an interleaved float buffer: x0, y0, z0, x1, y1, z1, ... The instance members for transformations, like Move, Scale or Rotate, and for clean up, like Reverse, Close or RemoveDuplicatePoints, mutate the Polyline3D in place and return unit. Their static counterparts, like Polyline3D.move, Polyline3D.reverse or Polyline3D.removeDuplicatePoints, return a new Polyline3D and leave the input unchanged. The indexed point setters and movers, setPoint, setPointPreservingClosure, setXYZ, setXYZPreservingClosure, movePoint, moveXYZ, movePointPreservingClosure and moveXYZPreservingClosure, and the append functions addPoint and addXYZ mutate in place and return unit, as instance and as static members. Taking a point index alone does not mean mutation: getPoint, getX, getY, getZ and getLine only read the Polyline3D. XYZs and xyzs expose the live coordinate buffer, changes to it change the Polyline3D.

PPlane

A struct containing one 3D point and three 3D unit vectors, representing an immutable parametrized plane or frame with unitized X, Y and Z Direction. Internally it is stored as 12 floats (the Origin point coordinates and the three axis vector components), just like the box type. The Origin, XAxis, YAxis and ZAxis properties reconstruct the Pnt and UnitVec on demand. This struct is called 'PPlane'; the other plane 'NPlane' refers to an un-oriented plane consisting only of an origin and a normal. Note: Never use the struct default constructor PPlane() as it will create an invalid zero length PPlane. Use PPlane.create or PPlane.createUnchecked instead.

Pt

Pt is an immutable 2D point. Made up from 2 floats: X and Y.

Quaternion

A struct containing 4 floats, representing an immutable unitized Quaternion, for arbitrary 3D rotations. This implementation guarantees the Quaternion to be always unitized. Note: Never use the struct default constructor Quaternion() as it will create an invalid zero length Quaternion. Use Quaternion.create or Quaternion.createUnchecked instead.

Rect2D

A struct containing a 2D Origin point and two 2D Edge vectors, representing an immutable 2D rectangle with any rotation in 2D space. This implementation guarantees the 2D rectangle to be always valid. That means the X and Y axes are always perpendicular to each other. However the length of one of these axes might still be zero.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Rect3D

A struct containing a 3D Origin point and two 3D Edge vectors, representing an immutable planar 3D-rectangle with any rotation in 3D space. Similar to PPlane, however the two vectors are not unitized. This implementation guarantees the 3D-rectangle to be always valid. That means the X and Y axes are always perpendicular to each other. However the length of one of these axes might still be zero.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

RigidMatrix

A struct containing 12 floats, representing an immutable 4x3 rigid transformation matrix. This matrix guarantees to NOT scale, shear, flip, mirror, reflect or project. Angles are preserved. Lengths are preserved. Area is preserved. Volume is preserved. Transformations with 4x3 RigidMatrices are faster than with the more general 4x4 Matrices. A rigid matrix is made from a rotational 3x3 part whose columns and rows are orthogonal 3D unit-vectors. The last 1x3 column is the translation part of the matrix. It can be thought of as a 4x4 Orthonormal matrix where the last row would always be 0, 0, 0, 1. Thus it is not stored in the RigidMatrix 4x3 struct. The matrix is represented in the following column-vector syntax form:

 M11 M21 M31 X41
 M12 M22 M32 Y42
 M13 M23 M33 Z43
Where X41, Y42 and Z43 refer to the translation part of the RigidMatrix. The Determinant of this matrix is always 1.0. Note: Never use the struct default constructor RigidMatrix() as it will create an invalid zero RigidMatrix. Use RigidMatrix.create instead.

Rotation2D

A struct containing 2 floats, representing a 2D counter-clockwise rotation. It can be applied in World X, Y or Z plane. Internally stored just as a Sine and Cosine value. For arbitrary rotations use Quaternions or 4x4 Matrix. However this module has much better performance than the more general Matrix4x4 or a Quaternion. Note: Never use the struct default constructor Rotation2D() as it will create an invalid zero Rotation2D. Use Rotation2D.createFromRadians, Rotation2D.createFromDegrees, or Rotation2D.createUnchecked instead.

Similarity2D

A module for finding 2D object that are similar but not exactly the same. Based on their 2D point clouds. Within one list of points the order does not matter, but each location must exist only once in order to be consider similar within the tolerance. (This module could be extended to work in 3d too)

Tangent

A module of precalculated tangent values for faster checking the angles between two vectors. The Cross Product length (=determinant) divided by the Dot Product value gives the tangent of the angle between two vectors. If one of vectors has a zero length, the tangent is NaN

Topology2D

A type containing only static member functions for 2D topological operations.

Topology3D

A type containing only static member functions for 3D topological operations.

Tria2D

A type containing only static member functions for operations on 2D Triangles.

Tria3D

A type containing only static member functions for operations on 3D Triangles.

UnitVc

A struct containing 2 floats, representing a 2D unitized vector. All instances of this type are guaranteed to be always unitized. Never use the struct default constructor UnitVc()! It will create an invalid zero length vector. Use UnitVc.create or UnitVc.createUnchecked instead.

UnitVec

A struct containing 3 floats, representing a 3D unit vector. All instances of this type are guaranteed to be always unitized. A 3D vector represents a direction or translation in space, but not a location. A 4x4 transformation matrix applied to a vector will only rotate and scale the vector but not translate it. (2D unit-vectors are called 'UnitVc' ) Use UnitVec.create or UnitVec.createUnchecked to create instances. Note: Never use the struct default constructor UnitVec() as it will create an invalid zero length vector. Use UnitVec.create or UnitVec.createUnchecked instead.

UtilEuclid

A module for math , logic utility functions and default tolerance values for use within Euclid.

Vc

Vc is an immutable 2D vector with any length. Made up from 2 floats: X and Y.

Vec

An immutable 3D vector of any length. Made up from 3 floats: X, Y, and Z. A 3D vector represents a direction or translation in space, but not a location. A 4x4 transformation matrix applied to a vector will only rotate and scale the vector but not translate it. (3D unit-vectors of length 1.0 are called 'UnitVec' ) (2D vectors are called 'Vc' )

XLine2D (Module)

A module containing the result types for 2D Line-Line-Intersections and 2D Line-Line relationship queries.

XLine2D (Type)

A type containing only static member functions for computing 2D line intersections. Some functions return Discriminated Unions from the XLine2D module.

XLine3D (Module)

A module containing the result types for 3D Line-Line-Intersections, 3D Line-Line relationship queries, and Line-Cone intersections.

XLine3D (Type)

A type containing only static member functions for computing 3D line intersections and closest approaches. Some functions return Discriminated Unions from the XLine3D module.

XLineXY

XLineXYZ

Type something to start searching.