extend
方法将另一个 DynamicSizeVector
中的元素追加到当前向量的末尾。
void extend(const DynamicSizeVector<T>& other)
other
:要添加到当前向量末尾的另一个 DynamicSizeVector
。#include <iostream>
#include <open3d/core/DynamicSizeVector.h>
using namespace open3d::core;
int main() {
DynamicSizeVector<int> vec({1, 2, 3});
vec.extend({4, 5, 6}); // vec 现在包含 {1, 2, 3, 4, 5, 6}
return 0;
}
extend
方法自 Open3D 0.5.0 版本引入。