Overview
This tutorial demonstrates how to apply multiple transformations of the same type in Transformation3, ensuring each transformation takes effect.
Method
First, let's examine an incorrect approach. In the following code, only the third SetRotation is effective, while the first two have no impact:
static AMCAX_API const Axis3 & OZ() noexcept
Get the z-axis in 3D, including the origin and the z-direction.
static AMCAX_API const Axis3 & OX() noexcept
Get the x-axis in 3D, including the origin and the x-direction.
static AMCAX_API const Axis3 & OY() noexcept
Get the y-axis in 3D, including the origin and the y-direction.
Class of making a box.
Definition MakeBox.hpp:20
virtual AMCAX_API const TopoShape & Shape()
Get the resulting shape.
Base class of shape, containing an underlying shape with a location and an orientation.
Definition TopoShape.hpp:15
constexpr double pi
Mathematical constant Pi, ratio of a circle's circumference to its diameter.
Definition Constants.hpp:42
TransformationT< double, 3 > Transformation3
3D transformation
Definition TransformationT.hpp:1115
PointT< double, 3 > Point3
3D point
Definition PointT.hpp:459
If you want all three SetRotation operations to take effect, you can achieve this through the following methods:
One TransformShape: Right-Multiplication Method
finalTrsf = trsf3 * trsf2 * trsf1;
One TransformShape: Left-Multiplication Method
Sequential TransformShape Method