| 104 | } |
| 105 | |
| 106 | void Tr2SkinnedModel::GetBatches( ITriRenderBatchAccumulator* batches, |
| 107 | TriBatchType batchType, |
| 108 | const Matrix& m, |
| 109 | const Tr2PerObjectData* data ) |
| 110 | { |
| 111 | Matrix* pm = batches->Allocate<Matrix>(); |
| 112 | |
| 113 | CCP_ASSERT_M( pm, "No memory available for allocation of batches." ); |
| 114 | if( pm == NULL ) |
| 115 | { |
| 116 | return; |
| 117 | } |
| 118 | *pm = m; |
| 119 | |
| 120 | auto skinnedData = static_cast<const Tr2PerObjectDataSkinned*>( data ); |
| 121 | |
| 122 | for( PTr2MeshVector::iterator meshIt = m_meshes.begin(); meshIt != m_meshes.end(); ++meshIt ) |
| 123 | { |
| 124 | Tr2Mesh* mesh = *meshIt; |
| 125 | if( mesh ) |
| 126 | { |
| 127 | Tr2MeshAreaVector* areas = mesh->GetAreas( batchType ); |
| 128 | if( areas ) |
| 129 | { |
| 130 | GetBatchesForArea( areas, mesh, batches, pm, const_cast<Tr2PerObjectDataSkinned*>( skinnedData ) ); |
| 131 | } |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | bool Tr2SkinnedModel::HasTransparency() const |
| 137 | { |