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


C++ ParticleSystem::DrawSystem方法代码示例

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


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

示例1: UpdateSystems

void ParticleSystemManager::UpdateSystems( float frametime ) //LRC - now with added time!
{
//	gEngfuncs.pTriAPI->RenderMode(kRenderTransAdd);
//	gEngfuncs.pTriAPI->RenderMode(kRenderTransAlpha);
	ParticleSystem* pSystem;
	ParticleSystem* pLast = NULL;
	ParticleSystem*pLastSorted = NULL;
	cl_entity_t *localPlayer = gEngfuncs.GetLocalPlayer();
//	vec3_t normal, forward, right, up;

//	gEngfuncs.GetViewAngles((float*)normal);
//	AngleVectors(normal,forward,right,up);

	//SortSystems();

	pSystem = m_pFirstSystem;
	while( pSystem )
	{
		if(	pSystem->UpdateSystem(frametime, /*right, up,*/ localPlayer->curstate.messagenum) )
		{
			pSystem->DrawSystem();
			pLast = pSystem;
			pSystem = pSystem->m_pNextSystem;
		}
		else // delete this system
		{
			if (pLast)
			{
				pLast->m_pNextSystem = pSystem->m_pNextSystem;
				delete pSystem;
				pSystem = pLast->m_pNextSystem;
			}
			else // deleting the first system
			{
				m_pFirstSystem = pSystem->m_pNextSystem;
				delete pSystem;
				pSystem = m_pFirstSystem;
			}
		}
	}
	gEngfuncs.pTriAPI->RenderMode(kRenderNormal);
}
开发者ID:JoelTroch,项目名称:am_src_rebirth,代码行数:42,代码来源:particlemgr.cpp

示例2: UpdateSystems

void ParticleSystemManager::UpdateSystems( void )
{
	static float fOldTime, fTime;
	fOldTime = fTime;
	fTime = GetClientTime();
	float frametime = fTime - fOldTime;
	
	ParticleSystem* pSystem;
	ParticleSystem* pLast = NULL;
	ParticleSystem*pLastSorted = NULL;

	SortSystems();

	pSystem = m_pFirstSystem;
	while( pSystem )
	{
		if( pSystem->UpdateSystem( frametime ))
		{
			pSystem->DrawSystem();
			pLast = pSystem;
			pSystem = pSystem->m_pNextSystem;
		}
		else // delete this system
		{
			if (pLast)
			{
				pLast->m_pNextSystem = pSystem->m_pNextSystem;
				delete pSystem;
				pSystem = pLast->m_pNextSystem;
			}
			else // deleting the first system
			{
				m_pFirstSystem = pSystem->m_pNextSystem;
				delete pSystem;
				pSystem = m_pFirstSystem;
			}
		}
	}
	g_engfuncs.pTriAPI->RenderMode(kRenderNormal);
}
开发者ID:a1batross,项目名称:Xash3D_ancient,代码行数:40,代码来源:aurora.cpp


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