//------------------------------------------------------------
void Particle::addNoise(float _angle, float _turbulence){
    
    float angle = ofSignedNoise( x * 0.005f, y * 0.005f) * _angle;
    
    ofPoint noiseVector( cos( angle ), sin( angle ) );
    
    acc += noiseVector * _turbulence;
}
示例#2
0
//------------------------------------------------------------
void Particle::addNoise(float _angle, float _turbulence){
    
    float angle = ofSignedNoise( x * 0.005f, y * 0.005f) * _angle;
    
    ofPoint noiseVector( cos( angle ), sin( angle ) );
    
    acc += noiseVector * _turbulence * (1.0-ofMap(life,0.0,initLife,0.0,1.0));
}
void Pelota::agregarNoise(float _angulo, float _turbulencia){
    float angulo = ofSignedNoise(pos.x * 0.005f, pos.y *0.005f) * angulo;
    ofVec2f noiseVector( cos( angulo ), sin( angulo ) );
    acc += noiseVector * _turbulencia * (1.0 - ofNormalize(vida, 0, vidaInicial));
}
示例#4
0
void Particle::addNoise(float _angle, float _turbulence){
    float angle = ofSignedNoise(pos.x * 0.005f, pos.y * 0.005f) * _angle;
    ofVec2f noiseVector ( cos (angle), sin (angle) );
    acc += noiseVector * _turbulence * (1.0 - ofNormalize(life, 0, initialLife));
}