MCPcopy Create free account
hub / github.com/OctoMap/octomap / generateSphereTree

Function generateSphereTree

octomap/src/testing/test_mapcollection.cpp:11–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9using namespace octomath;
10
11OcTree* generateSphereTree(point3d origin, float radius){
12 OcTree* tree = new OcTree(0.05);
13
14 point3d point_on_surface = origin;
15 point_on_surface.x() += radius;
16 for (int i=0; i<360; i++) {
17 for (int j=0; j<360; j++) {
18 if (!tree->insertRay(origin, origin+point_on_surface)) {
19 cout << "ERROR while inserting ray from " << origin << " to " << point_on_surface << endl;
20 }
21 point_on_surface.rotate_IP (0,0,DEG2RAD(1.));
22 }
23 point_on_surface.rotate_IP (0,DEG2RAD(1.),0);
24 }
25 return tree;
26}
27
28int main(int /*argc*/, char** argv) {
29

Callers

nothing calls this directly

Calls 1

xMethod · 0.45

Tested by

no test coverage detected