Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ulu.sim.boid
Class Boid  view Boid download Boid.java

java.lang.Object
  extended byulu.sim.boid.Boid
All Implemented Interfaces:
ulu.sim.Sim

public class Boid
extends java.lang.Object
implements ulu.sim.Sim

Boid.class This class defines the behaviour of a Boid object.


Field Summary
 int Angle
           
 int BoxHeight
           
 int BoxWidth
           
 int DAngle
           
 int MaxDistance
           
 double MaxSpeed
           
 int MaxTurn
           
 int MinDistance
           
(package private)  BoidRule MyRule
           
 int Tribe
           
 int XPos
           
 int YPos
           
 
Constructor Summary
Boid(Boid b)
           
Boid(int x, int y, int th, int tr, int w, int h, int mind, int maxd, int maxsp, int maxt, BoidRule rule)
           
Boid(java.awt.Rectangle r, Boid b)
           
Boid(java.awt.Rectangle r, int tr, int w, int h, int mind, int maxd, int maxsp, int maxt, BoidRule rule)
           
 
Method Summary
 int getDistance(Boid b)
           
 int getDistance(int x, int y)
           
 java.awt.Point getPosition()
           
 int getTheta()
           
 int getTribe()
           
 boolean likes(Boid b)
           
(package private)  void setBoundaries(int w, int h)
           
 void step(double time, double step)
           
 void turnTowards(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XPos

public int XPos

YPos

public int YPos

Angle

public int Angle

DAngle

public int DAngle

Tribe

public int Tribe

MinDistance

public int MinDistance

MaxDistance

public int MaxDistance

BoxWidth

public int BoxWidth

BoxHeight

public int BoxHeight

MaxSpeed

public double MaxSpeed

MaxTurn

public int MaxTurn

MyRule

BoidRule MyRule
Constructor Detail

Boid

public Boid(int x,
            int y,
            int th,
            int tr,
            int w,
            int h,
            int mind,
            int maxd,
            int maxsp,
            int maxt,
            BoidRule rule)

Boid

public Boid(java.awt.Rectangle r,
            int tr,
            int w,
            int h,
            int mind,
            int maxd,
            int maxsp,
            int maxt,
            BoidRule rule)

Boid

public Boid(Boid b)

Boid

public Boid(java.awt.Rectangle r,
            Boid b)
Method Detail

step

public void step(double time,
                 double step)
Specified by:
step in interface ulu.sim.Sim

turnTowards

public void turnTowards(int i)

getDistance

public int getDistance(Boid b)

getDistance

public int getDistance(int x,
                       int y)

setBoundaries

void setBoundaries(int w,
                   int h)

getTheta

public int getTheta()

getPosition

public java.awt.Point getPosition()

getTribe

public int getTribe()

likes

public boolean likes(Boid b)