Open zsinnema opened 3 years ago
Maybe we can store the geometry of the mesh created for a given instance globally (potentially as part of the instance itself) MeshFactory could then check if the geometry was already computed and create a mesh (geometry + material) using that geometry plus the material (color) that the specific canvas required. We would still have a 1 to 1 relation Canvas, MeshFactory. This would allow us to reduce the number of conversions object description (f.e. OBJ) -> object geometry.
Is it possible and if so Is it worthy to save the geometry in the Instance object? What are the negative points of doing that? And how much performance do we gain?
After geppetto meeting: There's no one-to-one between geometry and instance. One instance can be represented with different geometries
When adding an already existing geppetto instance (containing a obj file) , e.g. the instance is already on a canvas, then we could benefit from reusing the already computated obj file to the mesh (from the previous canvas)
see also #163