//------------------------------------------------------------
// $Id: PRC_PErecvStandAlone.cc,v 1.1.1.1 1999/11/25 06:26:09 yamauchi Exp $ 
//------------------------------------------------------------
//	PRC_PErecvStandAlone.cc 
//	Proximity Clouds method
// 
//	(C) Copyright 1998 Mayumi TOKUNAGA	徳永 麻由美
//	(C) Copyright 1998 Hitoshi YAMAUCHI	山内 斉
//------------------------------------------------------------
#include "PE.h"

#ifndef FOR_STANDALONE
# error "This file is for stand alone mode."
#endif

void PEClass::
receivePRCSkipMap(int bytesize,  OBJINSPC_IMPLEMENT_TYPE * pDatArray)
{
    int size[3];
    size[0] = size[1] = size[2] = this->mSpcParam.getSubDivNum();
    const int totalSize = size[0] * size[1] * size[2];
    assert(totalSize > 0);	// 既に SpcParam は受信済みのはず
    assert(totalSize == bytesize);

    // Map 領域作成と初期化
    this->mPRCUnit.mObjInSpcMap.initBySizeWithBaseZero(size); 
    
    // 受信内容のコピー
    for(int i = 0; i < this->mPRCUnit.mObjInSpcMap.getTotalSize(); i++)
    {
	PRC_skipMapClass oeias(pDatArray[i]);
	this->mPRCUnit.mObjInSpcMap.setAsOneDimArray(i, oeias);
    }
}

