Exemple #1
0
void unlockRandomParticles() {
	for(int i=0; i<physics.numberOfParticles(); i++) {
		Physics::Particle3D *p = physics.getParticle(i);
		p->makeFree();
	}
	mouseNode.makeFixed();
}
Exemple #2
0
void lockRandomParticles() {
	for(int i=0; i<physics.numberOfParticles(); i++) {
		Physics::Particle3D *p = physics.getParticle(i);
		if(ofRandom(0, 100) < FIX_PROBABILITY) p->makeFixed();
		else p->makeFree();
	}
	mouseNode.makeFixed();
}