Skip to content

Conversation

@0xfedcafe
Copy link
Member

Describe your changes

Add support for temporal mesh in vtkF3DMemoryMesh and scene API. I haven't updated bindings yet as I haven't figured out which was to be updated or how.

Issue ticket number and link if any

#2443 , #2443

Checklist for finalizing the PR

  • I have performed a self-review of my code
  • I have added tests for new features and bugfixes
  • I have added documentation for new features
  • If it is a modifying the libf3d API, I have updated bindings
  • If it is a modifying the .github/workflows/versions.json, I have updated timestamp

Continuous integration

Please write a comment to run CI, eg: \ci fast.
See here for more info.

@github-actions
Copy link

github-actions bot commented Oct 23, 2025

You are modifying libf3d public API! ⚠️Please update bindings accordingly⚠️!
You can find them in their respective directories: c, python, java, webassembly.

@0xfedcafe
Copy link
Member Author

\ci fast

@0xfedcafe 0xfedcafe force-pushed the temporal-mesh-memory branch 2 times, most recently from 0454de1 to a89c03e Compare October 23, 2025 18:49
virtual scene& add(const std::filesystem::path& filePath) = 0;
virtual scene& add(const std::vector<std::filesystem::path>& filePath) = 0;
virtual scene& add(const std::vector<std::string>& filePathStrings) = 0;
virtual scene& add(const std::vector<mesh_t>& mesh, double timeStep) = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure to follow, why is there multple meshes for a single timestep ?

@mwestphal
Copy link
Member

Need any help moving forward @0xfedcafe ?

@0xfedcafe 0xfedcafe force-pushed the temporal-mesh-memory branch from 47433bf to ff3de6e Compare November 6, 2025 14:51
@mwestphal
Copy link
Member

Hi @0xfedcafe , still working on this ?

@mwestphal
Copy link
Member

Hi @0xfedcafe , still working on this ?

@0xfedcafe
Copy link
Member Author

Hi, I updated things a bit after the redesign of the feature. I'll finish it soon.

@mwestphal
Copy link
Member

Do not hesitate to discuss the API more in deep in discord before implementing anything :)

@0xfedcafe 0xfedcafe force-pushed the temporal-mesh-memory branch 2 times, most recently from 709d651 to 0326221 Compare December 21, 2025 16:44
@0xfedcafe 0xfedcafe force-pushed the temporal-mesh-memory branch from 0326221 to cb8da47 Compare December 21, 2025 16:50
@0xfedcafe 0xfedcafe force-pushed the temporal-mesh-memory branch from 40f949d to 0be9b28 Compare December 22, 2025 16:26
@@ -307,6 +296,35 @@ scene& scene_impl::add(const std::vector<fs::path>& filePaths)
}

//----------------------------------------------------------------------------
scene& scene_impl::add(std::vector<double> times, MeshCallback&& callback)
{
if (times[1] < times[0])
Copy link
Member

@mwestphal mwestphal Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont check anything here, let vtkF3DMemnoryMesh handle it

* using SetPoints, SetNormals, SetTCoords, and SetFaces methods.
* This switches the mesh to animated mode with the given time range.
*/
void SetAnimatedMesh(double startTime, double endTime, MeshCallback callback);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use std::vector here too

this->Internals->Load({ importer });
return *this;
}

scene& scene_impl::add(const mesh_t& mesh)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should be able to call the other method here ?

* Callback type for animated meshes.
* Called with the current time value, should return the mesh for that time.
*/
using MeshCallback = std::function<mesh_t(double time)>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think of this name @Meakk ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants