java.lang.Object
ulu.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.
|
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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)
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)