Rendering the meshes in ColladaRT.

Hi there
I have a document with no animation. Every mesh is inserted inside a node and has its own transformation.So we should draw each mesh with its appropriate transformation. ColladaRT renders the model correctly, But I can’t find the transformations inside its rendering functions. Starting from the beginning in colladaRT rendering functions, CrtRender::Render() calls CrtScene::Render(). Then CrtScene::Render() calls CrtNode::Render()


CrtVoid CrtScene::Render()
{
if ( SceneRoot )
{
SceneRoot->Render(); 
//CrtPrint("NumTris = %d 
" , gNumTris ); 
}
//else
//CrtPrint(" No Scene Data to render 
" ); 
}

CrtNode::Render() calls CrtGeometry::Draw() and itselsf


void 	CrtNode::Render()
{
//CrtPrint(" Rendering Node %s Type %d 
", Name, (CrtInt32)Type ); 
if ( _CrtRender.GetShowHiearchy() )
DrawLineToChildren();
	
// to concate to the camera which should be already set 	
_CrtRender.PushMatrix();
//CrtMatrixLoadIdentity(LocalToWorldMatrix);
_CrtRender.MultMatrix(LocalToWorldMatrix); 
_CrtRender.SetCurrentLMMat( LocalToWorldMatrix ); 
			
for(CrtUInt i=0; i<InstanceGeometries.size(); i++)
{
CrtGeometry * geometry = InstanceGeometries[i]->AbstractGeometry;
geometry->Draw(this);
//gNumTris += geometry->GetTotalNumTris();
}
//Controller here. Skip it
//CrtPrint(" %s Rendering Children 
", Name ); 
_CrtRender.PopMatrix(); 

// Render All Children 
if (Children)
Children->Render();
// Render All Siblings 
if (Next)
Next->Render(); 
}

Then CrtGeometry::Draw() calls CrtPolyGroup::Draw()


CrtVoid	CrtGeometry::Draw(CrtNode *parentNode)
{
//skinning here, Skip it
for (CrtUInt i = 0; i < Groups.size(); i++ )
{
Groups[i]->Draw(parentNode); 
//TotalNumTris++;
}
}			

And finally CrtPolyGroup::Draw() calls its rendering function( So CrtTriangles::Render(), CrtTriStrips::Render(), etc. )None of these functions deal with node transformations.The only transformation refers to the camera element inside CrtNode::Render()


// to concate to the camera which should be already set 	
_CrtRender.PushMatrix();
//CrtMatrixLoadIdentity(LocalToWorldMatrix);
_CrtRender.MultMatrix(LocalToWorldMatrix); 
_CrtRender.SetCurrentLMMat( LocalToWorldMatrix ); 
...

So where to find the transformations of the meshes?
-Ehsan-

It looks like that last segment you posted is it. I wouldn’t trust the comments. If you’re looking for where the transforms are read, that’s in CrtScene::ReadNodeTranforms.