public class GreedyForcesFactory extends Object implements BoidForcesFactory
| Constructor and Description |
|---|
GreedyForcesFactory(BoidGraph ctx) |
| Modifier and Type | Method and Description |
|---|---|
BoidForces |
createNewForces(Boid b)
Create a new forces object for a boid.
|
void |
end()
Terminate all operations.
|
void |
init()
Called by
BoidGraph when forces factory is
set. |
void |
resize(org.miv.pherd.geom.Point3 low,
org.miv.pherd.geom.Point3 high)
Resize the space.
|
void |
step()
Compute forces for all boids.
|
public GreedyForcesFactory(BoidGraph ctx)
public void init()
BoidForcesFactoryBoidGraph when forces factory is
set. It allows the forces factory to execute some code before it starts.init in interface BoidForcesFactorypublic BoidForces createNewForces(Boid b)
BoidForcesFactorycreateNewForces in interface BoidForcesFactoryb - the boidpublic void step()
BoidForcesFactorystep in interface BoidForcesFactorypublic void resize(org.miv.pherd.geom.Point3 low,
org.miv.pherd.geom.Point3 high)
BoidForcesFactoryresize in interface BoidForcesFactorylow - the new lowest point.high - the new highest point.public void end()
BoidForcesFactoryend in interface BoidForcesFactoryCopyright © 2015. All rights reserved.