5 #ifndef COAL_SERIALIZATION_BV_SPLITTER_H
6 #define COAL_SERIALIZATION_BV_SPLITTER_H
13 namespace serialization {
16 template <
typename BV>
29 template <
class Archive,
typename BV>
31 const unsigned int ) {
34 const Accessor &splitter =
reinterpret_cast<const Accessor &
>(splitter_);
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);
43 template <
class Archive,
typename BV>
45 const unsigned int ) {
48 Accessor &splitter =
reinterpret_cast<Accessor &
>(splitter_);
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);
56 splitter.vertices = NULL;
57 splitter.tri_indices = NULL;
A class describing the split rule that splits each BV node.
Definition: BV_splitter.h:58
Vec3s * vertices
The mesh vertices or points handled by the splitter.
Definition: BV_splitter.h:116
Triangle * tri_indices
The triangles handled by the splitter.
Definition: BV_splitter.h:119
Vec3s split_vector
Definition: BV_splitter.h:108
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: BV_splitter.h:107
Scalar split_value
The split threshold, different primitives are splitted according whether their projection on the spli...
Definition: BV_splitter.h:113
BVHModelType type
Whether the geometry is mesh or point cloud.
Definition: BV_splitter.h:122
SplitMethodType split_method
The split algorithm used.
Definition: BV_splitter.h:125
void load(Archive &ar, coal::BVSplitter< BV > &splitter_, const unsigned int)
Definition: BV_splitter.h:44
void save(Archive &ar, const coal::BVSplitter< BV > &splitter_, const unsigned int)
Definition: BV_splitter.h:30
Main namespace.
Definition: broadphase_bruteforce.h:44
Definition: BV_splitter.h:17
coal::BVSplitter< BV > Base
Definition: BV_splitter.h:18