53 indices.resize (
input_->size ());
55 int indices_count = 0;
56 int removed_indices_count = 0;
58 Eigen::Affine3f transform = Eigen::Affine3f::Identity ();
59 Eigen::Affine3f inverse_transform = Eigen::Affine3f::Identity ();
61 if (rotation_ != Eigen::Vector3f::Zero ())
64 rotation_ (0), rotation_ (1), rotation_ (2),
66 inverse_transform = transform.inverse ();
69 bool transform_matrix_is_identity = transform_.matrix ().isIdentity ();
70 bool translation_is_zero = (translation_ == Eigen::Vector3f::Zero ());
71 bool inverse_transform_matrix_is_identity = inverse_transform.matrix ().isIdentity ();
81 PointT local_pt = (*input_)[index];
84 if (!transform_matrix_is_identity)
87 if (!translation_is_zero)
89 local_pt.x -= translation_ (0);
90 local_pt.y -= translation_ (1);
91 local_pt.z -= translation_ (2);
95 if (!inverse_transform_matrix_is_identity)
99 if ( (local_pt.x < min_pt_[0] || local_pt.y < min_pt_[1] || local_pt.z < min_pt_[2]) ||
100 (local_pt.x > max_pt_[0] || local_pt.y > max_pt_[1] || local_pt.z > max_pt_[2]))
103 indices[indices_count++] = index;
105 (*removed_indices_)[removed_indices_count++] = index;
111 (*removed_indices_)[removed_indices_count++] = index;
113 indices[indices_count++] = index;
116 indices.resize (indices_count);
void getTransformation(Scalar x, Scalar y, Scalar z, Scalar roll, Scalar pitch, Scalar yaw, Eigen::Transform< Scalar, 3, Eigen::Affine > &t)
Create a transformation from the given translation and Euler angles (intrinsic rotations,...
void transformPoint(const Eigen::Matrix< Scalar, 3, 1 > &point_in, Eigen::Matrix< Scalar, 3, 1 > &point_out, const Eigen::Transform< Scalar, 3, Eigen::Affine > &transformation)
Transform a point using an affine matrix.