We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › traer attractions index
Page Index Toggle Pages: 1
traer attractions index (Read 783 times)
traer attractions index
Jul 28th, 2009, 5:33pm
 
Hi list!

In traer.physics lib have a method for remove particles and Attractions between 2 particles.

the Doc reference says:
Code:
int numberOfAttractions()
Attraction getAttraction( int index )
void removeAttraction( int index )
void removeAttraction( Attraction a )
Note removing things shifts the indices.


But i don't know that:  it's make an attraction index for each particle, or
an index for every 2 particles that share an attraction?

in other words:

Particle1/Particle2 -> 1 Attraction index?
or  
Particle1/Particle2 -> 2 Attraction index (one for each particle)?

Thanks



Re: traer attractions index
Reply #1 - Aug 1st, 2009, 5:33am
 
There is a method called numberOfAttractions() on ParticleSystem. Why not try create an attraction between two particles and ask ParticleSystem how many attractions there are.
Page Index Toggle Pages: 1