//-Initial Particle Setup (See Params Above)------------------ void Particle::setup() { pos = param.eCenter + randomPointInCircle(param.eRad); vel = randomPointInCircle(param.velRad); time = 0; lifeTime = param.lifeTime; live = true; }
//-------------------------------------------------------------- void Particle::setup() { pos = param.eCenter + randomPointInCircle( param.eRad ); vel = randomPointInCircle( param.velRad ); time = 0; rotate = ofRandom(-180.0f, 180.0f); lifeTime = param.lifeTime; live = true; }
void Particle::setup(Params *_param) { param = _param; //save the params so we can use them locally pos = param->eCenter + randomPointInCircle(param->eRad); //generate a random position from the emmiter for the start vel = randomPointInCircle(param->velRad); //generate a random direction to go time = 0; lifeTime = param->lifeTime; live = true; //it's alive!!!! //hue = 0 ; //color = ofColor::blue ; }
void ParticleDemo::setup(){ targetJoint = acquireTarget(); //pos = ofPoint(paramsDemo.eCenter.x - (ofGetWidth()/2 + 8 + 10), paramsDemo.eCenter.y - (10 + 8 + 8 + 8)) + randomPointInCircle(paramsDemo.eRad); pos = paramsDemo.eCenter + randomPointInCircle(paramsDemo.eRad); vel = randomPointInCircle(paramsDemo.velRad); time = 0; lifeTime = paramsDemo.lifeTime; live = true; size = paramsDemo.size; force = paramsDemo.force; tracking = paramsDemo.tracking; }