*/
#include <iostream>
#include "voxel_octree/SmartArea.hpp"
#include "voxel_octree/SidedArea.hpp"
struct UserData
{
UserData(int value = 0) : value(value)
{
}
bool mergeSide(UserData const& other) const
{
return true;
}
int64_t value = 0;
};
template <typename T_Voxel>
using TypedefSmartArea = voxomap::SmartArea<T_Voxel>;
void main()
{
if (it)
{
node = it.node;
voxomap::SidedArea<TypedefSmartArea, UserData>* area = it.getArea();
std::cout << "Number of side: " << area->getNbSide() << std::endl;
std::cout <<
"x: " << int(it.x) <<
" y: " << int(it.y) <<
" z: " << int(it.z) <<
" value: " << voxel->value <<
" side: " << int(voxel->
getSide()) << std::endl;
{
std::cout << "x: " << int(tmp_it.x) << " y: " << int(tmp_it.y) << " z: " << int(tmp_it.z) << " value: " << tmp_it.voxel->value << " side: " << int(tmp_it.voxel->getSide()) << std::endl;
}
}
}
Output:
Number of side: 14
x: 0 y: 0 z: 0 value: 42 side: 20
x: 0 y: 1 z: 0 value: 1 side: 8