本文整理汇总了C++中Stream::GetVersion方法的典型用法代码示例。如果您正苦于以下问题:C++ Stream::GetVersion方法的具体用法?C++ Stream::GetVersion怎么用?C++ Stream::GetVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stream
的用法示例。
在下文中一共展示了Stream::GetVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
//----------------------------------------------------------------------------
void Polyline::Load (Stream& rkStream, Stream::Link* pkLink)
{
Geometry::Load(rkStream,pkLink);
// native data
StreamReadBool(rkStream,m_bClosed);
// support for drawing vertex arrays
m_aiIndex = new int[m_iVertexQuantity];
for (int i = 0; i < m_iVertexQuantity; i++)
m_aiIndex[i] = i;
if ( rkStream.GetVersion() >= Version(1,6) )
StreamRead(rkStream,m_iActiveQuantity);
else
m_iActiveQuantity = m_iVertexQuantity;
if ( rkStream.GetVersion() >= Version(1,7) )
StreamReadBool(rkStream,m_bContiguous);
else
m_bContiguous = true;
}
示例2: Load
//----------------------------------------------------------------------------
void LightNode::Load (Stream& rkStream, Stream::Link* pkLink)
{
Node::Load(rkStream,pkLink);
if ( rkStream.GetVersion() >= Version(1,8) )
{
StreamRead(rkStream,m_kLRotate);
StreamRead(rkStream,m_kLTranslate);
}
else
{
m_kLRotate = Matrix3f::IDENTITY;
m_kLTranslate = Vector3f::ZERO;
}
// link data
Light* pkLight;
StreamRead(rkStream,pkLight);
pkLink->Add(pkLight);
}
示例3: Load
//----------------------------------------------------------------------------
void Texture::Load (Stream& rkStream, Stream::Link* pkLink)
{
Object::Load(rkStream,pkLink);
// native data
StreamReadEnum(rkStream,m_eCorrection);
StreamReadEnum(rkStream,m_eApply);
StreamRead(rkStream,m_kBlendColor);
StreamReadEnum(rkStream,m_eWrap);
StreamReadEnum(rkStream,m_eFilter);
StreamReadEnum(rkStream,m_eMipmap);
StreamRead(rkStream,m_fPriority);
if ( rkStream.GetVersion() >= Version(1,3) )
{
StreamReadEnum(rkStream,m_eEnvmap);
StreamRead(rkStream,m_kBorderColor);
StreamReadEnum(rkStream,m_eCombineFuncRGB);
StreamReadEnum(rkStream,m_eCombineFuncAlpha);
StreamReadEnum(rkStream,m_eCombineSrc0RGB);
StreamReadEnum(rkStream,m_eCombineSrc1RGB);
StreamReadEnum(rkStream,m_eCombineSrc2RGB);
StreamReadEnum(rkStream,m_eCombineSrc0Alpha);
StreamReadEnum(rkStream,m_eCombineSrc1Alpha);
StreamReadEnum(rkStream,m_eCombineSrc2Alpha);
StreamReadEnum(rkStream,m_eCombineOp0RGB);
StreamReadEnum(rkStream,m_eCombineOp1RGB);
StreamReadEnum(rkStream,m_eCombineOp2RGB);
StreamReadEnum(rkStream,m_eCombineOp0Alpha);
StreamReadEnum(rkStream,m_eCombineOp1Alpha);
StreamReadEnum(rkStream,m_eCombineOp2Alpha);
StreamReadEnum(rkStream,m_eCombineScaleRGB);
StreamReadEnum(rkStream,m_eCombineScaleAlpha);
}
// link data
Image* pkImage;
StreamRead(rkStream,pkImage);
pkLink->Add(pkImage);
}
示例4: Load
//----------------------------------------------------------------------------
void ParticleController::Load (Stream& rkStream,
Stream::Link* pkLink)
{
Controller::Load(rkStream,pkLink);
// NOTE. ParticleController was derived from PointController. The
// PointController::Save wrote various quantities to disk that are now
// managed by ParticleController. These quantities are written to disk
// in the same order, so no special handling must occur here based on the
// stream version number.
// native data
StreamRead(rkStream,m_fSystemLinearSpeed);
StreamRead(rkStream,m_fSystemAngularSpeed);
StreamRead(rkStream,m_kSystemLinearAxis);
StreamRead(rkStream,m_kSystemAngularAxis);
int iVertexQuantity;
StreamRead(rkStream,iVertexQuantity);
Reallocate(iVertexQuantity);
StreamRead(rkStream,m_afPointLinearSpeed,iVertexQuantity);
StreamRead(rkStream,m_afPointAngularSpeed,iVertexQuantity);
StreamRead(rkStream,m_akPointLinearAxis,iVertexQuantity);
StreamRead(rkStream,m_akPointAngularAxis,iVertexQuantity);
StreamRead(rkStream,m_fSystemSizeChange);
if ( rkStream.GetVersion() < Version(1,4) )
{
// The vertex quantity had been written to disk twice, once by
// PointController and once by ParticleController. Read it and
// discard since it was loaded above.
int iDiscard;
StreamRead(rkStream,iDiscard);
}
StreamRead(rkStream,m_afPointSizeChange,iVertexQuantity);
}