s373.boids
Class Flock3d

java.lang.Object
  extended by s373.boids.Flock3d

public class Flock3d
extends Object


Field Summary
 ArrayList<AttractionPoint3d> attractionPoints
           
 ArrayList<Boid3d> boids
           
 
Constructor Summary
Flock3d(int num, float lx, float ly, float lz)
           
Flock3d(int num, float lx, float ly, float lz, float dev)
           
 
Method Summary
 Flock3d add(float lx, float ly, float lz)
           
 Flock3d addAttractionPoint(float x, float y, float z, float force, float sensorDist)
           
 void changeAttractionPoint(int id, float x, float y, float z, float force, float sensorDist)
           
 Boid3d get(int idx)
           
 float getAlign()
           
 ArrayList<AttractionPoint3d> getAttractionPoints()
           
 int getBoundmode()
           
 float getCohesion()
           
 float getDistAlign()
           
 float getDistCohesion()
           
 float getMaxForce()
           
 float getMaxSpeed()
           
 float getMaxTurn()
           
 float getSeparate()
           
 float getSeparation()
           
 boolean hasAttractionPoints()
           
 Flock3d setAlign(float forceAlign)
           
 Flock3d setBoundmode(int boundmode)
           
 Flock3d setBounds(float minx, float miny, float minz, float maxx, float maxy, float maxz)
           
 Flock3d setCohesion(float forceCohesion)
           
 Flock3d setDistAlign(float d)
           
 Flock3d setDistCohesion(float d)
           
 Flock3d setDistSeparation(float distSeparation)
           
 Flock3d setMaxForce(float mf)
           
 Flock3d setMaxSpeed(float ms)
           
 Flock3d setMaxTurn(float mt)
           
 Flock3d setSeparate(float forceSeparate)
           
 int size()
           
 void update(float amount)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

boids

public ArrayList<Boid3d> boids

attractionPoints

public ArrayList<AttractionPoint3d> attractionPoints
Constructor Detail

Flock3d

public Flock3d(int num,
               float lx,
               float ly,
               float lz)

Flock3d

public Flock3d(int num,
               float lx,
               float ly,
               float lz,
               float dev)
Method Detail

add

public Flock3d add(float lx,
                   float ly,
                   float lz)

setMaxTurn

public Flock3d setMaxTurn(float mt)

setMaxSpeed

public Flock3d setMaxSpeed(float ms)

setMaxForce

public Flock3d setMaxForce(float mf)

getMaxTurn

public float getMaxTurn()

getMaxSpeed

public float getMaxSpeed()

getMaxForce

public float getMaxForce()

getSeparate

public float getSeparate()

setSeparate

public Flock3d setSeparate(float forceSeparate)

setAlign

public Flock3d setAlign(float forceAlign)

setCohesion

public Flock3d setCohesion(float forceCohesion)

getAlign

public float getAlign()

getCohesion

public float getCohesion()

getSeparation

public float getSeparation()
Returns:
the distSeparation

getDistAlign

public float getDistAlign()
Returns:
the distNeighborDistance

getDistCohesion

public float getDistCohesion()
Returns:
the distNeighborDistance

setDistSeparation

public Flock3d setDistSeparation(float distSeparation)
Parameters:
distSeparation - the distSeparation to set

setDistAlign

public Flock3d setDistAlign(float d)
Returns:
the distNeighborDistance

setDistCohesion

public Flock3d setDistCohesion(float d)
Returns:
the distNeighborDistance

setBounds

public Flock3d setBounds(float minx,
                         float miny,
                         float minz,
                         float maxx,
                         float maxy,
                         float maxz)

getBoundmode

public int getBoundmode()
Returns:
the boundmode

setBoundmode

public Flock3d setBoundmode(int boundmode)
Parameters:
boundmode - the boundmode to set

update

public void update(float amount)

size

public int size()

get

public Boid3d get(int idx)

addAttractionPoint

public Flock3d addAttractionPoint(float x,
                                  float y,
                                  float z,
                                  float force,
                                  float sensorDist)

getAttractionPoints

public ArrayList<AttractionPoint3d> getAttractionPoints()

hasAttractionPoints

public boolean hasAttractionPoints()

changeAttractionPoint

public void changeAttractionPoint(int id,
                                  float x,
                                  float y,
                                  float z,
                                  float force,
                                  float sensorDist)


Processing library boids by Andre Sier. (C) 2010-12