本文整理汇总了C++中Flow::setParticleMinRotation方法的典型用法代码示例。如果您正苦于以下问题:C++ Flow::setParticleMinRotation方法的具体用法?C++ Flow::setParticleMinRotation怎么用?C++ Flow::setParticleMinRotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flow
的用法示例。
在下文中一共展示了Flow::setParticleMinRotation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void Flow::load( InputStream* in, InputStreamArchive* zip )
{
Flow* ps = this;
P(InputStreamReader) inreader = new InputStreamReader( in );
P(CommandReader) reader = new CommandReader( inreader, in->toString() );
ps->setParticleLifeTime( 100e3f );
String str;
while ( reader->readString(str) )
{
if ( str.startsWith("#") )
{
reader->readLine( str );
continue;
}
else if ( str == "ObjectName" )
{
reader->readLine( str );
ps->setName( str );
}
else if ( str == "EmissionRate" )
{
float emissionRate = reader->readFloat();
ps->setEmissionRate( emissionRate );
}
else if ( str == "ParticleLifeTime" )
{
float particleLifeTime = reader->readFloat();
ps->setParticleLifeTime( particleLifeTime );
}
else if ( str == "SystemLifeTime" )
{
float systemLifeTime = reader->readFloat();
ps->setSystemLifeTime( systemLifeTime );
}
else if ( str == "MaxParticles" )
{
int maxParticles = reader->readInt();
ps->setMaxParticles( maxParticles );
}
else if ( str == "Size" )
{
float minSize = reader->readFloat();
float maxSize = reader->readFloat();
ps->setParticleMinSize( minSize );
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" )
{
//.........这里部分代码省略.........