org.graphstream.boids.forces.ntree
Class BoidCellData
java.lang.Object
org.miv.pherd.ntree.BarycenterCellData
org.graphstream.boids.forces.ntree.BoidCellData
- All Implemented Interfaces:
- org.miv.pherd.ntree.CellData
public class BoidCellData
- extends org.miv.pherd.ntree.BarycenterCellData
Compute both the barycenter and average direction of the particles in the
box.
XXX TODO there are bugs here, verify this code and reuse it in the boid
computation (actually the ntree is used only to go faster in searching
neighbors).
- Since:
- 2007
- Author:
- Antoine Dutot
|
Field Summary |
org.miv.pherd.geom.Vector3 |
dir
|
| Fields inherited from class org.miv.pherd.ntree.BarycenterCellData |
cell, center, marked, weight |
| Methods inherited from class org.miv.pherd.ntree.BarycenterCellData |
distanceFrom, getCenter, getWeight, setCell |
dir
public org.miv.pherd.geom.Vector3 dir
BoidCellData
public BoidCellData()
getDirection
public org.miv.pherd.geom.Vector3 getDirection()
newCellData
public org.miv.pherd.ntree.CellData newCellData()
- Specified by:
newCellData in interface org.miv.pherd.ntree.CellData- Overrides:
newCellData in class org.miv.pherd.ntree.BarycenterCellData
recompute
public void recompute()
- Specified by:
recompute in interface org.miv.pherd.ntree.CellData- Overrides:
recompute in class org.miv.pherd.ntree.BarycenterCellData
Copyright © 2013. All Rights Reserved.