16 #ifndef __UT_FaceGradedOctreeLabels__
17 #define __UT_FaceGradedOctreeLabels__
71 const int desired_levels);
74 bool unitTest()
const;
91 return getParentCell(face);
98 return getParentCell(node);
112 for (
int axis : {0,1,2})
114 if (child_index & (1 << axis))
131 ++child_face[(axis + 1) % 3];
133 ++child_face[(axis + 2) % 3];
147 ++child_edge[edge_axis];
165 const int edge_axis,
const int child_index)
const
175 if (child_index == 1)
176 ++child_edge[edge_axis];
178 int offsetAxis = 3 - face_axis - edge_axis;
179 ++child_edge[offsetAxis];
188 UT_ASSERT(level < m_octree_labels.size());
189 return m_octree_labels[
level];
196 UT_ASSERT(level < m_octree_labels.size());
198 return UT_Vector3I(m_octree_labels[level].getXRes(),
199 m_octree_labels[level].getYRes(),
200 m_octree_labels[level].getZRes());
211 UT_ASSERT(level >= 0 && level < m_octree_levels);
219 return getCellLabel(cell, level) == ACTIVE_CELL;
245 m_octree_labels[0].numTiles() > 100,
249 void activeCountUnitTestPartial(
bool &passed, const
UT_JobInfo &info) const;
252 m_octree_labels[
level].numTiles() > 100,
257 void upAdjacentUnitTestPartial(
bool &passed, const
int level,
261 m_octree_labels[level].numTiles() > 100,
262 activeUnitTest,
bool &, passed, const
int, level)
264 void activeUnitTestPartial(
bool &passed, const
int level,
270 const
int level) const;
277 m_octree_labels[0].numTiles() > 100,
281 void setBaseGridLabelsPartial(const UT_VoxelArrayF &initializer_mask, const
UT_JobInfo &info);
284 m_octree_labels[level].numTiles() > 100,
285 setActiveCellsAndParentList,
287 UT_Array<
bool> &, is_tile_occupied_list,
290 void setActiveCellsAndParentListPartial(
UT_Array<
UT_Array<UT_Vector3I>> ¶llel_down_parent_list,
291 UT_Array<
bool> &is_tile_occupied_list,
296 is_tile_occupied_list.entries() > 100,
297 uncompressParentTiles,
298 const
UT_Array<
bool> &, is_tile_occupied_list,
301 void uncompressParentTilesPartial(const
UT_Array<
bool> &is_tile_occupied_list,
306 new_parent_list.entries() > 100,
308 const
UT_Array<UT_Vector3I> &, new_parent_list,
310 const OctreeCellLabels,
label)
312 void setParentCellLabelPartial(const
UT_Array<UT_Vector3I> &new_parent_list,
314 const OctreeCellLabels
label,
317 THREADED_METHOD4(UT_FaceGradedOctreeLabels, m_octree_labels[level].numTiles() > 100,
321 UT_Array<
bool> &, is_tile_occupied_list,
324 void setFaceGradingPartial(
UT_Array<
UT_Array<UT_Vector3I>> ¶llel_down_parent_list,
326 UT_Array<
bool> &is_tile_occupied_list,
330 THREADED_METHOD3(UT_FaceGradedOctreeLabels, m_octree_labels[level].numTiles() > 100,
333 UT_Array<
bool> &, is_tile_occupied_list,
336 void setParentsUpPartial(
UT_Array<
UT_Array<UT_Vector3I>> ¶llel_new_parent_list,
337 UT_Array<
bool> &is_tile_occupied_list,
342 m_octree_labels[level].numTiles() > 100,
346 void setTopLevelPartial(const
int level, const
UT_JobInfo &info);
349 m_octree_labels[level].numTiles() > 100,
350 checkActiveCellAtLevel,
351 bool &, has_active_cell,
354 void checkActiveCellAtLevelPartial(
bool &has_active_cell,
361 UT_Vector3I m_base_voxel_res;
SYS_FORCE_INLINE UT_Vector3I getChildCell(const UT_Vector3I &cell, const int child_index) const
GLuint GLsizei const GLchar * label
SYS_FORCE_INLINE UT_Vector3I getParentFace(const UT_Vector3I &face) const
SYS_FORCE_INLINE UT_Vector3I getChildNode(const UT_Vector3I &node) const
SYS_FORCE_INLINE UT_Vector3I getChildEdge(const UT_Vector3I &edge, const int edge_axis, const int child_index) const
#define THREADED_METHOD1(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1)
IMF_EXPORT IMATH_NAMESPACE::V3f direction(const IMATH_NAMESPACE::Box2i &dataWindow, const IMATH_NAMESPACE::V2f &pixelPosition)
SYS_FORCE_INLINE UT_Vector3I getParentNode(const UT_Vector3I &node) const
UT_Vector3T< int64 > UT_Vector3I
#define THREADED_METHOD3(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3)
SYS_FORCE_INLINE int getOctreeLevels() const
SYS_FORCE_INLINE UT_Vector3I getChildEdgeInFace(const UT_Vector3I &face, const int face_axis, const int edge_axis, const int child_index) const
SYS_FORCE_INLINE UT_Vector3I getParentCell(const UT_Vector3I &cell) const
SYS_FORCE_INLINE UT_Vector3I cellToCellMap(const UT_Vector3I &cell, const int axis, const int direction)
SYS_FORCE_INLINE UT_Vector3I getChildFace(const UT_Vector3I &face, const int axis, const int child_index) const
#define THREADED_METHOD2(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2)
#define THREADED_METHOD4(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4)
#define THREADED_METHOD2_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2)
#define THREADED_METHOD1_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1)
SYS_FORCE_INLINE bool isCellActive(const UT_Vector3I &cell, const int level) const
UT_FaceGradedOctreeLabels()
SYS_FORCE_INLINE OctreeCellLabels getCellLabel(const UT_Vector3I &cell, const int level) const
SYS_FORCE_INLINE const UT_VoxelArray< int > & getGridLabels(const int level) const
SYS_FORCE_INLINE UT_Vector3I getVoxelRes(const int level) const