//----------------------------------------------------------------------------
int RawTerrainPage::GetStreamingSize (Stream &stream) const
{
	int size = TerrainPage::GetStreamingSize(stream);

	if (Stream::ST_IN == stream.GetStreamType())
	{
		int readedVersion = GetReadedVersion();
		if (0 == readedVersion)
		{
			size += PX2_VERSION_SIZE(mVersion);
			size += PX2_POINTERSIZE(mMtlInst) * 8;
			size += sizeof(mUV01);
			size += sizeof(mUV23);
			size += sizeof(mUV4);
			size += PX2_POINTERSIZE(mUV01Float);
			size += PX2_POINTERSIZE(mUV23Float);
			size += PX2_POINTERSIZE(mUV4Float);
		}
		else if (1 == readedVersion)
		{
			size += PX2_VERSION_SIZE(mVersion);
			size += PX2_POINTERSIZE(mMtlInst);
			size += PX2_STRINGSIZE(mTextureDefaultFilename);
			size += PX2_STRINGSIZE(mTexture0Filename);
			size += PX2_POINTERSIZE(mTextureAlpha);
			size += PX2_STRINGSIZE(mTexture1Filename);
			size += PX2_STRINGSIZE(mTexture2Filename);
			size += PX2_STRINGSIZE(mTexture3Filename);
			size += PX2_STRINGSIZE(mTexture4Filename);
			size += sizeof(mUV01);
			size += sizeof(mUV23);
			size += sizeof(mUV4);
			size += PX2_POINTERSIZE(mUV01Float);
			size += PX2_POINTERSIZE(mUV23Float);
			size += PX2_POINTERSIZE(mUV4Float);
		}
	}
	else
	{
		size += PX2_VERSION_SIZE(mVersion);
		size += PX2_POINTERSIZE(mMtlInst);
		size += PX2_STRINGSIZE(mTextureDefaultFilename);
		size += PX2_STRINGSIZE(mTexture0Filename);
		size += PX2_POINTERSIZE(mTextureAlpha);
		size += PX2_STRINGSIZE(mTexture1Filename);
		size += PX2_STRINGSIZE(mTexture2Filename);
		size += PX2_STRINGSIZE(mTexture3Filename);
		size += PX2_STRINGSIZE(mTexture4Filename);
		size += sizeof(mUV01);
		size += sizeof(mUV23);
		size += sizeof(mUV4);
		size += PX2_POINTERSIZE(mUV01Float);
		size += PX2_POINTERSIZE(mUV23Float);
		size += PX2_POINTERSIZE(mUV4Float);
	}


	return size;
}
//----------------------------------------------------------------------------
int InterpCurveSpeedController::GetStreamingSize (Stream &stream) const
{
	int size = InterpCurveFloat3Controller::GetStreamingSize(stream);
	size += PX2_VERSION_SIZE(mVersion);

	size += sizeof(mMaxLength);

	if (Stream::ST_IN == stream.GetStreamType())
	{
		if (0 == GetReadedVersion())
		{
		}
		else
		{
			size += sizeof(mInitPos);
		}
	}
	else
	{
		size += sizeof(mInitPos);
	}

	return size;
}