本文整理汇总了C++中PointT::getVector4fMap方法的典型用法代码示例。如果您正苦于以下问题:C++ PointT::getVector4fMap方法的具体用法?C++ PointT::getVector4fMap怎么用?C++ PointT::getVector4fMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointT
的用法示例。
在下文中一共展示了PointT::getVector4fMap方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
template<typename PointT> bool
pcl::BoxClipper3D<PointT>::clipPoint3D (const PointT& point) const
{
Eigen::Vector4f point_coordinates (transformation_.matrix ()
* point.getVector4fMap ());
return (point_coordinates.array ().abs () <= 1).all ();
}
示例2: return
template <typename PointT> bool
PCLVisualizer::addSphere (const PointT ¢er, double radius, double r, double g, double b, const std::string &id, int viewport)
{
// Check to see if this ID entry already exists (has it been already added to the visualizer?)
ShapeActorMap::iterator am_it = shape_actor_map_->find (id);
if (am_it != shape_actor_map_->end ())
{
PCL_WARN ("[addSphere] A shape with id <%s> already exists! Please choose a different id and retry.\n", id.c_str ());
return (false);
}
vtkSmartPointer<vtkDataSet> data = createSphere (center.getVector4fMap (), radius);
// Create an Actor
vtkSmartPointer<vtkLODActor> actor;
createActorFromVTKDataSet (data, actor);
actor->GetProperty ()->SetRepresentationToWireframe ();
actor->GetProperty ()->SetInterpolationToGouraud ();
actor->GetMapper ()->ScalarVisibilityOff ();
actor->GetProperty ()->SetColor (r, g, b);
addActorToRenderer (actor, viewport);
// Save the pointer/ID pair to the global actor map
(*shape_actor_map_)[id] = actor;
return (true);
}
示例3:
template<typename PointT> void
pcl::BoxClipper3D<PointT>::transformPoint (const PointT& pointIn, PointT& pointOut) const
{
const Eigen::Vector4f& point = pointIn.getVector4fMap ();
pointOut.getVector4fMap () = transformation_ * point;
// homogeneous value might not be 1
if (point [3] != 1)
{
// homogeneous component might be uninitialized -> invalid
if (point [3] != 0)
{
pointOut.x += (1 - point [3]) * transformation_.data () [ 9];
pointOut.y += (1 - point [3]) * transformation_.data () [10];
pointOut.z += (1 - point [3]) * transformation_.data () [11];
}
else
{
pointOut.x += transformation_.data () [ 9];
pointOut.y += transformation_.data () [10];
pointOut.z += transformation_.data () [11];
}
}
}