extend() 方法用于向 IntVector 中添加多个元素。
def extend(self, iterable: Union[Sequence[int], np.ndarray]) -> None:
"""
向 IntVector 中扩展多个元素。
:param iterable: 待添加的元素。
:type iterable: Union[Sequence[int], np.ndarray]
"""
iterable:待添加的元素。可以是 Sequence[int] 或 numpy.ndarray 类型。无。
>>> import open3d.utility as o3u
>>> iv = o3u.IntVector([1, 2, 3])
>>> iv.extend([4, 5, 6])
>>> print(iv)
1, 2, 3, 4, 5, 6
无。
iterable 可以是任何可迭代对象,包括列表、元组等。iterable 中的元素必须是整数类型。