#include <ParticleLocality.h>
Inheritance diagram for ParticleLocality:


Such classes can optimize the finding of particle neighbors.
Definition at line 18 of file ParticleLocality.h.
Public Member Functions | |
| MAKE_PARTICLESTUFF_NAME () | |
| ParticleLocality (Particles *ps=NULL, std::string name=std::string("ParticleLocality")) | |
| Constructor. | |
| virtual void | clear () |
| virtual void | update () |
| Update callback. | |
| virtual void | setQueryRadius (double newr) |
| Set the query radius. | |
| virtual double | getQueryRadius () |
| Returns the query radius. | |
| virtual void | getNeighbors (unsigned int i, std::vector< int > &neighbors) |
| Finds possible neighbors of a particle. | |
| void | getNeighbors (unsigned int i, double r, std::vector< int > &neighbors) |
| Shortcut that calls setQueryRadius, then getNeighbors. | |
Public Attributes | |
| double | r |
| Query radius. | |
|
||||||||||||
|
Constructor.
Definition at line 16 of file ParticleLocality.cpp. References r. |
|
|
Reimplemented from ParticleAttribute. Reimplemented in ParticleLocalityGrid. Definition at line 33 of file ParticleLocality.h. |
|
||||||||||||||||
|
Shortcut that calls setQueryRadius, then getNeighbors.
Definition at line 65 of file ParticleLocality.h. References getNeighbors(), and setQueryRadius(). |
|
||||||||||||
|
Finds possible neighbors of a particle. Might use the internally stored query radius to limit the search to nearby particles. Use setQueryRadius to set. Definition at line 32 of file ParticleLocality.cpp. References ParticleStuff::ps, and Particles::size(). Referenced by ParticleRepulsion::applyForce(), ParticleShaderLink::draw(), getNeighbors(), and ParticleRendererGL::render(). |
|
|
Returns the query radius.
Definition at line 55 of file ParticleLocality.h. References r. |
|
|
Reimplemented in ParticleLocalityGrid. |
|
|
Set the query radius. Some ParticleLocality subclasses may not care what the query radius is. For example, they may return mesh edge neighbors. Definition at line 51 of file ParticleLocality.h. References r. Referenced by ParticleRepulsion::applyForce(), and getNeighbors(). |
|
|
Update callback.
Reimplemented in ParticleLocalityGrid. Definition at line 45 of file ParticleLocality.h. Referenced by ParticleRepulsion::cleanup(). |
|
|
Query radius.
Definition at line 24 of file ParticleLocality.h. Referenced by ParticleLocalityGrid::getNeighbors(), getQueryRadius(), ParticleLocality(), and setQueryRadius(). |
1.3.4