Esempio n. 1
0
void RenderObject::RemoveRenderBatch(RenderBatch * batch)
{
    if (removeIndex != -1)
    {
        DVASSERT(renderSystem);
        renderSystem->RemoveRenderBatch(batch);
    }

    batch->SetRenderObject(0);
    batch->Release();

    FindAndRemoveExchangingWithLast(renderBatchArray, batch);
    RecalcBoundingBox();
}
Esempio n. 2
0
void Mesh::BakeTransform(const Matrix4 & transform)
{
	uint32 size = renderBatchArray.size();
	for(uint32 i = 0; i < size; ++i)
	{
		PolygonGroup * pg = renderBatchArray[i]->GetPolygonGroup();
		DVASSERT(pg);
		pg->ApplyMatrix(transform);
		pg->BuildBuffers();

		renderBatchArray[i]->UpdateAABBoxFromSource();
	}

	RecalcBoundingBox();
}