org.graphstream.boids.forces.ntree
Class BoidCellData

java.lang.Object
  extended by org.miv.pherd.ntree.BarycenterCellData
      extended by 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
 
Constructor Summary
BoidCellData()
           
 
Method Summary
 org.miv.pherd.geom.Vector3 getDirection()
           
 org.miv.pherd.ntree.CellData newCellData()
           
 void recompute()
           
 
Methods inherited from class org.miv.pherd.ntree.BarycenterCellData
distanceFrom, getCenter, getWeight, setCell
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dir

public org.miv.pherd.geom.Vector3 dir
Constructor Detail

BoidCellData

public BoidCellData()
Method Detail

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.