The mt library is a set of classes and functions that implement concepts from the domains of geometry and rigid body mechanics. Here are some examples of the functionalities provided by the library:
- Parameterized floating-point type specifically designed for handling tolerance-based (absolute and relative) equality and inequality tests, as well as robust implementations of common math functions such as inverse trigonometric functions, sqrt, log, etc. (e.g., sqrt of a negative value that is smaller than the specified tolerance will yield zero, not an error). Refer to the documentation of the scalar.h and basic_scalar.h for further details.
- Classes that model closed intervals, 3D vectors, 3x3 matrices, quaternions, and rigid transformations, along with a comprehensive set of meaningful operations that can be applied (e.g., usual operator overloads, matrix inverse computation, transformation propagation and interpolation). The special cases of 3D unit vectors and unit quaternions have also been implemented.
- Classes that model 3D geometric elements such as points, lines, planes, spheres, cylinders, circles, and ellipses. There also exist relation classes for querying the geometric relation that exists between two elements (distance, angle, intersections, etc.)
If the Boost library is installed (http://www.boost.org) a variant datatype is avaliable that can contain any of the geometric elements (uses boost::variant). Also, all the basic math classes as well as the geometric element classes (the only exceptions are the relation classes) have serialization functions implemented (uses boost::serialization), which can be useful for marshalling and persistence purposes. Define the project-wide macros MT_USE_BOOST and MT_USE_SERIALIZATION to make these headers available when including this file. If MT_USE_BOOST is defined, but MT_USE_SERIALIZATION is not, then the variant datatype functionality is included, but the serialization header is not.