Parser to parse optoctree.
Example usage
Let's assume that the optoctree bytes are as follows:
0x04 0x00 0x00 0x00
0x02 0x00 0x25 0x80
0x02 0x00 0x00 0x7E
0x00 0x00 ... (0x0 2*124 times to fill trees)
Explanation:
0x04 0x00 0x00 0x00
0x02, 0x00,
0x25,
0x80,
0x02, 0x00,
0x00,
0x7E,
0x00, 0x00
Using this code:
std::vector< byte > OptocTreeView
Definition base_struct.hpp:16
Root of optoctree file.
Definition base_struct.hpp:72
You will get the following batch structure:
└── version = 4
trees[0]
└── node_count = 2
nodes[0] = { material_type=37, signed_distance=128, first_child_node=2 }
nodes[1] = { material_type=0, signed_distance=126, first_child_node=0 }
- Note
OptocTreeView
is just std::vector<byte>
. This is necessary for representing OptocTree bytes. Use Reader::optoctreeview_from_file
to read bytes from file