-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Serialize AABB Tree data #993
Comments
AABB tree are quite difficult to serialize in general. Most of the issues in serialization are pointers. Depending on the type of primitives, the primitives can contains their own data, or be just a pointer to something. In the later case, you need to serialize/deserialize also the external data. But let's assume, for the moment, that the primitives do not refer to external data... For the serialization of nodes, I would first substract In your code, there is another error, about the memory allocation in the deserialization: |
@sloriot The problem is quite interesting, and could be reused in CGAL. |
Without being familiar with this topic, we should maybe also have a look at what boost.org offers for serialization. |
Boost Serialization seems a good library. Should we try to make CGAL objects compatible with it? For all CGAL objects of the kernel, in the C3/H3 versions, we should add a new method template: template<class Archive>
void serialize(Archive & ar, const unsigned int version) {
ar & base;
} and then in the global objects like: template<class Archive>
void serialize(Archive & ar, const unsigned int version) {
ar & boost::serialization::base_object<Rep>(*this);
} http://www.boost.org/doc/libs/1_60_0/libs/serialization/doc/ |
Thank Irineau for your suggestion. I'm glad you concern this matter.
Is it right? |
@lrineau any idea on the latest question? |
@hucancode Without seeing the type the |
The AABB-tree being now movable (internal pointers are now gone), this feature should be easier to address if someone is interested in it. |
Hello. Has there been any progress or workaround on this? I have a similar problem. |
Hello, i am working with AABB Tree. Thanks to CGAL we can handle the intersection very easy.
But we had some difficult building the tree. There are about > 1M tris on our (static) scene. Build process usually take several minutes to finish.
I am thinking of building AABB Tree once, then serialize them into file. From then i load the file instead of build the whole tree. I wonder if it would be supported in the future or not?
Here is my serialize/deserialize naive implementation. It didn't work. If you had interest, drop me some hint, i would appreciate it much.
The text was updated successfully, but these errors were encountered: