本文整理汇总了C++中OcTree::insertScan方法的典型用法代码示例。如果您正苦于以下问题:C++ OcTree::insertScan方法的具体用法?C++ OcTree::insertScan怎么用?C++ OcTree::insertScan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OcTree
的用法示例。
在下文中一共展示了OcTree::insertScan方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char** argv) {
//##############################################################
OcTree tree (0.05);
tree.enableChangeDetection(true);
point3d origin (0.01, 0.01, 0.02);
point3d point_on_surface (4.01,0.01,0.01);
tree.insertRay(origin, point_on_surface);
printChanges(tree);
tree.updateNode(point3d(2.01, 0.01, 0.01), 2.0f);
printChanges(tree);
tree.updateNode(point3d(2.01, 0.01, 0.01), -2.0f);
printChanges(tree);
cout << "generating spherical scan at " << origin << " ..." << endl;
for (int i=-100; i<101; i++) {
Pointcloud cloud;
for (int j=-100; j<101; j++) {
point3d rotated = point_on_surface;
rotated.rotate_IP(0, DEG2RAD(i*0.5), DEG2RAD(j*0.5));
cloud.push_back(rotated);
}
// insert in global coordinates:
tree.insertScan(cloud, origin, -1, false);
}
printChanges(tree);
cout << "done." << endl;
return 0;
}