/** Compare this coordinate system to otherObj. * The purpose is usually to determe if the coordinate system is animated. */ bool liqRibCoordData::compare( const liqRibData & otherObj ) const { CM_TRACE_FUNC("liqRibCoordData::compare("<<otherObj.getFullPathName()<<")"); LIQDEBUGPRINTF("-> comparing coord\n"); return ( otherObj.type() != MRT_Coord )? false : true; }
/** Compare this mesh to the other for the purpose of determining * if it's animated. */ bool liqRibMeshData::compare( const liqRibData & otherObj ) const { CM_TRACE_FUNC("liqRibMeshData::compare("<<otherObj.getFullPathName().asChar()<<")"); unsigned numFaceVertices( 0 ); LIQDEBUGPRINTF( "-> comparing mesh\n" ); if ( otherObj.type() != MRT_Mesh ) return false; const liqRibMeshData& other = (liqRibMeshData&)otherObj; if ( numFaces != other.numFaces ) return false; if ( numPoints != other.numPoints ) return false; if ( numNormals != other.numNormals ) return false; for ( unsigned i( 0 ); i < numFaces; ++i ) { if ( nverts[i] != other.nverts[i] ) return false; numFaceVertices += nverts[i]; } for ( unsigned i( 0 ); i < numFaceVertices; ++i ) if ( verts[i] != other.verts[i] ) return false; for ( unsigned i( 0 ); i < numPoints; ++i ) { const unsigned a( i * 3 ); const unsigned b( a + 1 ); const unsigned c( a + 2 ); if ( !equiv( vertexParam[a], other.vertexParam[a] ) || !equiv( vertexParam[b], other.vertexParam[b] ) || !equiv( vertexParam[c], other.vertexParam[c] ) ) { return false; } } for ( unsigned i( 0 ); i < numNormals; ++i ) { const unsigned a = i * 3; const unsigned b = a + 1; const unsigned c = a + 2; if ( !equiv( normalParam[a], other.normalParam[a] ) || !equiv( normalParam[b], other.normalParam[b] ) || !equiv( normalParam[c], other.normalParam[c] ) ) { return false; } } return true; }
/* * Compare this mesh to the other for the purpose of determining * if it's animated. */ bool liqRibMeshData::compare( const liqRibData & otherObj ) const { LIQDEBUGPRINTF( "-> comparing mesh\n" ); if ( otherObj.type() != MRT_Mesh ) return false; const liqRibMeshData& other = ( liqRibMeshData& )otherObj; return compareMesh ( other ); }
/** Compare this curve to the other for the purpose of determining * if it is animated. */ bool liqRibPfxHairData::compare( const liqRibData & otherObj ) const { CM_TRACE_FUNC("liqRibPfxHairData::compare("<<otherObj.getFullPathName()<<")"); LIQDEBUGPRINTF( "-> comparing pfxHair curves\n"); //cout << "-> comparing pfxHair curves..." << endl; if ( otherObj.type() != MRT_PfxHair ) return false; const liqRibPfxHairData & other = (liqRibPfxHairData&)otherObj; if ( ncurves != other.ncurves ) return false; return true; }
bool liqRibCurvesData::compare( const liqRibData & otherObj ) const { CM_TRACE_FUNC("liqRibClipPlaneData::compare("<<otherObj.getFullPathName()<<")"); LIQDEBUGPRINTF( "-> comparing nurbs curve\n"); if ( otherObj.type() != MRT_Curves ) return false; const liqRibCurvesData & other = (liqRibCurvesData&)otherObj; if ( ( nverts[0] != other.nverts[0] ) ) return false; // Check CVs unsigned last = nverts[0] * 3; for ( unsigned i = 0; i < last; ++i ) { if ( !equiv( CVs[i], other.CVs[i] ) ) return false; } return true; }
/** Compare this curve to the other for the purpose of determining * if it is animated. */ bool liqRibPfxToonData::compare( const liqRibData & otherObj ) const { LIQDEBUGPRINTF( "-> comparing pfxToon curves\n"); if ( otherObj.type() != MRT_PfxToon ) return false; //const liqRibPfxToonData & other = (liqRibPfxToonData&)otherObj; // // Check CVs // last = nverts[0] * 3; // for ( i = 0; i < last; ++i ) { // if ( !equiv( CVs[i], other.CVs[i] ) ) return false; // } return true; }
/** Compare this mesh to the other for the purpose of determining if its animated */ bool liqRibSubdivisionData::compare( const liqRibData & otherObj ) const { CM_TRACE_FUNC("liqRibSubdivisionData::compare("<<otherObj.getFullPathName()<<")"); unsigned i; unsigned numFaceVertices = 0; LIQDEBUGPRINTF( "-> comparing mesh\n" ); if( otherObj.type() != MRT_Subdivision ) return false; const liqRibSubdivisionData & other = (liqRibSubdivisionData&)otherObj; if( numFaces != other.numFaces ) return false; if( numPoints != other.numPoints ) return false; for ( i = 0; i < numFaces; ++i ) { if( nverts[i] != other.nverts[i] ) return false; numFaceVertices += nverts[i]; } for ( i = 0; i < numFaceVertices; ++i ) { if( verts[i] != other.verts[i] ) return false; } for ( i = 0; i < numPoints; ++i ) { const unsigned a = i * 3; const unsigned b = a + 1; const unsigned c = a + 2; if( !equiv( vertexParam[a], other.vertexParam[a] ) || !equiv( vertexParam[b], other.vertexParam[b] ) || !equiv( vertexParam[c], other.vertexParam[c] ) ) { return false; } } return true; }
/** Compare this coordinate system to otherObj. * The purpose is usually to determe if the coordinate system is animated. */ bool liqRibCoordData::compare( const liqRibData & otherObj ) const { LIQDEBUGPRINTF("-> comparing coord\n"); return ( otherObj.type() != MRT_Coord )? false : true; }