HM_Transform

Contains information about a transformation between different coordinate systems.

Syntax

struct HM_Transform {
HM_Vector x_axis;
HM_Vector y_axis;
HM_Vector z_axis;
HM_Point origin;
};

Type

HyperMesh Ext API

Description

This structure contains information about a transformation between different coordinate systems. The structure HM_Transform contains information about basis vectors and origin of some coordinate system S’ expressed in terms of the reference system R. The meaning of the coordinate system S’ depends on the context of the API function that uses the structure HM_Transform.

Figure 1.

If the point X has coordinates x’, y’, and z’ in the coordinate system S’ then in the reference system R the coordinates of the point X are:

x = x’ * x_axis.xyz[0] + y’ * y_axis.xyz[0] + z’ * z_axis.xyz[0] + origin.xyz[0]

y = x’ * x_axis.xyz[1] + y’ * y_axis.xyz[1] + z’ * z_axis.xyz[1] + origin.xyz[1]

z = x’ * x_axis.xyz[2] + y’ * y_axis.xyz[2] + z’ * z_axis.xyz[2] + origin.xyz[2]

If the vector V has components x’, y’, and z’ in the coordinate system S’ then in the reference system R the components of the vector V are

x = x’ * x_axis.xyz[0] + y’ * y_axis.xyz[0] + z’ * z_axis.xyz[0]

y = x’ * x_axis.xyz[1] + y’ * y_axis.xyz[1] + z’ * z_axis.xyz[1]

z = x’ * x_axis.xyz[2] + y’ * y_axis.xyz[2] + z’ * z_axis.xyz[2]

The structure information is declared in hm_extapi.h.

The members are: x_axis, y_axis, z_axis, origin

Inputs

x_axis
The x-axis vector.
y_axis
The y-axis vector.
z_axis
The z-axis vector.
origin
The position of the origin.

Errors

None.