Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation for CachedMeshContent #105

Merged
merged 5 commits into from
Aug 28, 2024
Merged

Conversation

rahelarnold98
Copy link
Contributor

@rahelarnold98 rahelarnold98 commented Aug 27, 2024

This pull request implements the CachedMeshContent and solves issue #97.

@rahelarnold98 rahelarnold98 self-assigned this Aug 27, 2024
@rahelarnold98 rahelarnold98 added this to the Release Candidate #1 milestone Aug 27, 2024
@rahelarnold98 rahelarnold98 linked an issue Aug 27, 2024 that may be closed by this pull request
@rahelarnold98 rahelarnold98 added the enhancement New feature or request label Aug 27, 2024
- Uses default Json instance now and moves custom serializer to Texture class.
- All getters for cached content are synchronized.
- Renamed classes to be consistent.
Copy link
Member

@ppanopticon ppanopticon left a comment

Choose a reason for hiding this comment

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

Looks good. I've made a few minor changes (some of which are not directly related to the PR).

Most importantly: You should minimize the number of custom Json { } serializer objects. In your implementation, every instance of CachedModel3dContent used its own instance, which can be a performance hit.

I have one final request: I would like to see a unit test that makes sure that serialization and deserialization works as expected. Test would look as follows:

  1. Load toy model
  2. Serializer Model3d
  3. De-serialize Model3d
  4. Check of two instances are identical.

If it simplifies things, the unit test can be added to the m3d module.

@rahelarnold98
Copy link
Contributor Author

I have now added two unit tests to the m3d module.

  1. The first compares the original model to the one after being serialized and deserialized.
  2. The second one compares the original model to the one loaded from the CachedContent.

@ppanopticon ppanopticon merged commit e5199a7 into dev Aug 28, 2024
2 checks passed
@ppanopticon
Copy link
Member

Merged! Thank you :-)

@Spiess Spiess deleted the feature/cached-mesh-content branch October 18, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Cached implementation for MeshContent
2 participants