MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetBatches

Method GetBatches

trinity/Tr2SkinnedModel.cpp:106–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void 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
136bool Tr2SkinnedModel::HasTransparency() const
137{

Callers

nothing calls this directly

Calls 3

GetAreasMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected