本文整理汇总了C++中PointT::getNormalVector3fMap方法的典型用法代码示例。如果您正苦于以下问题:C++ PointT::getNormalVector3fMap方法的具体用法?C++ PointT::getNormalVector3fMap怎么用?C++ PointT::getNormalVector3fMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointT
的用法示例。
在下文中一共展示了PointT::getNormalVector3fMap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
template <typename PointT, typename Scalar> inline PointT
pcl::transformPointWithNormal (const PointT &point,
const Eigen::Transform<Scalar, 3, Eigen::Affine> &transform)
{
PointT ret = point;
ret.getVector3fMap () = transform * point.getVector3fMap ();
ret.getNormalVector3fMap () = transform.rotation () * point.getNormalVector3fMap ();
return (ret);
}
示例2: getCentroid
/** \brief Calculate centroid of voxel.
* \param[out] centroid_arg the resultant centroid of the voxel
*/
void
getCentroid (PointT& centroid_arg) const
{
using namespace pcl::common;
if (point_counter_)
{
centroid_arg.getVector3fMap() = (pt_ / static_cast<double> (point_counter_)).cast<float>();
centroid_arg.getNormalVector3fMap() = n_.normalized().cast<float>();
centroid_arg.r = static_cast<unsigned char>(r_ / point_counter_);
centroid_arg.g = static_cast<unsigned char>(g_ / point_counter_);
centroid_arg.b = static_cast<unsigned char>(b_ / point_counter_);
}
else
{
centroid_arg.x = std::numeric_limits<float>::quiet_NaN();
centroid_arg.y = std::numeric_limits<float>::quiet_NaN();
centroid_arg.z = std::numeric_limits<float>::quiet_NaN();
centroid_arg.normal_x = std::numeric_limits<float>::quiet_NaN();
centroid_arg.normal_y = std::numeric_limits<float>::quiet_NaN();
centroid_arg.normal_z = std::numeric_limits<float>::quiet_NaN();
centroid_arg.r = 0;
centroid_arg.g = 0;
centroid_arg.b = 0;
}
}