コード例 #1
0
ccOctree* ccGenericPointCloud::computeOctree(CCLib::GenericProgressCallback* progressCb)
{
    deleteOctree();
    ccOctree* octree = new ccOctree(this);
    if (octree->build(progressCb)>0)
    {
        octree->setDisplay(getDisplay());
        addChild(octree);
    }
    else
    {
        delete octree;
        octree=NULL;
    }

    return octree;
}
コード例 #2
0
ccOctree* ccGenericPointCloud::computeOctree(CCLib::GenericProgressCallback* progressCb, bool autoAddChild/*=true*/)
{
	deleteOctree();
	ccOctree* octree = new ccOctree(this);
	if (octree->build(progressCb) > 0)
	{
		octree->setDisplay(getDisplay());
		octree->setVisible(true);
		octree->setEnabled(false);
		if (autoAddChild)
		{
			addChild(octree);
		}
	}
	else
	{
		delete octree;
		octree = NULL;
	}

	return octree;
}
コード例 #3
0
void ccGenericPointCloud::clear()
{
	unallocateVisibilityArray();
    deleteOctree();
    enableTempColor(false);
}