affine_trans_object_model_3d — Apply an arbitrary affine 3D transformation to 3D object models.
affine_trans_object_model_3d applies arbitrary affine 3D transformations, i.e., scaling, rotation, and translation, to 3D object models and returns the handles of the transformed 3D object models. The affine transformations are described by the homogeneous transformation matrices given in HomMat3D.
The transformation matrices can be created using the operators hom_mat3d_identity, hom_mat3d_scale, hom_mat3d_rotate, hom_mat3d_translate, etc., or it can be the result of pose_to_hom_mat3d (see affine_trans_point_3d).
In general, the operator affine_trans_object_model_3d is not necessary in the context of shape based 3D matching. Instead, if a rotation of the 3D object model into a reference orientation should be performed, appropriate values for the parameters RefRotX, RefRotY, RefRotZ, and OrderOfRotation should be passed to the operator create_shape_model_3d.
affine_trans_object_model_3d transforms several 3D object models with the same transformation matrix if only one transformation matrix is passed in HomMat3D. If the number of transformation matrices corresponds to the number of 3D object models, every 3D object model is transformed individually with the respective transformation matrix.
Note that if a 3D object model is no longer needed or should be overwritten, the memory has to be freed first by calling the operator clear_object_model_3d.
affine_trans_object_model_3d transforms the attributes of type 3D points, 3D point normals, and the prepared shape model for shape-based 3D matching. All other attributes are copied without modification. To transform 3D primitives, the operator rigid_trans_object_model_3d must be used.
Handles of the 3D object models.
Handles of the transformed 3D object models.
affine_trans_object_model_3d returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.
project_object_model_3d, object_model_3d_to_xyz, clear_object_model_3d
affine_trans_point_3d, rigid_trans_object_model_3d, projective_trans_object_model_3d