Local Coordinate System MbPlacement3D

The MbPlacement3D class is declared in the mb_placement3d.h file.

The local coordinate system in three-dimensional space MbPlacement3D is defined by the initial point origin and three non-coplanar vectors axisX, axisY, axisZ:

../../../../_images/O.1.4.1.png

In most cases the coordinate system is right-handed, and the system vectors are orthonormal. By means of transformations the coordinate system can become left-handed and non-orthonormal. The state of a local coordinate system can be queried by the following methods:

  • bool IsLeft() — whether the coordinate system is left-handed;

  • bool IsRight() — whether the coordinate system is right-handed;

  • bool IsTranslation() — whether the origin origin of the coordinate system is shifted;

  • bool IsRotation() — whether the coordinate system is rotated with respect to the global one;

  • bool IsOrt() — whether the coordinate system is marked as orthogonal by the internal flag;

  • bool IsSingle() — whether the coordinate system coincides with the global one;

  • bool IsNormal() — whether the coordinate system is orthonormal;

  • bool IsOrthogonal() — whether the coordinate system is orthogonal;

  • bool IsCircular() — whether the coordinate system is orthogonal with the axisX and axisY axes of equal length, so that a circle remains a circle;

  • bool IsIsotropic() — whether the coordinate system is orthogonal with the axisX, axisY, axisZ axes of equal length, so that objects are not distorted and only scaled;

  • bool IsAffine() — whether the coordinate system is affine (allows translation, scaling, and skewing of axes).

The local coordinate system is Cartesian. A point in the Cartesian coordinate system is defined by three coordinates x, y, z. A local coordinate system can act as a cylindrical or a spherical coordinate system.

The local coordinate system MbPlacement3D can be used to define a cylindrical coordinate system. In this case the origin of the cylindrical system coincides with the origin of the Cartesian system, the Oz-axis coincides with the Z-axis of the Cartesian system, and the main plane coincides with the XY-plane.

A point in a cylindrical coordinate system is defined by three coordinates r, f, z:

  • r, f are the polar coordinates of the projection of the point onto the main plane;

  • r specifies the length of the radius vector projection;

  • f specifies the polar angle of the radius vector projection, z specifies the distance from the point to the main plane.

When the local coordinate system MbPlacement3D is used as a spherical coordinate system, a point is defined by three coordinates r, f, w:

  • r specifies the distance from the origin to the point (the length of the radius vector);

  • f specifies the angle between the projection of the radius vector onto the plane and a ray lying in this plane (longitude);

  • w specifies the angle between the radius vector and the normal to the plane of the spherical coordinate system (polar distance).

The plane of the spherical coordinate system coincides with the XY-plane of the Cartesian system, and the longitude f is measured from the X-axis towards the positive direction of the Y-axis.