#include "DisplayCommon.h"
{
for( int i = 0; i < lVertexCacheDeformerCount; ++i )
{
if( !lDeformer ) continue;
if( !lCache ) continue;
{
DisplayString(" Vertex Cache");
if (lChannelIndex < 0)
continue;
unsigned int lChnlSampleCount, lDataCount;
DisplayString(
" Channel Name: ", lChnlName.
Buffer());
switch (lChnlType)
{
DisplayString(" Channel Type: Unknown Data"); break;
DisplayString(" Channel Type: Double"); break;
DisplayString(" Channel Type: Double Array"); break;
DisplayString(" Channel Type: Double Vector Array"); break;
DisplayString(" Channel Type: Int32 Array"); break;
DisplayString(" Channel Type: Float Array"); break;
DisplayString(" Channel Type: Float Vector Array"); break;
}
DisplayString(
" Channel Interpretation: ", lChnlInterp.
Buffer());
DisplayInt(" Channel Sampling Type: ", lChnlSampling);
DisplayInt(" Channel Sample Count: ", lChnlSampleCount);
continue;
if (lChnlInterp == "normals")
DisplayString(" Normal Cache Data");
else
DisplayString(" Points Cache Data");
unsigned int lBufferSize = 0;
int lFrame = 0;
for (
FbxTime t = start; t <= stop; t+=rate)
{
DisplayInt(" Frame ", lFrame);
{
lBuffer = new float[lDataCount*3];
lBufferSize = lDataCount*3;
}
else if (lBufferSize < lDataCount*3)
{
delete [] lBuffer;
lBuffer = new float[lDataCount*3];
lBufferSize = lDataCount*3;
}
else
memset(lBuffer, 0, lBufferSize*sizeof(float));
lCache->
Read(lChannelIndex, t, lBuffer, lDataCount);
if (lChnlInterp == "normals")
{
{
continue;
}
DisplayInt(" Normal Count ", lDataCount);
unsigned lNormalIndex = 0;
for (pi = 0; pi < lPolygonCount && lNormalIndex+2 < lDataCount*3; pi++)
{
DisplayInt(" Polygon ", pi);
DisplayString(" Normals for Each Polygon Vertex: ");
for (j = 0; j < lPolygonSize && lNormalIndex+2 < lDataCount*3; j++)
{
FbxVector4 normal(lBuffer[lNormalIndex], lBuffer[lNormalIndex+1], lBuffer[lNormalIndex+2]);
Display3DVector(" Normal Cache Data ", normal);
lNormalIndex += 3;
}
}
}
else
{
DisplayInt(" Points Count: ", lDataCount);
for (unsigned int j = 0; j < lDataCount*3; j=j+3)
{
FbxVector4 points(lBuffer[j], lBuffer[j+1], lBuffer[j+2]);
Display3DVector(" Points Cache Data: ", points);
}
}
lFrame++;
}
{
delete [] lBuffer;
}
}
}
}