Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
true-real-michael committed Nov 12, 2023
1 parent dc50706 commit 9b61e4f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions octreelib/octree_manager/octree_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@


class OctreeManager(VoxelBase):
"""
Octree manager which stores octrees for different poses.
:param octree_config: Octree configuration.
:param corner_min: Minimum corner of the node.
:param edge_length: Edge length of the node.
"""
def __init__(
self, octree_config: OctreeConfig, corner_min: Point, edge_length: float
):
Expand All @@ -23,6 +30,11 @@ def subdivide(
subdivision_criteria: List[Callable[[PointCloud], bool]],
pose_numbers: Optional[List[int]],
):
"""
Subdivide all nodes based on the subdivision criteria.
:param subdivision_criteria: list of criteria for subdivision
:param pose_numbers: List of pose numbers to subdivide
"""
if pose_numbers is None:
pose_numbers = self._octrees.keys()

Expand All @@ -45,6 +57,11 @@ def map_leaf_points(
function: Callable[[PointCloud], PointCloud],
pose_numbers: Optional[List[int]] = None,
):
"""
Transform point cloud in the node using the function
:param function: Function PointCloud -> PointCloud
:param pose_numbers: List of pose numbers to transform
"""
if pose_numbers is None:
pose_numbers = self._octrees.keys()

Expand All @@ -56,6 +73,11 @@ def filter(
filtering_criteria: List[Callable[[PointCloud], bool]],
pose_numbers: Optional[List[int]],
):
"""
Filter nodes with points by filtering criteria
:param filtering_criteria: List of filtering criteria functions
:param pose_numbers: List of pose numbers to filter
"""
if pose_numbers is None:
pose_numbers = self._octrees.keys()

Expand Down

0 comments on commit 9b61e4f

Please sign in to comment.