Feature/point cloud labels from csv (#2989)

* Add ability to load labels directly from CSV/SPECK for PointClouds

* Provide some more docs

* Update the example asset for point clouds

* Make both examples visible

* Some cleanup

* Apply suggestions from code review

Co-authored-by: Alexander Bock <alexander.bock@liu.se>

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
This commit is contained in:
Emma Broman
2024-01-17 13:46:49 +01:00
committed by GitHub
parent 787c93dec0
commit 640ca3ed49
15 changed files with 171 additions and 39 deletions
+16 -1
View File
@@ -47,6 +47,20 @@ namespace documentation { struct Documentation; }
class LabelsComponent : public properties::PropertyOwner, public Fadeable {
public:
explicit LabelsComponent(const ghoul::Dictionary& dictionary);
/**
* Create a labels component from an already loaded dataset. That dataset should have
* a comment per point to be used for the labels.
*
* \param dictionary A dictionary with the other information used for constructing
* the dataset
* \param dataset The dataset to create the labelset from, including xyz position and
* a string to be used for the text.
* \param unit The unit to use when interpreting the point information in the dataset
*/
explicit LabelsComponent(const ghoul::Dictionary& dictionary,
const dataloader::Dataset& dataset, DistanceUnit unit);
~LabelsComponent() override = default;
dataloader::Labelset& labelSet();
@@ -76,7 +90,8 @@ private:
glm::dmat4 _transformationMatrix = glm::dmat4(1.0);
// Properties
bool _createdFromDataset = false;
properties::BoolProperty _enabled;
properties::Vec3Property _color;
properties::FloatProperty _size;