| 39 | } |
| 40 | |
| 41 | bool Cylinder::groundBasedRoot(const Plane &gplane) |
| 42 | { |
| 43 | const auto &ground = gplane.model.plane; |
| 44 | float dist = (abs(ground[0] * model.root(0) + ground[1] * model.root(1) + ground[2] * model.root(2) + |
| 45 | ground[3]) / |
| 46 | ground.segment(0, 3).norm()); |
| 47 | |
| 48 | if (dist < 2.0) |
| 49 | { |
| 50 | const auto normal = gplane.model.plane.segment(0,3); |
| 51 | model.root = rayPlaneIntersection(gplane.model.centroid, normal, model.root, model.ray); |
| 52 | return true; |
| 53 | } |
| 54 | return false; |
| 55 | } |
| 56 | |
| 57 | bool Cylinder::filter(const Scalar &maxTreeRadius, const Scalar &maxAxisTheta, const Plane &gplane) |
| 58 | { |
nothing calls this directly
no test coverage detected