MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / PointCloudLayer

Method PointCloudLayer

pj_scene3D/widgets/src/layers/pointcloud_layer.cpp:125–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123} // namespace
124
125PointCloudLayer::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
144PointCloudLayer::~PointCloudLayer() = default;
145

Callers

nothing calls this directly

Calls 8

setBoundsCallbackMethod · 0.80
setShapeMethod · 0.45
setSizeMetersMethod · 0.45
setSizePixelsMethod · 0.45
setColorTypeMethod · 0.45
setSolidColorMethod · 0.45
setColormapMethod · 0.45
setInvertLutMethod · 0.45

Tested by

no test coverage detected