当前位置: 首页>>代码示例>>C++>>正文


C++ Stream::GetStreamType方法代码示例

本文整理汇总了C++中Stream::GetStreamType方法的典型用法代码示例。如果您正苦于以下问题:C++ Stream::GetStreamType方法的具体用法?C++ Stream::GetStreamType怎么用?C++ Stream::GetStreamType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Stream的用法示例。


在下文中一共展示了Stream::GetStreamType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetStreamingSize

//----------------------------------------------------------------------------
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;
}
开发者ID:SylviaTanenbaum,项目名称:3d-simulation-and-game,代码行数:60,代码来源:PX2RawTerrainPage.cpp

示例2: GetStreamingSize

//----------------------------------------------------------------------------
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;
}
开发者ID:SylviaTanenbaum,项目名称:3d-simulation-and-game,代码行数:25,代码来源:PX2InterpCurveSpeedCtrl.cpp


注:本文中的Stream::GetStreamType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。