Interpolating points (#3002)

* Add a class for rendering an interpolated point cloud (WIP)

* Make sure that we render the correct number of points

* Group interpolation properties into a property owner

* Update interpolation stuff (which was broken :) )

* Prevent interpolation from breaking with only one step or invalid interpolation values

* Add trigger properties for controlling interpolation

* Allow setting start interpolation value from asset

* Implement spline-based interpolation

* Cleanup, and interpolate to start and end

* And asset type documentation

* Add example asset

* Handle missing data values in interpolation

* Always show values at the knots, if there is one

* Experiment with more dynamic rendering (batching)

* Speed up interpolation by doing it on GPU instead of CPU

* Bring back spline interpolation (this time on GPU)

* Refactor initial data buffering

* Add a helper function to compute transformed positions

* Use vec3 positions instead of vec4 (less data to transfer)

* Update interpolation value documentation

* Apply suggestions from code review

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

* Increase interpolation speed max value

* Fix faulty indentation

* I banish thee, redundant empty line

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
This commit is contained in:
Emma Broman
2024-01-30 09:43:11 +01:00
committed by GitHub
parent bcc728cbfd
commit 2406a886ec
13 changed files with 1063 additions and 76 deletions

View File

@@ -74,8 +74,16 @@ public:
static documentation::Documentation Documentation();
protected:
int nAttributesPerPoint() const;
void updateBufferData();
virtual void initializeShadersAndGlExtras();
virtual void deinitializeShaders();
virtual void bindDataForPointRendering();
virtual void preUpdate();
glm::dvec3 transformedPosition(const dataloader::Dataset::Entry& e) const;
virtual int nAttributesPerPoint() const;
virtual void updateBufferData();
void updateSpriteTexture();
/// Find the index of the currently chosen color parameter in the dataset
@@ -83,7 +91,7 @@ protected:
/// Find the index of the currently chosen size parameter in the dataset
int currentSizeParameterIndex() const;
std::vector<float> createDataSlice();
virtual std::vector<float> createDataSlice();
virtual void bindTextureForRendering() const;