37 pcl::getMinMax3D(*this->
getInputCloud(), minVector, maxVector);
39 SimpleVector3 spanCube = maxVector.block<3,1>(0,0) - minVector.block<3,1>(0,0);
41 double maximumSpan = spanCube.lpNorm<Eigen::Infinity>() * contractor;
47 currentSamplePoint.x = currentSpacePosition[0];
48 currentSamplePoint.y = currentSpacePosition[1];
49 sampledSpacePointCloudPtr->push_back(currentSamplePoint);
53 SimpleVector3 vector3 = orientation.toRotationMatrix() * SimpleVector3::UnitX();
56 vector2 *= maximumSpan;
57 vector2[0] += currentSpacePosition[0];
58 vector2[1] += currentSpacePosition[1];
61 samplePoint.x = vector2[0];
62 samplePoint.y = vector2[1];
63 sampledSpacePointCloudPtr->push_back(samplePoint);
66 return sampledSpacePointCloudPtr;
Eigen::Matrix< Precision, 3, 1 > SimpleVector3
virtual ObjectPointCloudPtr & getInputCloud()
SpaceSampler class generalizes the sampling of the space.
SamplePointCloudPtr getSampledSpacePointCloud(SimpleVector3 currentSpacePosition=SimpleVector3(), float contractor=1.0)
SamplePointCloud::Ptr SamplePointCloudPtr
pcl::PointCloud< SamplePoint > SamplePointCloud
Eigen::Matrix< Precision, 4, 1 > SimpleVector4
this namespace contains all generally usable classes.
virtual ~PlaneSubSpaceSampler()
destructor for PlaneSubSpaceSampler object
Eigen::Matrix< Precision, 2, 1 > SimpleVector2
Eigen::Quaternion< Precision > SimpleQuaternion
PlaneSubSpaceSampler()
constructor for PlaneSubSpaceSampler object
static SimpleQuaternionCollectionPtr getOrientationsOnUnitSphere(const int &numberOfPoints)