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