예제 #1
0
//----------------------------------------------------------------------------
void Jungler::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	TriMesh::Load(source);
	PX2_VERSION_LOAD(source);

	source.ReadEnum(mJunglerType);
	source.Read(mMaxNum);
	source.ReadPointer(mMtlInst);
	source.ReadPointer(mTexture);
	int num = 0;
	source.Read(num);
	if (num > 0)
	{
		mPoses.resize(num);
		mNormals.resize(num);
		mWidths.resize(num);
		mHeights.resize(num);

		source.ReadAggregateVV(num, &mPoses[0]);
		source.ReadAggregateVV(num, &mNormals[0]);
		source.ReadVV(num, &mWidths[0]);
		source.ReadVV(num, &mHeights[0]);
	}

	PX2_END_DEBUG_STREAM_LOAD(Jungler, source);
}
예제 #2
0
//----------------------------------------------------------------------------
void Texture::Load (InStream& source)
{
    WM5_BEGIN_DEBUG_STREAM_LOAD(source);

    Object::Load(source);

    source.ReadEnum(mFormat);
    source.ReadEnum(mType);
    source.ReadEnum(mUsage);
    source.Read(mNumLevels);
    source.Read(mNumDimensions);
    source.ReadVV(MM_MAX_MIPMAP_LEVELS, mDimension[0]);
    source.ReadVV(MM_MAX_MIPMAP_LEVELS, mDimension[1]);
    source.ReadVV(MM_MAX_MIPMAP_LEVELS, mDimension[2]);
    source.ReadVV(MM_MAX_MIPMAP_LEVELS, mNumLevelBytes);
    source.Read(mNumTotalBytes);
    source.ReadVV(MM_MAX_MIPMAP_LEVELS, mLevelOffsets);
    source.ReadVV(MAX_USER_FIELDS, mUserField);
    source.ReadVR(mNumTotalBytes, mData);

    WM5_END_DEBUG_STREAM_LOAD(Texture, source);
}
예제 #3
0
//----------------------------------------------------------------------------
void SkinController::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	Controller::Load(source);

	source.Read(mNumVertices);
	source.Read(mNumBones);

	int numWeightsOffsets = mNumVertices*mNumBones;
	mWeights = new2<float>(mNumBones, mNumVertices);
	mOffsets = new2<APoint>(mNumBones, mNumVertices);
	source.ReadVV(numWeightsOffsets, mWeights[0]);
	source.ReadAggregateVV(numWeightsOffsets, mOffsets[0]);

	source.ReadPointerVR(mNumBones, mBones);

	PX2_END_DEBUG_STREAM_LOAD(SkinController, source);
}
예제 #4
0
//----------------------------------------------------------------------------
void MorphController::Load (InStream& source)
{
    WM5_BEGIN_DEBUG_STREAM_LOAD(source);

    Controller::Load(source);

    source.Read(mNumVertices);
    source.Read(mNumTargets);
    source.Read(mNumKeys);

    int numTotalVertices = mNumVertices*mNumTargets;
    mVertices = new2<APoint>(mNumVertices, mNumTargets);
    source.ReadAggregateVV(numTotalVertices, mVertices[0]);

    source.ReadVR(mNumKeys, mTimes);

    int numTotalWeights = mNumKeys*(mNumTargets - 1);
    mWeights = new2<float>(mNumTargets - 1, mNumKeys);
    source.ReadVV(numTotalWeights, mWeights[0]);

    WM5_END_DEBUG_STREAM_LOAD(MorphController, source);
}