本文整理汇总了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;
}
示例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;
}