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


C++ Particles::GetVertexQuantity方法代码示例

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


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

示例1: GetMemoryUsed

//----------------------------------------------------------------------------
int ParticleController::GetMemoryUsed () const
{
    int iBaseSize = sizeof(ParticleController) - sizeof(Controller);

    Particles* pkParticle = (Particles*) m_pkObject;
    int iVertexQuantity = pkParticle->GetVertexQuantity();
    int iDynaSize = iVertexQuantity*sizeof(m_afPointLinearSpeed[0]);
    iDynaSize += iVertexQuantity*sizeof(m_afPointAngularSpeed[0]);
    iDynaSize += iVertexQuantity*sizeof(m_akPointLinearAxis[0]);
    iDynaSize += iVertexQuantity*sizeof(m_akPointAngularAxis[0]);
    iDynaSize += iVertexQuantity*sizeof(m_afPointSizeChange[0]);

    int iTotalSize = iBaseSize + iDynaSize + Controller::GetMemoryUsed();
    return iTotalSize;
}
开发者ID:Steven0818,项目名称:Deform,代码行数:16,代码来源:WmlParticleController.cpp

示例2: GetDiskUsed

//----------------------------------------------------------------------------
int ParticleController::GetDiskUsed () const
{
    int iSize = Controller::GetDiskUsed() +
        sizeof(m_fSystemLinearSpeed) +
        sizeof(m_fSystemAngularSpeed) +
        sizeof(m_kSystemLinearAxis) +
        sizeof(m_kSystemAngularAxis) +
        sizeof(m_fSystemSizeChange);

    Particles* pkParticle = (Particles*) m_pkObject;
    int iVertexQuantity = pkParticle->GetVertexQuantity();

    iSize += sizeof(iVertexQuantity);
    iSize += iVertexQuantity*sizeof(m_afPointLinearSpeed[0]);
    iSize += iVertexQuantity*sizeof(m_afPointAngularSpeed[0]);
    iSize += iVertexQuantity*sizeof(m_akPointLinearAxis[0]);
    iSize += iVertexQuantity*sizeof(m_akPointAngularAxis[0]);
    iSize += iVertexQuantity*sizeof(m_afPointSizeChange[0]);

    return iSize;
}
开发者ID:Steven0818,项目名称:Deform,代码行数:22,代码来源:WmlParticleController.cpp

示例3: Save

//----------------------------------------------------------------------------
void ParticleController::Save (Stream& rkStream)
{
    Controller::Save(rkStream);

    // native data
    StreamWrite(rkStream,m_fSystemLinearSpeed);
    StreamWrite(rkStream,m_fSystemAngularSpeed);
    StreamWrite(rkStream,m_kSystemLinearAxis);
    StreamWrite(rkStream,m_kSystemAngularAxis);

    // Write this to disk so that Load does not have to wait until the
    // controlled object is loaded and linked in order to allocate the
    // arrays.
    Particles* pkParticle = (Particles*)m_pkObject;
    int iVertexQuantity = pkParticle->GetVertexQuantity();
    StreamWrite(rkStream,iVertexQuantity);

    StreamWrite(rkStream,m_afPointLinearSpeed,iVertexQuantity);
    StreamWrite(rkStream,m_afPointAngularSpeed,iVertexQuantity);
    StreamWrite(rkStream,m_akPointLinearAxis,iVertexQuantity);
    StreamWrite(rkStream,m_akPointAngularAxis,iVertexQuantity);
    StreamWrite(rkStream,m_fSystemSizeChange);
    StreamWrite(rkStream,m_afPointSizeChange,iVertexQuantity);
}
开发者ID:Steven0818,项目名称:Deform,代码行数:25,代码来源:WmlParticleController.cpp


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