org.graphstream.boids.forces.ntree
Class NTreeForcesFactory

java.lang.Object
  extended by org.graphstream.boids.forces.ntree.NTreeForcesFactory
All Implemented Interfaces:
BoidForcesFactory, org.graphstream.stream.ElementSink

public class NTreeForcesFactory
extends Object
implements BoidForcesFactory, org.graphstream.stream.ElementSink


Constructor Summary
NTreeForcesFactory(BoidGraph ctx)
           
 
Method Summary
 BoidForces createNewForces(Boid b)
          Create a new forces object for a boid.
 void edgeAdded(String sourceId, long timeId, String edgeId, String fromNodeId, String toNodeId, boolean directed)
           
 void edgeRemoved(String sourceId, long timeId, String edgeId)
           
 void end()
          Terminate all operations.
 void graphCleared(String sourceId, long timeId)
           
 void init()
          Called by BoidGraph when forces factory is set.
 void nodeAdded(String sourceId, long timeId, String nodeId)
           
 void nodeRemoved(String sourceId, long timeId, String nodeId)
           
 void resize(org.miv.pherd.geom.Point3 low, org.miv.pherd.geom.Point3 high)
          Resize the space.
 void step()
          Compute forces for all boids.
 void stepBegins(String sourceId, long timeId, double step)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NTreeForcesFactory

public NTreeForcesFactory(BoidGraph ctx)
Method Detail

init

public void init()
Description copied from interface: BoidForcesFactory
Called by BoidGraph when forces factory is set. It allows the forces factory to execute some code before it starts.

Specified by:
init in interface BoidForcesFactory

createNewForces

public BoidForces createNewForces(Boid b)
Description copied from interface: BoidForcesFactory
Create a new forces object for a boid.

Specified by:
createNewForces in interface BoidForcesFactory
Parameters:
b - the boid
Returns:
a new forces object associate with the boid

step

public void step()
Description copied from interface: BoidForcesFactory
Compute forces for all boids.

Specified by:
step in interface BoidForcesFactory

resize

public void resize(org.miv.pherd.geom.Point3 low,
                   org.miv.pherd.geom.Point3 high)
Description copied from interface: BoidForcesFactory
Resize the space.

Specified by:
resize in interface BoidForcesFactory
Parameters:
low - the new lowest point.
high - the new highest point.

end

public void end()
Description copied from interface: BoidForcesFactory
Terminate all operations.

Specified by:
end in interface BoidForcesFactory

edgeAdded

public void edgeAdded(String sourceId,
                      long timeId,
                      String edgeId,
                      String fromNodeId,
                      String toNodeId,
                      boolean directed)
Specified by:
edgeAdded in interface org.graphstream.stream.ElementSink

edgeRemoved

public void edgeRemoved(String sourceId,
                        long timeId,
                        String edgeId)
Specified by:
edgeRemoved in interface org.graphstream.stream.ElementSink

graphCleared

public void graphCleared(String sourceId,
                         long timeId)
Specified by:
graphCleared in interface org.graphstream.stream.ElementSink

nodeAdded

public void nodeAdded(String sourceId,
                      long timeId,
                      String nodeId)
Specified by:
nodeAdded in interface org.graphstream.stream.ElementSink

nodeRemoved

public void nodeRemoved(String sourceId,
                        long timeId,
                        String nodeId)
Specified by:
nodeRemoved in interface org.graphstream.stream.ElementSink

stepBegins

public void stepBegins(String sourceId,
                       long timeId,
                       double step)
Specified by:
stepBegins in interface org.graphstream.stream.ElementSink


Copyright © 2013. All Rights Reserved.