本文整理汇总了C++中Flow::setParticleMinSpeed方法的典型用法代码示例。如果您正苦于以下问题:C++ Flow::setParticleMinSpeed方法的具体用法?C++ Flow::setParticleMinSpeed怎么用?C++ Flow::setParticleMinSpeed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flow
的用法示例。
在下文中一共展示了Flow::setParticleMinSpeed方法的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) );
}
}
}