@@ -696,7 +696,7 @@ computeCentroidAndOBB (const pcl::PointCloud<PointT> &cloud,
696
696
// [0 , 1 ]
697
697
Eigen::Matrix<Scalar, 4 , 4 > transform = Eigen::Matrix<Scalar, 4 , 4 >::Identity ();
698
698
transform.template topLeftCorner <3 , 3 >() = obb_rotational_matrix.transpose ();
699
- transform.template topRightCorner <3 , 1 >() =-transform.template topLeftCorner <3 , 3 >()*centroid;
699
+ transform.template topRightCorner <3 , 1 >(). noalias () =-transform.template topLeftCorner <3 , 3 >()*centroid;
700
700
701
701
// when Scalar==double on a Windows 10 machine and MSVS:
702
702
// if you substitute the following Scalars with floats you get a 20% worse processing time, if with 2 PointT 55% worse
@@ -786,7 +786,7 @@ computeCentroidAndOBB (const pcl::PointCloud<PointT> &cloud,
786
786
obb_dimensions (1 ) = obb_max_pointy - obb_min_pointy;
787
787
obb_dimensions (2 ) = obb_max_pointz - obb_min_pointz;
788
788
789
- obb_center = centroid + obb_rotational_matrix * shift;// position of the OBB center in the same reference Oxyz of the point cloud
789
+ obb_center. noalias () = centroid + obb_rotational_matrix * shift;// position of the OBB center in the same reference Oxyz of the point cloud
790
790
791
791
return (point_count);
792
792
}
@@ -830,7 +830,7 @@ computeCentroidAndOBB (const pcl::PointCloud<PointT> &cloud,
830
830
// [0 , 1 ]
831
831
Eigen::Matrix<Scalar, 4 , 4 > transform = Eigen::Matrix<Scalar, 4 , 4 >::Identity ();
832
832
transform.template topLeftCorner <3 , 3 >() = obb_rotational_matrix.transpose ();
833
- transform.template topRightCorner <3 , 1 >() =-transform.template topLeftCorner <3 , 3 >()*centroid;
833
+ transform.template topRightCorner <3 , 1 >(). noalias () =-transform.template topLeftCorner <3 , 3 >()*centroid;
834
834
835
835
// when Scalar==double on a Windows 10 machine and MSVS:
836
836
// if you substitute the following Scalars with floats you get a 20% worse processing time, if with 2 PointT 55% worse
@@ -922,7 +922,7 @@ computeCentroidAndOBB (const pcl::PointCloud<PointT> &cloud,
922
922
obb_dimensions (1 ) = obb_max_pointy - obb_min_pointy;
923
923
obb_dimensions (2 ) = obb_max_pointz - obb_min_pointz;
924
924
925
- obb_center = centroid + obb_rotational_matrix * shift;// position of the OBB center in the same reference Oxyz of the point cloud
925
+ obb_center. noalias () = centroid + obb_rotational_matrix * shift;// position of the OBB center in the same reference Oxyz of the point cloud
926
926
927
927
return (point_count);
928
928
}
0 commit comments