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


C++ Flow::setParticleStartScale方法代码示例

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


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

示例1: load


//.........这里部分代码省略.........
			ps->setParticleMaxSize( maxSize );
		}
		else if ( str == "Kill" )
		{
			reader->readString( str );
			KillType killType = ParticleSystem::KILL_RANDOM;
			if ( str == "RANDOM" )
				killType = ParticleSystem::KILL_RANDOM;
			else if ( str == "OLDEST" )
				killType = ParticleSystem::KILL_OLDEST;
			else if ( str == "NOTHING" )
				killType = ParticleSystem::KILL_NOTHING;
			ps->setKillType( killType );
		}
		else if ( str == "Image" )
		{
			reader->readLine( str );
			ps->setImage( loadTex(str,zip) );
		}
		else if ( str == "ImageAnim" )
		{
			reader->readString( str );
			P(Texture) tex = loadTex( str, zip );
			int rows = reader->readInt();
			int cols = reader->readInt();
			int frames = reader->readInt();
			float fps = reader->readFloat();
			reader->readString( str );
			BehaviourType end = BEHAVIOUR_LOOP;
			if ( str == "LOOP" )
				end = BEHAVIOUR_LOOP;
			else if ( str == "MIRROR" )
				end = BEHAVIOUR_MIRROR;
			else if ( str == "LIFE" )
				end = BEHAVIOUR_LIFE;
			else if ( str == "RANDOM" )
				end = BEHAVIOUR_RANDOM;
			ps->setImage( tex, rows, cols, frames, fps, end );
		}
		else if ( str == "ActivationTime" )
		{
			float t = reader->readFloat();
			Debug::println( "Particle system {0} uses deprecated command: ActivationTime {1}", in->toString(), t );
		}
		else if ( str == "Angle" )
		{
			float minAngle = Math::toRadians( reader->readFloat() );
			float maxAngle = Math::toRadians( reader->readFloat() );
			ps->setParticleMinRotation( minAngle );
			ps->setParticleMaxRotation( maxAngle );
		}
		else if ( str == "AngleSpeed" )
		{
			float minAngle = Math::toRadians( reader->readFloat() );
			float maxAngle = Math::toRadians( reader->readFloat() );
			ps->setParticleMinRotationSpeed( minAngle );
			ps->setParticleMaxRotationSpeed( maxAngle );
		}
		else if ( str == "Paths" )
		{
			int paths = reader->readInt();
			ps->setPaths( paths );
		}
		else if ( str == "Radius" )
		{
			ps->startRadius = reader->readFloat();
			ps->endRadius = reader->readFloat();
		}
		else if ( str == "SizeScale" )
		{
			float startScale = reader->readFloat();
			float endScale = reader->readFloat();
			ps->setParticleStartScale( startScale );
			ps->setParticleEndScale( endScale );
		}
		else if ( str == "Speed" )
		{
			float minSpeed = reader->readFloat();
			float maxSpeed = reader->readFloat();
			ps->setParticleMinSpeed( minSpeed );
			ps->setParticleMaxSpeed( maxSpeed );
		}
		else if ( str == "SequentialPathSelection" )
		{
			ps->setRandomPathSelection( false );
		}
		else if ( str == "PathSource" )
		{
			reader->readLine( ps->pathSource );
		}
		else if ( str == "PathTarget" )
		{
			reader->readLine( ps->pathTarget );
		}
		else
		{
			throw IOException( Format("Unknown flow command: {0}",str) );
		}
	}
}
开发者ID:TheRyaz,项目名称:c_reading,代码行数:101,代码来源:Flow.cpp


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