void naiadBodyData::copy( const MPxData& other ) { if( other.typeId() == naiadBodyData::id ) { const naiadBodyData* otherData = (const naiadBodyData*)&other; nBody = otherData->nBody; bodyTimeIndex = otherData->bodyTimeIndex; } else { cerr << "wrong data format!" << endl; } return; }
void blindComplexData::copy( const MPxData& other ) // // Deescription: // Perform a copy or a conversion // { if( other.typeId() == blindComplexData::id ) { const blindComplexData* otherData = (const blindComplexData*)&other; if ( _length != otherData->_length ) { if ( ! setLength( otherData->_length ) ) { return; } } for ( unsigned int i = 0; i < _length; i++ ) { _CVDataArrayPtr[i] = (*otherData)[i]; } } else { // we need to convert to the other type based on its iff Tag cerr << "wrong data format!" << endl; } return; }