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


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

本文整理汇总了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;
}
开发者ID:Steven0818,项目名称:Deform,代码行数:23,代码来源:WmlPolyline.cpp

示例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);
}
开发者ID:Steven0818,项目名称:Deform,代码行数:21,代码来源:WmlLightNode.cpp

示例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);
}
开发者ID:Hengplank,项目名称:kucgbowling,代码行数:41,代码来源:WmlTexture.cpp

示例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);
}
开发者ID:Steven0818,项目名称:Deform,代码行数:37,代码来源:WmlParticleController.cpp


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