get_init_function
返回 OctreePointColorLeafNode
对象的构造函数。
def get_init_function(leaf_node_type: str) -> Callable[[None], OctreePointColorLeafNode]:
leaf_node_type
:叶节点类型,可以选择 "r"
(Restricted) 或 "u"
(Unrestricted)。OctreePointColorLeafNode
。import open3d as o3d
# 获取受限制的红色叶节点的构造函数
init_func_restrict_r = o3d.geometry.OctreePointColorLeafNode.get_init_function("r")
# 创建一个叶节点并打印其属性
leaf_node = init_func_restrict_r()
print(leaf_node)
# 获取不受限制的绿色叶节点的构造函数
init_func_unrestrict_g = o3d.geometry.OctreePointColorLeafNode.get_init_function("u")
# 创建一个叶节点并打印其属性
leaf_node = init_func_unrestrict_g()
print(leaf_node)
输出:
OctreePointColorLeafNode with 0 points from 1 to 0 in color space
OctreePointColorLeafNode with 0 points from 1 to 0 in color space