merge Point3DCollection
本文关键字:Point3DCollection merge | 更新日期: 2023-09-27 18:14:58
我有这样的代码:
public Point3DCollection generatePoints()
{
//generate some Point3D, add them to a Point3DCollection and return it.
....
}
//in the main function
Point3DCollection allPoints=new Point3DCollection();
while(...){
//i need to merge the result from generatePoints() with allPoints, like this:
allPoints.merge(this.generatePoints());
}
我希望merge()方法是有效的(即不使用for循环或逐个添加元素)。我知道有一个addRange()通用列表,但它不可用于Point3DCollections。任何建议吗?
似乎您想要的每个实现都会在某个点收敛到循环。你自己来实现吧。编译器会负责优化