void RenderObject::RemoveRenderBatch(RenderBatch * batch) { if (removeIndex != -1) { DVASSERT(renderSystem); renderSystem->RemoveRenderBatch(batch); } batch->SetRenderObject(0); batch->Release(); FindAndRemoveExchangingWithLast(renderBatchArray, batch); RecalcBoundingBox(); }
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(); }