本文整理汇总了C++中Octree::getOrigin方法的典型用法代码示例。如果您正苦于以下问题:C++ Octree::getOrigin方法的具体用法?C++ Octree::getOrigin怎么用?C++ Octree::getOrigin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Octree
的用法示例。
在下文中一共展示了Octree::getOrigin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test1
void test1()
{
Octree* mytree = new Octree();
std::cout << mytree->getOrigin().getX() << std::endl;
std::cout << mytree->getRadii().getX() << std::endl;
delete mytree;
}
示例2: test2
void test2()
{
Vec3<double> myorigin = Vec3<double>(0.0, 0.0, 0.0);
Vec3<double> myradii = Vec3<double>(10.0, 10.0, 10.0);
Octree* mytree = new Octree(myorigin, myradii);
assert(mytree->getOrigin().getX() == 0.0);
assert(mytree->getRadii().getX() == 10.0);
double i = 5.0;
OctreePoint *mydata = new OctreePoint(Vec3<double>(43.0, 21.0, 24.0), i, 7);
mytree->insert(mydata);
std::vector<OctreePoint*> results;
mytree->getPointsInBox(Vec3<double>(0.0, 0.0, 0.0), Vec3<double>(45.0, 25.0, 25.0), results);
std::cout << results[0]->getIndex() << std::endl;
delete mytree;
}