Exemplo n.º 1
0
LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask) :
	LLSpatialPartition(data_mask, render_by_group, GL_STREAM_DRAW_ARB)
{
	mBridge = this;
	mDrawable = root;
	root->setSpatialBridge(this);
	
	mBinIndex = -1;

	mRenderType = mDrawable->mRenderType;
	mDrawableType = mDrawable->mRenderType;
	
	mPartitionType = LLViewerRegion::PARTITION_VOLUME;
	
	mOctree->balance();

	llassert(mDrawable);
	llassert(mDrawable->getRegion());
	LLSpatialPartition *part = mDrawable->getRegion()->getSpatialPartition(mPartitionType);
	llassert(part);
	
	if (part)
	{
		part->put(this);
	}
}