MCPcopy Create free account
hub / github.com/SpartanJ/eepp / particlesCallback

Method particlesCallback

src/tests/test_all/test.cpp:2183–2193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2181}
2182
2183void EETest::particlesCallback( Particle* P, ParticleSystem* Me ) {
2184 Float x, y, radio;
2185 Vector2f MePos( Me->getPosition() );
2186
2187 radio = ( Math::randf( 1.f, 1.2f ) + sin( 20.0f / P->getId() ) ) * 24;
2188 x = MePos.x + radio * cos( (Float)P->getId() );
2189 y = MePos.y + radio * sin( (Float)P->getId() );
2190 P->reset( x, y, Math::randf( -10.f, 10.f ), Math::randf( -10.f, 10.f ),
2191 Math::randf( -10.f, 10.f ), Math::randf( -10.f, 10.f ) );
2192 P->setColor( ColorAf( 1.f, 0.6f, 0.3f, 1.f ), 0.02f + Math::randf() * 0.3f );
2193}
2194
2195void EETest::particles() {
2196 PS[0].setPosition( Mousef );

Callers

nothing calls this directly

Calls 5

randfFunction · 0.85
getIdMethod · 0.65
getPositionMethod · 0.45
resetMethod · 0.45
setColorMethod · 0.45

Tested by

no test coverage detected