org.graphstream.boids.forces.ntree
Class NTreeForces

java.lang.Object
  extended by org.graphstream.boids.BoidForces
      extended by org.graphstream.boids.forces.ntree.NTreeForces

public class NTreeForces
extends BoidForces

A basic definition of forces for a boid.

The kind of forces exercising on a boid can be changed to either use a n-tree or not, or to account for other kind of forces or another force model. This is the default force system that matches the basic boid definition as defined by Craig Reynolds.

Author:
Guilhelm Savin, Antoine Dutot

Field Summary
 
Fields inherited from class org.graphstream.boids.BoidForces
attraction, barycenter, countAtt, countRep, direction, repulsion
 
Constructor Summary
NTreeForces(BoidParticle p)
           
 
Method Summary
 Collection<Boid> getNeighborhood()
           
 org.miv.pherd.geom.Point3 getNextPosition()
           
 org.miv.pherd.geom.Point3 getPosition()
           
 void setPosition(double x, double y, double z)
           
 
Methods inherited from class org.graphstream.boids.BoidForces
addAttraction, addDirection, addRepulsion, compute, getDirection, isVisible, moveBarycenter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NTreeForces

public NTreeForces(BoidParticle p)
Method Detail

getPosition

public org.miv.pherd.geom.Point3 getPosition()
Specified by:
getPosition in class BoidForces

setPosition

public void setPosition(double x,
                        double y,
                        double z)
Specified by:
setPosition in class BoidForces

getNextPosition

public org.miv.pherd.geom.Point3 getNextPosition()
Specified by:
getNextPosition in class BoidForces

getNeighborhood

public Collection<Boid> getNeighborhood()
Specified by:
getNeighborhood in class BoidForces


Copyright © 2013. All Rights Reserved.