coal/serialization/BV_splitter.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2021 INRIA
3 //
4 
5 #ifndef COAL_SERIALIZATION_BV_SPLITTER_H
6 #define COAL_SERIALIZATION_BV_SPLITTER_H
7 
9 
10 #include "coal/serialization/fwd.h"
11 
12 namespace boost {
13 namespace serialization {
14 
15 namespace internal {
16 template <typename BV>
19  using Base::split_axis;
20  using Base::split_method;
21  using Base::split_value;
22  using Base::split_vector;
23  using Base::tri_indices;
24  using Base::type;
25  using Base::vertices;
26 };
27 } // namespace internal
28 
29 template <class Archive, typename BV>
30 void save(Archive &ar, const coal::BVSplitter<BV> &splitter_,
31  const unsigned int /*version*/) {
32  using namespace coal;
33  typedef internal::BVSplitterAccessor<BV> Accessor;
34  const Accessor &splitter = reinterpret_cast<const Accessor &>(splitter_);
35 
36  ar &make_nvp("split_axis", splitter.split_axis);
37  ar &make_nvp("split_vector", splitter.split_vector);
38  ar &make_nvp("split_value", splitter.split_value);
39  ar &make_nvp("type", splitter.type);
40  ar &make_nvp("split_method", splitter.split_method);
41 }
42 
43 template <class Archive, typename BV>
44 void load(Archive &ar, coal::BVSplitter<BV> &splitter_,
45  const unsigned int /*version*/) {
46  using namespace coal;
47  typedef internal::BVSplitterAccessor<BV> Accessor;
48  Accessor &splitter = reinterpret_cast<Accessor &>(splitter_);
49 
50  ar >> make_nvp("split_axis", splitter.split_axis);
51  ar >> make_nvp("split_vector", splitter.split_vector);
52  ar >> make_nvp("split_value", splitter.split_value);
53  ar >> make_nvp("type", splitter.type);
54  ar >> make_nvp("split_method", splitter.split_method);
55 
56  splitter.vertices = NULL;
57  splitter.tri_indices = NULL;
58 }
59 } // namespace serialization
60 } // namespace boost
61 
62 #endif // ifndef COAL_SERIALIZATION_BV_SPLITTER_H
fwd.h
boost::serialization::load
void load(Archive &ar, coal::BVSplitter< BV > &splitter_, const unsigned int)
Definition: coal/serialization/BV_splitter.h:44
coal::BVSplitter::split_method
SplitMethodType split_method
The split algorithm used.
Definition: coal/internal/BV_splitter.h:125
coal::BVSplitter::split_vector
Vec3s split_vector
Definition: coal/internal/BV_splitter.h:108
coal
Main namespace.
Definition: coal/broadphase/broadphase_bruteforce.h:44
boost
coal::BVSplitter
A class describing the split rule that splits each BV node.
Definition: coal/BVH/BVH_model.h:61
coal::BVSplitter::split_value
CoalScalar split_value
The split threshold, different primitives are splitted according whether their projection on the spli...
Definition: coal/internal/BV_splitter.h:113
coal::BVSplitter::vertices
Vec3s * vertices
The mesh vertices or points handled by the splitter.
Definition: coal/internal/BV_splitter.h:116
boost::serialization::internal::BVSplitterAccessor
Definition: coal/serialization/BV_splitter.h:17
BV_splitter.h
coal::BVSplitter::type
BVHModelType type
Whether the geometry is mesh or point cloud.
Definition: coal/internal/BV_splitter.h:122
coal::BVSplitter::tri_indices
Triangle * tri_indices
The triangles handled by the splitter.
Definition: coal/internal/BV_splitter.h:119
boost::serialization::save
void save(Archive &ar, const coal::BVSplitter< BV > &splitter_, const unsigned int)
Definition: coal/serialization/BV_splitter.h:30
boost::serialization::internal::BVSplitterAccessor::Base
coal::BVSplitter< BV > Base
Definition: coal/serialization/BV_splitter.h:18
coal::BVSplitter::split_axis
int split_axis
The axis based on which the split decision is made. For most BV, the axis is aligned with one of the ...
Definition: coal/internal/BV_splitter.h:107


hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:57