The 3D ACIS® Modeler (ACIS) is Spatial’s prominent 3D solid modeling engine. 3D InterOp is a CAD data translation framework (Interoperability)

HowTo:Create a Transformation from an orthogonal Matrix?

From DocR19

Jump to: navigation, search

A transformation can be created from an orthogonal SPAmatrix by using the coordinate_transf function in transf.hxx. Set the new_origin position to be (0,0,0), and take new_x_axis and new_y_axis to be the first two rows of the SPAmatrix, normalized if necessary.

Contents

Signature

SPAtransf coordinate_transf(SPAposition const& new_origin, SPAunit_vector const& new_x_axis, SPAunit_vector const& new_y_axis);

Header Files

#include "transf.hxx"

Example

SPAmatrix mat = someorthogonalmatrix;
SPAposition new_origin(0.0, 0.0, 0.0);
SPAunit_vector new_x_axis = normalise(mat.column(0));
SPAunit_vector new_y_axis = normalise(mat.column(1));
SPAtransf tr = coordinate_transf(new_origin, new_x_axis, new_y_axis);

Notes

  • If the SPAmatrix is not orthogonal, this method will not generate the desired SPAtransf.

Related Content

See also: :Category:FAQs
Personal tools