-
Notifications
You must be signed in to change notification settings - Fork 4
getSubvoxel()
Jasmin B. Maglic edited this page Jun 18, 2021
·
1 revision
Voxel& Voxel::getSubvoxel(std::array<unsigned,3> p_index, unsigned p_lvl, std::array<char,3>& sub_index);
Voxel& Voxel::getSubvoxel(std::array<unsigned,3> p_index, unsigned p_lvl, char j);
Voxel& Voxel::getSubvoxel(std::array<unsigned,3> sub_index, unsigned p_lvl);
Method of the Voxel class. Returns a reference to a child voxel using either the parent index p_index
or the child's index sub_index
directly. The three-number index refers to the index inside the order 3 storage tensor in the Space class.
p_lvl
refers to the level of the parent voxel. If the parent index is used for access, then either an array of char
s or a single char
can be used to specify the exact child. In the array of char
s, each number refers to the index in the 2x2x2 block with which the children fill out their parent.