| 123 | } // namespace |
| 124 | |
| 125 | PointCloudLayer::PointCloudLayer( |
| 126 | PJ::ObjectTopicId topic_id, QString display_name, BuiltinObjectType object_type, QObject* parent) |
| 127 | : Scene3DLayer(parent), topic_id_(topic_id), display_name_(std::move(display_name)), object_type_(object_type) { |
| 128 | // Push layer defaults to the pass at construction so the first paint |
| 129 | // already reflects them (layer defaults are the design-spec values, not |
| 130 | // the pass's "minimum visual change" defaults). |
| 131 | cloud_pass_.setShape(shape_); |
| 132 | cloud_pass_.setSizeMeters(size_meters_); |
| 133 | cloud_pass_.setSizePixels(size_pixels_); |
| 134 | cloud_pass_.setColorType(color_type_); |
| 135 | cloud_pass_.setSolidColor(glm::vec3(solid_color_.redF(), solid_color_.greenF(), solid_color_.blueF())); |
| 136 | cloud_pass_.setColormap(colormap_); |
| 137 | cloud_pass_.setInvertLut(invert_lut_); |
| 138 | // The pass owns the GPU AABB reducer and polls it inside render() (GL thread); |
| 139 | // a completed reduction flows back here to refresh world_bounds_ + the camera. |
| 140 | // cloud_pass_ is a member, so `this` outlives every callback invocation. |
| 141 | cloud_pass_.setBoundsCallback([this](std::optional<AABB> box) { onGpuAabb(box); }); |
| 142 | } |
| 143 | |
| 144 | PointCloudLayer::~PointCloudLayer() = default; |
| 145 |
nothing calls this directly
no test coverage detected