Skip navigation links
A B C D E F G H I L M N O P Q R S T U V W X Y Z _ 

A

abs(int) - Static method in class game2dai.maths.FastMath
Absolute value.
abs(long) - Static method in class game2dai.maths.FastMath
Absolute value.
abs(float) - Static method in class game2dai.maths.FastMath
Absolute value.
abs(double) - Static method in class game2dai.maths.FastMath
Absolute value.
acos(double) - Static method in class game2dai.maths.FastMath
Compute the arc cosine of a number.
acosh(double) - Static method in class game2dai.maths.FastMath
Compute the inverse hyperbolic cosine of a number.
add(Vector2D) - Method in class game2dai.maths.Vector2D
Add a vector to this one
add(double, double) - Method in class game2dai.maths.Vector2D
Change the vector by the values specified
add(Vector2D, Vector2D) - Static method in class game2dai.maths.Vector2D
Get a new vector that is the sum of 2 vectors.
add(BaseEntity) - Method in class game2dai.World
This method must only be used before the main program starts.
addData(int, Vector2D) - Method in class game2dai.utils.ForceRecorder
 
addData(double) - Method in class game2dai.utils.ForceRecorder.Force
 
addEdge(int, int, double) - Method in class game2dai.graph.Graph
Add a unidirectional edge to the graph.
addEdge(int, int, double, double) - Method in class game2dai.graph.Graph
Add bidirectional link with the costs indicated.
addFSM() - Method in class game2dai.entities.BaseEntity
This is the only way to add a finite state machine to the entity.
addHints(int) - Method in class game2dai.entityshapes.Picture
Add more steering behaviour (SB) hints to those already selected.
addNode(GraphNode) - Method in class game2dai.graph.Graph
Add a node to the list.
AGENT0 - Static variable in interface game2dai.steering.SBF
 
AGENT1 - Static variable in interface game2dai.steering.SBF
 
AGENT_TO_EVADE - Static variable in interface game2dai.steering.SBF
 
AGENT_TO_PURSUE - Static variable in interface game2dai.steering.SBF
 
ALIGNMENT - Static variable in interface game2dai.steering.SBF
 
alignmentOff() - Method in class game2dai.steering.AutoPilot
Switch off alignment
alignmentOn() - Method in class game2dai.steering.AutoPilot
Switch on alignment
alignmentWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
alignmentWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
ALL_SB_MASK - Static variable in interface game2dai.steering.SBF
 
allEntities - Static variable in class game2dai.World
 
allOff() - Method in class game2dai.steering.AutoPilot
Switch off all steering behaviours
angleBetween(Vector2D) - Method in class game2dai.maths.Vector2D
Calculate the angle between this and another vector.
angleBetween(Vector2D, Vector2D) - Static method in class game2dai.maths.Vector2D
Calculate the angle between two vectors.
ANTI_CLOCKWISE - Static variable in class game2dai.maths.Vector2D
 
AP(AutoPilot) - Method in class game2dai.entities.Vehicle
Set the auto-pilot to use with this entity.
AP() - Method in class game2dai.entities.Vehicle
Use this to access the auto-pilot object so that it can be modified.
appearance(int, int, float) - Method in class game2dai.entityshapes.ps.ArrowPic
Cahneg the appearance of the arrow
appearance(float, int, int, float) - Method in class game2dai.entityshapes.ps.BuildingPic
Change the drawing factors.
appearance(int, int, float) - Method in class game2dai.entityshapes.ps.CirclePic
Change the drawing factors.
appearance(int, int, int, float) - Method in class game2dai.entityshapes.ps.PersonPic
Create a person of user defined size and colours.
area(Vector2D[]) - Static method in class game2dai.maths.Triangulator
Calculate the area of the polygon.
areEqual(Vector2D, Vector2D) - Static method in class game2dai.maths.Vector2D
 
ARRIVE - Static variable in interface game2dai.steering.SBF
 
arriveDistance() - Method in class game2dai.steering.AutoPilot
Get current distance from the owning entity to the arrive target position.
arriveOff() - Method in class game2dai.steering.AutoPilot
Switch off arrive
arriveOn() - Method in class game2dai.steering.AutoPilot
Switch on arrive
arriveOn(Vector2D) - Method in class game2dai.steering.AutoPilot
Switch on arrive.
arriveOn(Vector2D, int) - Method in class game2dai.steering.AutoPilot
Switch on arrive and define speed of approach.
arriveOn(double, double) - Method in class game2dai.steering.AutoPilot
Switch on arrive
arriveOn(double, double, int) - Method in class game2dai.steering.AutoPilot
Switch on arrive and define speed of approach.
arriveWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
arriveWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
ArrowPic - Class in game2dai.entityshapes.ps
Creates an triangular shape that looks like an arrow.
ArrowPic(PApplet) - Constructor for class game2dai.entityshapes.ps.ArrowPic
Create an arrow 20 units long and 12 units at its thick end with a white body and thin black border.
ArrowPic(PApplet, float, int, int, float) - Constructor for class game2dai.entityshapes.ps.ArrowPic
Create an arrow of user specified length and colours.
Artefact - Class in game2dai.entities
This class represents an artefact that can be added to a game.
Artefact() - Constructor for class game2dai.entities.Artefact
Default constructor
Artefact(String) - Constructor for class game2dai.entities.Artefact
Constructor will give the entity a unique ID.
Artefact(String, Vector2D, double, double) - Constructor for class game2dai.entities.Artefact
 
AshCrowFlight - Class in game2dai.graph
This class is used to calculate the heuristic estimated-cost-to-goal.
AshCrowFlight() - Constructor for class game2dai.graph.AshCrowFlight
Will use a factor of 1.0 to calculate the estimated cost between nodes
AshCrowFlight(double) - Constructor for class game2dai.graph.AshCrowFlight
Create the heuristic.
AshManhattan - Class in game2dai.graph
This class is used to calculate the heuristic estimated-cost-to-goal.
AshManhattan() - Constructor for class game2dai.graph.AshManhattan
Will use a factor of 1.0 to calculate the estimated cost between nodes
AshManhattan(double) - Constructor for class game2dai.graph.AshManhattan
Create the heuristic.
asin(double) - Static method in class game2dai.maths.FastMath
Compute the arc sine of a number.
asinh(double) - Static method in class game2dai.maths.FastMath
Compute the inverse hyperbolic sine of a number.
AstarHeuristic - Interface in game2dai.graph
Interface for all A* heurtic classes
atan(double) - Static method in class game2dai.maths.FastMath
Arctangent function
atan2(double, double) - Static method in class game2dai.maths.FastMath
Two arguments arctangent function
atanh(double) - Static method in class game2dai.maths.FastMath
Compute the inverse hyperbolic tangent of a number.
AutoPilot - Class in game2dai.steering
AutoPilot Objects are used to control the motion of a Vehicle object by specifying a set of steering behaviours the Vehicle must obey.
AutoPilot() - Constructor for class game2dai.steering.AutoPilot
 

B

BaseEntity - Class in game2dai.entities
This is the base class for all game entities.
BaseEntity() - Constructor for class game2dai.entities.BaseEntity
Default constructor
BaseEntity(String) - Constructor for class game2dai.entities.BaseEntity
Constructor will give the entity a unique ID.
BaseEntity(String, Vector2D, double) - Constructor for class game2dai.entities.BaseEntity
Constructor will give the entity a unique ID.
BaseEntity.DepthOrder - Class in game2dai.entities
This comparator is used to control the order the entities are drawn to the screen.
birth(BaseEntity, double) - Method in class game2dai.World
This is the preferred method to add an entity to the world once the game is in progress i.e.
BIT_ALIGNMENT - Static variable in interface game2dai.steering.SBF
 
BIT_ARRIVE - Static variable in interface game2dai.steering.SBF
 
BIT_COHESION - Static variable in interface game2dai.steering.SBF
 
BIT_EVADE - Static variable in interface game2dai.steering.SBF
 
BIT_FLEE - Static variable in interface game2dai.steering.SBF
 
BIT_FLOCK - Static variable in interface game2dai.steering.SBF
 
BIT_HIDE - Static variable in interface game2dai.steering.SBF
 
BIT_INTERPOSE - Static variable in interface game2dai.steering.SBF
 
BIT_OBSTACLE_AVOID - Static variable in interface game2dai.steering.SBF
 
BIT_OFFSET_PURSUIT - Static variable in interface game2dai.steering.SBF
 
BIT_PATH - Static variable in interface game2dai.steering.SBF
 
BIT_PURSUIT - Static variable in interface game2dai.steering.SBF
 
BIT_SEEK - Static variable in interface game2dai.steering.SBF
 
BIT_SEPARATION - Static variable in interface game2dai.steering.SBF
 
BIT_WALL_AVOID - Static variable in interface game2dai.steering.SBF
 
BIT_WANDER - Static variable in interface game2dai.steering.SBF
 
BitmapPic - Class in game2dai.entityshapes.ps
A single image or a sprite sheet is used to render the entity.
BitmapPic(PApplet, String) - Constructor for class game2dai.entityshapes.ps.BitmapPic
Single image for all frames
BitmapPic(PApplet, String, int, int) - Constructor for class game2dai.entityshapes.ps.BitmapPic
An animated image.
bodyFill(int) - Method in class game2dai.entityshapes.ps.PersonPic
Sometimes you might only want to change the body colour.
born(World, double) - Method in class game2dai.entities.BaseEntity
This is the only safe way to add an entity to the World object once initialisation has finished and the game/simulation is in play.
box_box(double, double, double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Determine whether two boxes intersect.
box_box_p(double, double, double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
If two boxes overlap then the overlap region is another box.
build(String, Object...) - Static method in class game2dai.utils.Message
 
Building - Class in game2dai.entities
This class is used to represent a building.
Building(Vector2D[]) - Constructor for class game2dai.entities.Building
Create a building with the given contour.
Building(Vector2D, Vector2D[]) - Constructor for class game2dai.entities.Building
Create a building with the given contour.
Building(String, Vector2D, Vector2D[]) - Constructor for class game2dai.entities.Building
Create a building with the given contour.
BuildingPic - Class in game2dai.entityshapes.ps
Simple solid colour picture to represent a building.
BuildingPic(PApplet) - Constructor for class game2dai.entityshapes.ps.BuildingPic
Simple black and white with thin border design.
BuildingPic(PApplet, int, int, float) - Constructor for class game2dai.entityshapes.ps.BuildingPic
Use specified design.
BuildingSAXParser - Class in game2dai.utils
 
BuildingSAXParser(File) - Constructor for class game2dai.utils.BuildingSAXParser
 
BuildingSAXParser(PApplet, String) - Constructor for class game2dai.utils.BuildingSAXParser
 
BuildingSAXParser(String) - Constructor for class game2dai.utils.BuildingSAXParser
 

C

calculateForce(double, World) - Method in class game2dai.steering.AutoPilot
Calculates (according to selected calculation method) the steering forces from any active behaviours.
calculateMethod(int) - Method in class game2dai.steering.AutoPilot
Set which method is to be used for calculating the steering force, options are
calculateMethod() - Method in class game2dai.steering.AutoPilot
Find out which method is being used for calculating the steering force.
cancelBirthsAndDeaths() - Method in class game2dai.World
Cancels outstanding birth and deaths scheduled with birth and death methods.
canSee(World, double, double) - Method in class game2dai.entities.MovingEntity
This method determines whether this entity can see a particular location in the world.
canSee(World, Vector2D) - Method in class game2dai.entities.MovingEntity
This method determines whether this entity can see a particular location in the world.
cbrt(double) - Static method in class game2dai.maths.FastMath
Compute the cubic root of a number.
ceil(double) - Static method in class game2dai.maths.FastMath
Get the smallest whole number larger than x.
centre - Variable in class game2dai.Domain
 
changeState(State) - Method in class game2dai.fsm.FiniteStateMachine
Change the current state of the entity.
characters(char[], int, int) - Method in class game2dai.utils.BuildingSAXParser
 
characters(char[], int, int) - Method in class game2dai.utils.GraphSAXParser
 
characters(char[], int, int) - Method in class game2dai.utils.ObstacleSAXParser
 
characters(char[], int, int) - Method in class game2dai.utils.VehicleSAXParser
 
circle_circle(double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Determine if two circles overlap
circle_circle_p(double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Calculate the intersection points between two circles.
CirclePic - Class in game2dai.entityshapes.ps
A simple circular picture with user defined size and colour.
CirclePic(PApplet) - Constructor for class game2dai.entityshapes.ps.CirclePic
Create a white circle with a thin black border of size 10.
CirclePic(PApplet, float, int, int, float) - Constructor for class game2dai.entityshapes.ps.CirclePic
Create a circle picture
clear() - Method in class game2dai.graph.GraphSearch_BFS
Clears all data related to a search so this object can be reused for another search
CLOCKWISE - Static variable in class game2dai.maths.Vector2D
 
clone() - Method in class game2dai.steering.AutoPilot
Creates and returns an 'available' (auto-pilot object that can be used in another Vehicle) copy of this object.
COHESION - Static variable in interface game2dai.steering.SBF
 
cohesionOff() - Method in class game2dai.steering.AutoPilot
Switch off cohesion
cohesionOn() - Method in class game2dai.steering.AutoPilot
Switch on cohesion
cohesionWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
cohesionWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
colRadius() - Method in class game2dai.entities.BaseEntity
Get the bounding radius for this object.
colRadius(double) - Method in class game2dai.entities.BaseEntity
Set the bounding radius for this object
compact() - Method in class game2dai.graph.Graph
Clear out all remaining floating edges.
compare(BaseEntity, BaseEntity) - Method in class game2dai.entities.BaseEntity.DepthOrder
 
compareTo(BaseEntity) - Method in class game2dai.entities.BaseEntity
Compare 2 entities based on their entity ID numbers
compareTo(Telegram) - Method in class game2dai.fsm.Telegram
Telegrams are consider the same if they are to be despatched within 250ms as defined in SAME_TIME_INTERVAL
compareTo(Object) - Method in class game2dai.graph.GraphEdge
Compare two graph edges.
compareTo(Object) - Method in class game2dai.graph.GraphNode
Compare nodes based on ID number.
contains(Vector2D) - Method in class game2dai.Domain
See if this point is within the domain
contains(Vector2D, double) - Method in class game2dai.Domain
See if this point is within a box scaled by the second parameter.
contains(double, double) - Method in class game2dai.Domain
See if this point is within the domain
contour() - Method in class game2dai.entities.Building
This is needed by any renderer you might want to create.
copySign(double, double) - Static method in class game2dai.maths.FastMath
Returns the first argument with the sign of the second argument.
copySign(float, float) - Static method in class game2dai.maths.FastMath
Returns the first argument with the sign of the second argument.
cos(double) - Static method in class game2dai.maths.FastMath
Cosine function
cosh(double) - Static method in class game2dai.maths.FastMath
Compute the hyperbolic cosine of a number.

D

death(BaseEntity, double) - Method in class game2dai.World
This is the preferred method to remove an entity from the world once the game is in progress i.e.
death(int, double) - Method in class game2dai.World
This is the preferred method to remove an entity from the world once the game is in progress i.e.
DECEL_TWEEK - Static variable in interface game2dai.steering.SBF
 
deleteAllTelegrams() - Method in class game2dai.fsm.Dispatcher
Remove all outstanding telegrams - useful if reseting a game or simulation
DepthOrder() - Constructor for class game2dai.entities.BaseEntity.DepthOrder
 
despatchAt - Variable in class game2dai.fsm.Telegram
 
die(World, double) - Method in class game2dai.entities.BaseEntity
This is the only safe way to remove an entity from the World object.
dispatch(long, int, int, int, Object...) - Static method in class game2dai.fsm.Dispatcher
Dispatch a telegram to another entity with optional delay and any extra information supplied
Dispatcher - Class in game2dai.fsm
This class is responsible for storing and dispatching messages between entities
Dispatcher() - Constructor for class game2dai.fsm.Dispatcher
 
dist(Vector2D, Vector2D) - Static method in class game2dai.maths.Vector2D
The distance between two vectors
distance(GraphNode, GraphNode) - Method in class game2dai.graph.Graph
Gets the world distance between 2 nodes.
distance(int, int) - Method in class game2dai.graph.Graph
Get the distance between two nodes.
distance(double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Calculates the distance between 2 points
distance(Vector2D) - Method in class game2dai.maths.Vector2D
Get the distance between this and an other point.
distance_sq(double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Calculates the squared distance between 2 points
distanceSq(Vector2D) - Method in class game2dai.maths.Vector2D
Get the distance squared between this and another point.
distSq(Vector2D, Vector2D) - Static method in class game2dai.maths.Vector2D
The square of the distance between two vectors
div(double) - Method in class game2dai.maths.Vector2D
Divide the vector by a scalar
div(Vector2D, double) - Static method in class game2dai.maths.Vector2D
Get a new vector that is a vector divided by a scalar
Domain - Class in game2dai
Objects of this class represent a rectangular region of the world.
Domain(double, double, double, double) - Constructor for class game2dai.Domain
Create a Domain object given the top-left and bottom-right coordinates.
Domain(Domain) - Constructor for class game2dai.Domain
Create a Domain that is a copy of another one.
dot(Vector2D) - Method in class game2dai.maths.Vector2D
Calculate the dot product between two un-normalised vectors.
dotNorm(Vector2D) - Method in class game2dai.maths.Vector2D
Calculate the dot product between two vectors using normalised values i.e.
draw(World) - Method in class game2dai.entities.BaseEntity
Deprecated.
draw(double, World) - Method in class game2dai.entities.BaseEntity
DO NOT CALL THIS METHOD DIRECTLY
If this shape has a renderer and is visible call the renderer's draw method passing all appropriate information.
draw(double, World) - Method in class game2dai.entities.MovingEntity
DO NOT CALL THIS METHOD DIRECTLY
If this shape has a renderer and is visible call the renderer's draw method passing all appropriate information.
draw(World) - Method in class game2dai.entities.MovingEntity
Deprecated.
draw(BaseEntity, float, float, float, float, float, float) - Method in class game2dai.entityshapes.Picture
Deprecated.
draw(BaseEntity, float, float, float, float, float, float, float) - Method in class game2dai.entityshapes.Picture
This method must be overridden in all child classes otherwise nothing is drawn.
draw(BaseEntity, float, float, float, float, float, float, float) - Method in class game2dai.entityshapes.ps.ArrowPic
Draw the entity.
draw(BaseEntity, float, float, float, float, float, float, float) - Method in class game2dai.entityshapes.ps.BitmapPic
Draw the entity.
draw(BaseEntity, float, float, float, float, float, float, float) - Method in class game2dai.entityshapes.ps.BuildingPic
Draw the entity.
draw(BaseEntity, float, float, float, float, float, float, float) - Method in class game2dai.entityshapes.ps.CirclePic
Draw the entity.
draw(PApplet, BaseEntity, float, float, float, float) - Static method in class game2dai.entityshapes.ps.Hints
This is the only method available and should be called from the renderer object.
draw(BaseEntity, float, float, float, float, float, float, float) - Method in class game2dai.entityshapes.ps.ObstaclePic
Draw the entity.
draw(BaseEntity, float, float, float, float, float, float, float) - Method in class game2dai.entityshapes.ps.PersonPic
Draw the entity.
draw(BaseEntity, float, float, float, float, float, float, float) - Method in class game2dai.entityshapes.ps.Umbrella
Draw the entity.
draw(BaseEntity, float, float, float, float, float, float, float) - Method in class game2dai.entityshapes.ps.WallPic
Draw the entity.
draw() - Method in class game2dai.World
Deprecated.
draw(double) - Method in class game2dai.World
Any entity that requires to be rendered will have its own render object.

E

E - Static variable in class game2dai.maths.FastMath
Napier's constant e, base of the natural logarithm.
endDocument() - Method in class game2dai.utils.BuildingSAXParser
 
endDocument() - Method in class game2dai.utils.GraphSAXParser
 
endDocument() - Method in class game2dai.utils.ObstacleSAXParser
 
endDocument() - Method in class game2dai.utils.VehicleSAXParser
 
endElement(String, String, String) - Method in class game2dai.utils.BuildingSAXParser
 
endElement(String, String, String) - Method in class game2dai.utils.GraphSAXParser
 
endElement(String, String, String) - Method in class game2dai.utils.ObstacleSAXParser
 
endElement(String, String, String) - Method in class game2dai.utils.VehicleSAXParser
 
enter(BaseEntity) - Method in class game2dai.fsm.State
 
EntitySAXParser - Class in game2dai.utils
 
EntitySAXParser(PApplet, String) - Constructor for class game2dai.utils.EntitySAXParser
Use this version with Processing
EntitySAXParser(String) - Constructor for class game2dai.utils.EntitySAXParser
Use this when not working in Processing.
EntitySAXParser(File) - Constructor for class game2dai.utils.EntitySAXParser
 
EPSILON - Static variable in class game2dai.maths.Vector2D
 
EVADE - Static variable in interface game2dai.steering.SBF
 
evadeDistance() - Method in class game2dai.steering.AutoPilot
Get current distance from the owning entity and the moving entity we want to evade.
evadeFactors(double) - Method in class game2dai.steering.AutoPilot
Set the factors used for evade behaviour.
evadeOff() - Method in class game2dai.steering.AutoPilot
Switch off evade pursuer
evadeOn() - Method in class game2dai.steering.AutoPilot
Switch on evade pursuer
evadeOn(MovingEntity) - Method in class game2dai.steering.AutoPilot
Switch on evade pursuer and specify the entity to avoid.
evadeWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
evadeWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
execute(BaseEntity, double, World) - Method in class game2dai.fsm.State
 
exists(int) - Method in class game2dai.World
Determines whether the entity still exists in this world.
exists(BaseEntity) - Method in class game2dai.World
Determines whether the entity still exists in this world.
exit(BaseEntity) - Method in class game2dai.fsm.State
 
exp(double) - Static method in class game2dai.maths.FastMath
Exponential function.
expandedContour(double) - Method in class game2dai.entities.Building
Get an expanded contour.
expm1(double) - Static method in class game2dai.maths.FastMath
Compute exp(x) - 1
extraInfo - Variable in class game2dai.fsm.Telegram
 

F

FAST - Static variable in interface game2dai.steering.SBF
 
FastMath - Class in game2dai.maths
Faster, more accurate, portable alternative to StrictMath.
fill(int) - Method in class game2dai.entityshapes.ps.BuildingPic
Set the centre colour
FiniteStateMachine - Class in game2dai.fsm
 
FiniteStateMachine(BaseEntity) - Constructor for class game2dai.fsm.FiniteStateMachine
A FSM belongs to an entity (it cannot be shared by other entities)
FiniteStateMachine(BaseEntity, State, State, State) - Constructor for class game2dai.fsm.FiniteStateMachine
 
FLEE - Static variable in interface game2dai.steering.SBF
 
fleeDistance() - Method in class game2dai.steering.AutoPilot
Get current distance from the owning entity to the flee target position.
fleeFactors(double) - Method in class game2dai.steering.AutoPilot
Set the factors used for flee behaviour agent.
fleeOff() - Method in class game2dai.steering.AutoPilot
Switch off flee
fleeOn() - Method in class game2dai.steering.AutoPilot
Switch on flee
fleeOn(Vector2D) - Method in class game2dai.steering.AutoPilot
Switch on flee
fleeOn(double, double) - Method in class game2dai.steering.AutoPilot
Switch on flee
fleeRadius(double) - Method in class game2dai.steering.AutoPilot
The flee force applied will be zero if the entity is outside the flee radius
fleeRadius() - Method in class game2dai.steering.AutoPilot
The effective range of the flee target.
fleeWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
fleeWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
FLOCK - Static variable in interface game2dai.steering.SBF
 
flockFactors(double) - Method in class game2dai.steering.AutoPilot
Sets the radius for ALL the group behaviours (separation, alignment and cohesion) even if you are using them without flocking.
flockOff() - Method in class game2dai.steering.AutoPilot
Switch off flock
flockOn() - Method in class game2dai.steering.AutoPilot
Switch on flock
flockWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
flockWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
floor(double) - Static method in class game2dai.maths.FastMath
Get the largest whole number smaller than x.
Force(int, String) - Constructor for class game2dai.utils.ForceRecorder.Force
 
forceRecorder() - Method in class game2dai.entities.Vehicle
Get the force recorder if this vehicle has one.
ForceRecorder - Class in game2dai.utils
 
ForceRecorder(Vehicle) - Constructor for class game2dai.utils.ForceRecorder
 
ForceRecorder.Force - Class in game2dai.utils
 
forceRecorderOff() - Method in class game2dai.entities.Vehicle
Dump the force recorder on for this Vehicle.
forceRecorderOn() - Method in class game2dai.entities.Vehicle
Enable the force recorder on for this Vehicle.
FORWARD_VECTOR - Static variable in class game2dai.entityshapes.ps.Hints
 
from() - Method in class game2dai.graph.GraphEdge
 
FSM() - Method in class game2dai.entities.BaseEntity
Returns a reference to the entity's finite state machine or null if there is no FSM

G

game2dai - package game2dai
 
game2dai.entities - package game2dai.entities
 
game2dai.entityshapes - package game2dai.entityshapes
 
game2dai.entityshapes.ps - package game2dai.entityshapes.ps
 
game2dai.fsm - package game2dai.fsm
 
game2dai.graph - package game2dai.graph
 
game2dai.maths - package game2dai.maths
 
game2dai.steering - package game2dai.steering
 
game2dai.utils - package game2dai.utils
 
Geometry2D - Class in game2dai.maths
 
Geometry2D() - Constructor for class game2dai.maths.Geometry2D
 
get() - Method in class game2dai.maths.Vector2D
Get a copy (new object) of this vector.
get() - Method in class game2dai.utils.BuildingSAXParser
 
get() - Method in class game2dai.utils.GraphSAXParser
 
get() - Method in class game2dai.utils.ObstacleSAXParser
 
get() - Method in class game2dai.utils.VehicleSAXParser
 
getAverage() - Method in class game2dai.utils.ForceRecorder.Force
 
getBuildings(MovingEntity) - Method in class game2dai.World
For a particular moving entity get all the buildings in the same partition.
getCost(GraphNode, GraphNode) - Method in class game2dai.graph.AshCrowFlight
Estimate the cost between the node and the target.
getCost(GraphNode, GraphNode) - Method in class game2dai.graph.AshManhattan
Estimate the cost between the node and the target.
getCost(GraphNode, GraphNode) - Method in interface game2dai.graph.AstarHeuristic
Estimate the cost between the node and the target.
getCost() - Method in class game2dai.graph.GraphEdge
 
getCurrentState() - Method in class game2dai.fsm.FiniteStateMachine
Get the current state
getDouble(Object) - Static method in class game2dai.maths.MathUtils
 
getEdge(int, int) - Method in class game2dai.graph.Graph
Get the edge between 2 nodes.
getEdgeArray() - Method in class game2dai.graph.Graph
Will return an array of all the GraphEdges in the graph.
getEdgeArray(T[]) - Method in class game2dai.graph.Graph
Will return an array of all the GraphEdges in the graph.
getEdgeArray(int) - Method in class game2dai.graph.Graph
Will return an array of all the GraphEdges that start from the node.
getEdgeArray(int, T[]) - Method in class game2dai.graph.Graph
Will return an array of all the GraphEdges that start from the node.
getEdgeCost(int, int) - Method in class game2dai.graph.Graph
Get the cost of traversing an edge between 2 nodes.
getEdgeList(int) - Method in class game2dai.graph.Graph
Gets a list of GraphEdges leaving (from) this node.
getEdgeList(GraphNode) - Method in class game2dai.graph.Graph
Gets a list of GraphEdges leaving (from) this node.
getElapsedTime() - Method in class game2dai.utils.StopWatch
Get the elapsed time since this method was called.
getEndPos() - Method in class game2dai.entities.Wall
Get the world end position
getEntity(int) - Method in class game2dai.World
Get the entity associated with a particular ID number.
getExaminedEdges() - Method in class game2dai.graph.GraphSearch_Astar
Get all the edges examined during the search.
getExaminedEdges(T[]) - Method in class game2dai.graph.GraphSearch_Astar
Get all the edges examined during the search.
getExaminedEdges() - Method in class game2dai.graph.GraphSearch_BFS
Get all the edges examined during the search.
getExaminedEdges(T[]) - Method in class game2dai.graph.GraphSearch_BFS
Get all the edges examined during the search.
getExaminedEdges() - Method in class game2dai.graph.GraphSearch_DFS
Get all the edges examined during the search.
getExaminedEdges(T[]) - Method in class game2dai.graph.GraphSearch_DFS
Get all the edges examined during the search.
getExaminedEdges() - Method in class game2dai.graph.GraphSearch_Dijkstra
Get all the edges examined during the search.
getExaminedEdges(T[]) - Method in class game2dai.graph.GraphSearch_Dijkstra
Get all the edges examined during the search.
getExaminedEdges() - Method in interface game2dai.graph.IGraphSearch
Get all the edges examined during the search.
getExaminedEdges(T[]) - Method in interface game2dai.graph.IGraphSearch
Get all the edges examined during the search.
getExponent(double) - Static method in class game2dai.maths.FastMath
Return the exponent of a double number, removing the bias.
getExponent(float) - Static method in class game2dai.maths.FastMath
Return the exponent of a float number, removing the bias.
getExtent() - Method in class game2dai.entities.Artefact
Get the rectangle that encompasses this artefact in world coordinates.
getExtent() - Method in class game2dai.entities.Building
Get the rectangle that encompasses the building in world coordinates.
getFeelers() - Method in class game2dai.steering.AutoPilot
FOR INTERNAL USE ONLY
Calculates and returns an array of feelers around the vehicle that owns this steering behaviour.
getFeelers(MovingEntity) - Method in class game2dai.steering.AutoPilot
Calculates and returns an array of feelers arround the specified moving entity using the whisker details in this steering behaviour.
getFeelers(Vector2D, Vector2D) - Method in class game2dai.steering.AutoPilot
Calculates and returns an array of feelers around the vehicle that owns this steering behaviour using the specified heading and origin.
getFloat(Object) - Static method in class game2dai.maths.MathUtils
 
getGlobalState() - Method in class game2dai.fsm.FiniteStateMachine
Get the global state
getHints() - Method in class game2dai.entityshapes.Picture
Get the hints being currently used.
getImage(PApplet, String) - Static method in class game2dai.entityshapes.ps.ImageBank
Load a bitmap file and return a reference to an array (size will be 1) with the image as the sole frame.
getImage(PApplet, String, int, int) - Static method in class game2dai.entityshapes.ps.ImageBank
Load a bitmap file and create an array of PImages to represent a sequence of frames to flip through when drawing.
getInteger(Object) - Static method in class game2dai.maths.MathUtils
 
getMovers(MovingEntity) - Method in class game2dai.World
For a particular moving entity get all the moving entities in the same partition.
getMovers(MovingEntity, double) - Method in class game2dai.World
Get a list of moving entities in partitions within a given range of a moving entity.
getNameOfCurrentState() - Method in class game2dai.fsm.FiniteStateMachine
 
getNbrEdges() - Method in class game2dai.graph.Graph
 
getNbrNodes() - Method in class game2dai.graph.Graph
get the number of nodes in the graph
getNode(int) - Method in class game2dai.graph.Graph
Get a node with a given id.
getNodeArray() - Method in class game2dai.graph.Graph
Will return an array of all the GraphNodes in the graph.
getNodeArray(T[]) - Method in class game2dai.graph.Graph
Will return an array of all the GraphNodes in the graph.
getNodeNear(double, double, double, double) - Method in class game2dai.graph.Graph
Locate and return the first node encountered that is within a stated distance of a position at [x,y,z]
getNodeNear(double, double, double) - Method in class game2dai.graph.Graph
Locate and return the first node encountered that is within a stated distance of a position at [x,y,0]
getNodeNearest(GraphNode) - Method in class game2dai.graph.Graph
Find the node nearest the node specified based on Euclidean distance between them.
getNodeNearest(int) - Method in class game2dai.graph.Graph
Find the node nearest the node with the specified ID number based on Euclidean distance between them.
getNodeNearest(double, double, double) - Method in class game2dai.graph.Graph
Locate and return the node nearest a given position irrespective of the distance apart.
getNodeNearest(double, double) - Method in class game2dai.graph.Graph
Locate and return the node nearest a given position irrespective of the distance apart in the x/y plane (ignores z).
getObstacles(MovingEntity) - Method in class game2dai.World
Get a list of obstacles that need to be tested for obstacle avoidance.
getObstacles(double, double) - Method in class game2dai.World
 
getObstacles(MovingEntity, double, double) - Method in class game2dai.World
Get a list of obstacles that are in the box made by the moving entity's position and the position px,py
getPerp() - Method in class game2dai.maths.Vector2D
Get a vector perpendicular to this one.
getPreviousState() - Method in class game2dai.fsm.FiniteStateMachine
 
getReflect(Vector2D) - Method in class game2dai.maths.Vector2D
Return the reflection vector about the norm
getReverse() - Method in class game2dai.maths.Vector2D
Get a vector that is the reverse of this vector
getRoute() - Method in class game2dai.graph.GraphSearch_Astar
Get the path found as an array of GraphNode(s) in start->end order
getRoute(T[]) - Method in class game2dai.graph.GraphSearch_Astar
Get the path found as an array of T(s) in start->end order.
getRoute() - Method in class game2dai.graph.GraphSearch_BFS
Get the path found as an array of GraphNode(s) in start->end order
getRoute(T[]) - Method in class game2dai.graph.GraphSearch_BFS
Get the path found as an array of T(s) in start->end order.
getRoute() - Method in class game2dai.graph.GraphSearch_DFS
Get the path found as an array of GraphNode(s) in start->end order
getRoute(T[]) - Method in class game2dai.graph.GraphSearch_DFS
Get the path found as an array of T(s) in start->end order.
getRoute() - Method in class game2dai.graph.GraphSearch_Dijkstra
Get the path found as an array of GraphNode(s) in start->end order
getRoute(T[]) - Method in class game2dai.graph.GraphSearch_Dijkstra
Get the path found as an array of T(s) in start->end order.
getRoute() - Method in interface game2dai.graph.IGraphSearch
Get the path found as an array of GraphNode(s) in start->end order
getRoute(T[]) - Method in interface game2dai.graph.IGraphSearch
Get the path found as an array of T(s) in start->end order.
getRunTime() - Method in class game2dai.utils.StopWatch
Get the time since the stop watch was created or last reset.
getStartPos() - Method in class game2dai.entities.Wall
Get the wall start position
getStdDev() - Method in class game2dai.utils.ForceRecorder.Force
 
getWalls(MovingEntity) - Method in class game2dai.World
Get a list of walls that need to be tested for wall avoidance.
getWalls(MovingEntity, double, double) - Method in class game2dai.World
Get a list of walls that are in the box made by the moving entity's position and the position px,py
getWeight(int) - Method in class game2dai.steering.AutoPilot
Get the weighting for a single behaviour.
Graph - Class in game2dai.graph
Objects of this class represents graphs that can be used in games.
Graph() - Constructor for class game2dai.graph.Graph
Create a graph with an initial capacity of 16 nodes.
Graph(int) - Constructor for class game2dai.graph.Graph
Create a graph with an initial capacity based on an estimate of the number of nodes to be added.
GraphEdge - Class in game2dai.graph
This class is used to represent a directed edge between 2 nodes and the cost of traversing this edge.
GraphEdge(GraphNode, GraphNode) - Constructor for class game2dai.graph.GraphEdge
Create an edge of cost 1.0f
GraphEdge(GraphEdge) - Constructor for class game2dai.graph.GraphEdge
Copy constructor.
GraphEdge(GraphNode, GraphNode, double) - Constructor for class game2dai.graph.GraphEdge
Create an edge from 2 existing nodes.
GraphNode - Class in game2dai.graph
This class represents a node (vertex) that can be used with the Graph class.
GraphNode(int) - Constructor for class game2dai.graph.GraphNode
Create a node with a given ID
GraphNode(int, double, double, double) - Constructor for class game2dai.graph.GraphNode
Create a node
GraphNode(int, double, double) - Constructor for class game2dai.graph.GraphNode
Create a node
GraphNode(GraphNode) - Constructor for class game2dai.graph.GraphNode
Copy constructor.
GraphSAXParser - Class in game2dai.utils
 
GraphSAXParser(File) - Constructor for class game2dai.utils.GraphSAXParser
 
GraphSAXParser(PApplet, String) - Constructor for class game2dai.utils.GraphSAXParser
 
GraphSAXParser(String) - Constructor for class game2dai.utils.GraphSAXParser
 
GraphSearch_Astar - Class in game2dai.graph
 
GraphSearch_Astar(Graph) - Constructor for class game2dai.graph.GraphSearch_Astar
Create a search object that uses the A* algorithm for the given graph.
GraphSearch_Astar(Graph, AstarHeuristic) - Constructor for class game2dai.graph.GraphSearch_Astar
Create a search object that uses the A* algorithm for the given graph using the given heuristic.
GraphSearch_BFS - Class in game2dai.graph
Breadth First Search
GraphSearch_BFS(Graph) - Constructor for class game2dai.graph.GraphSearch_BFS
Create a search object that uses breadth first search algorithm for the given graph.
GraphSearch_DFS - Class in game2dai.graph
 
GraphSearch_DFS(Graph) - Constructor for class game2dai.graph.GraphSearch_DFS
Create a search object that uses depth first search algorithm for the given graph.
GraphSearch_Dijkstra - Class in game2dai.graph
 
GraphSearch_Dijkstra(Graph) - Constructor for class game2dai.graph.GraphSearch_Dijkstra
Create a search object that uses Dijkstra's algorithm for the given graph.

H

HALF_PI - Static variable in class game2dai.maths.FastMath
 
hasData() - Method in class game2dai.utils.ForceRecorder.Force
 
hasData() - Method in class game2dai.utils.ForceRecorder
 
hasEdge(int, int) - Method in class game2dai.graph.Graph
Sees whether the graph has this edge
hasForceRecorder() - Method in class game2dai.entities.Vehicle
See if this vehicle has a force recorder.
hasFSM() - Method in class game2dai.entities.BaseEntity
Does this entity have a finite state machine
hasNode(int) - Method in class game2dai.graph.Graph
Does a node with a given id exist?
hasOwner() - Method in class game2dai.steering.AutoPilot
Used to see if this auto-pilot has an owner.
heading(Vector2D) - Method in class game2dai.entities.MovingEntity
Sets the direction the entity is facing.
heading(double, double) - Method in class game2dai.entities.MovingEntity
/** Sets the direction the entity is facing.
heading() - Method in class game2dai.entities.MovingEntity
Get the current heading for this entity
headingAtRest() - Method in class game2dai.entities.MovingEntity
get the default heading for this entity.
headingAtRest(Vector2D) - Method in class game2dai.entities.MovingEntity
Set the default heading for this entity.
height - Variable in class game2dai.Domain
 
HIDE - Static variable in interface game2dai.steering.SBF
 
hideDistance() - Method in class game2dai.steering.AutoPilot
Get current distance from the owning entity and the moving entity we want are hiding from.
hideOff() - Method in class game2dai.steering.AutoPilot
Switch off hide
hideOn() - Method in class game2dai.steering.AutoPilot
Switch on hide
hideOn(MovingEntity) - Method in class game2dai.steering.AutoPilot
 
hideWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
hideWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
highX - Variable in class game2dai.Domain
 
highY - Variable in class game2dai.Domain
 
HINT_ALL - Static variable in class game2dai.entityshapes.ps.Hints
 
HINT_COLLISION - Static variable in class game2dai.entityshapes.ps.Hints
 
HINT_HEADING - Static variable in class game2dai.entityshapes.ps.Hints
 
HINT_NONE - Static variable in class game2dai.entityshapes.ps.Hints
 
HINT_OBS_AVOID - Static variable in class game2dai.entityshapes.ps.Hints
 
HINT_VELOCITY - Static variable in class game2dai.entityshapes.ps.Hints
 
HINT_VIEW - Static variable in class game2dai.entityshapes.ps.Hints
 
HINT_WANDER - Static variable in class game2dai.entityshapes.ps.Hints
 
HINT_WHISKERS - Static variable in class game2dai.entityshapes.ps.Hints
 
hintFlags - Static variable in class game2dai.entityshapes.ps.Hints
 
Hints - Class in game2dai.entityshapes.ps
Draw the steering behaviour hints for a particular entity (usually either MovingEntity or Vehicle entity).
Hints() - Constructor for class game2dai.entityshapes.ps.Hints
 
hypot(double, double) - Static method in class game2dai.maths.FastMath
Returns the hypotenuse of a triangle with sides x and y - sqrt(x2 +y2)
avoiding intermediate overflow or underflow.

I

ID() - Method in class game2dai.entities.BaseEntity
Get the entity's unique ID number
id() - Method in class game2dai.graph.GraphNode
Get the node ID
id(int) - Method in class game2dai.graph.GraphNode
Change the node id.
identity() - Method in class game2dai.maths.Matrix2D
Initialise the matrix to the identity matrix.
IEEEremainder(double, double) - Static method in class game2dai.maths.FastMath
Computes the remainder as prescribed by the IEEE 754 standard.
IGraphSearch - Interface in game2dai.graph
Any class that can be used to search the graph should implement this class.
ImageBank - Class in game2dai.entityshapes.ps
Utility class to load and tile images.
ImageBank() - Constructor for class game2dai.entityshapes.ps.ImageBank
 
INTERPOSE - Static variable in interface game2dai.steering.SBF
 
interposeOff() - Method in class game2dai.steering.AutoPilot
Switch off interpose
interposeOn() - Method in class game2dai.steering.AutoPilot
Switch on interpose
interposeOn(MovingEntity, MovingEntity) - Method in class game2dai.steering.AutoPilot
Switch on interpose and specify the two moving entities to get between.
interposeOn(MovingEntity, Vector2D) - Method in class game2dai.steering.AutoPilot
Switch on interpose and specify a moving entity and a fixed point in the world to get between.
interposeOn(Vector2D, Vector2D) - Method in class game2dai.steering.AutoPilot
Switch on interpose and specify two fixed points in the world to get between.
interposeWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
interposeWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
is_point_near_infinite_line(Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Geometry2D
See if point is near the infinite line.
is_point_near_infinite_line(Vector2D, Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Geometry2D
See if point is near the infinite line.
is_point_near_line(Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Geometry2D
See if point is near the finite line.
is_point_near_line(Vector2D, Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Geometry2D
See if point is near the finite line.
isAlignmentOn() - Method in class game2dai.steering.AutoPilot
Is alignment switched on?
isArriveOn() - Method in class game2dai.steering.AutoPilot
Is arrive switched on?
isCohesionOn() - Method in class game2dai.steering.AutoPilot
Is cohesion switched on?
isCspOn() - Method in class game2dai.World
 
isCurrentState(State) - Method in class game2dai.fsm.FiniteStateMachine
Sees if the current state is of the same type (class) as the parameter.
isEitherSide(double, double, double, double) - Method in class game2dai.entities.BaseEntity
Determines whether the two points given are 'either side of the object' if true then the two positions are not visible to each other.
isEitherSide(Vector2D, Vector2D) - Method in class game2dai.entities.BaseEntity
Determines whether the two points given are 'either side of the object' if true then the two positions are not visible to each other.
isEitherSide(double, double, double, double) - Method in class game2dai.entities.Building
Determines whether two world points are either side of a building.
isEitherSide(double, double, double, double) - Method in class game2dai.entities.MovingEntity
Determines whether two points are either side of this moving entity.
isEitherSide(double, double, double, double) - Method in class game2dai.entities.Obstacle
Determines whether two points are either side of this obstacle.
isEitherSide(double, double, double, double) - Method in class game2dai.entities.Wall
Determines whether the two points given are 'either side of the object' if true then the two positions are not visible to each other.
isEqual(double, double) - Static method in class game2dai.maths.MathUtils
 
isEqual(double, double, double) - Static method in class game2dai.maths.MathUtils
 
isEvadeOn() - Method in class game2dai.steering.AutoPilot
Is evade switched on?
isFleeOn() - Method in class game2dai.steering.AutoPilot
Is seek switched on?
isFlockOn() - Method in class game2dai.steering.AutoPilot
Is flock switched on?
isGlobalState(State) - Method in class game2dai.fsm.FiniteStateMachine
Sees if the global state is of the same type (class) as the parameter.
isHideOn() - Method in class game2dai.steering.AutoPilot
Is hide switched on?
isInDomain(Domain) - Method in class game2dai.entities.Artefact
Determine whether this artefact is inside or part inside the domain.
isInDomain(Domain) - Method in class game2dai.entities.BaseEntity
Determine whether this entity is inside or part inside the domain.
isInDomain(Domain) - Method in class game2dai.entities.Building
Determine whether this building is inside or part inside the domain.
isInDomain(Domain) - Method in class game2dai.entities.MovingEntity
Determine whether this moving entity is inside or part inside the domain.
isInDomain(Domain) - Method in class game2dai.entities.Obstacle
Determine whether this obstacle is inside or part inside the domain.
isInDomain(Domain) - Method in class game2dai.entities.Wall
Determine whether this entity is inside or part inside the domain.
isInsidePolygon(Vector2D[], double, double) - Static method in class game2dai.maths.Geometry2D
See if the given point is inside a polygon defined by the vertices provided.
isInsideRectangle_xywh(double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
See if a point is inside the rectangle defined by top-left and bottom right coordinates
isInsideRectangle_xywh(Vector2D, double, double, Vector2D) - Static method in class game2dai.maths.Geometry2D
See if this a is inside the rectangle defined by top-left and bottom right coordinates
isInsideRectangle_xyxy(double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
See if a point is inside the rectangle defined by top-left and bottom right coordinates
isInsideRectangle_xyxy(Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Geometry2D
See if this a is inside the rectangle defined by top-left and bottom right coordinates
isInsideTriangle(double, double, double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Determine if the point pX/pY is inside triangle defined by triangle ABC whose vertices are given by [ax,ay] [bx,by] [cx,cy]
isInsideTriangle(Vector2D, Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Geometry2D
Determine if the point (p) is inside triangle defined by triangle ABC
isInsideTriangle(Vector2D, Vector2D, Vector2D, double, double) - Static method in class game2dai.maths.Geometry2D
Determine if the point pX/pY is inside triangle defined by triangle ABC
isInsideTriangle(double, double, double, double, double, double, double, double) - Static method in class game2dai.maths.Triangulator
Determine if the point pX/pY is inside triangle defined by triangle ABC whose vertices are given by [ax,ay] [bx,by] [cx,cy]
isInsideTriangle(Vector2D, Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Triangulator
Determine if the point (p) is inside triangle defined by triangle ABC
isInsideTriangle(Vector2D, Vector2D, Vector2D, double, double) - Static method in class game2dai.maths.Triangulator
Determine if the point (p) is inside triangle defined by triangle ABC
isInterposeOn() - Method in class game2dai.steering.AutoPilot
Is interpose switched on?
isNoOverlapOn() - Method in class game2dai.World
 
isObstacleAvoidOn() - Method in class game2dai.steering.AutoPilot
Is wall avoidance switched on?
isOffsetPursuitOn() - Method in class game2dai.steering.AutoPilot
Is offsetPursuit switched on?
isOver(double, double) - Method in class game2dai.entities.BaseEntity
Determine whether the given world position is over a given entity.
isOver(double, double) - Method in class game2dai.entities.Building
Determines whether a world point is inside the building or not
isOver(double, double) - Method in class game2dai.entities.MovingEntity
Determines whether a point is over this entity's collision circle
isOver(double, double) - Method in class game2dai.entities.Obstacle
Determine whether the given world position is over this obstacle.
isOver(double, double) - Method in class game2dai.entities.Wall
Since the wall is considered to have no thickness then the world point cannot be over the wall.
isOverLapAllowed() - Method in class game2dai.entities.BaseEntity
Should this entity be considered if the world is enforcing the no-overlap rule.
isPathOn() - Method in class game2dai.steering.AutoPilot
Is path switched on?
isPreviousState(State) - Method in class game2dai.fsm.FiniteStateMachine
Sees if the previous state is of the same type (class) as the parameter.
isPursuitOn() - Method in class game2dai.steering.AutoPilot
Is pursuit switched on?
isSecondInFOVofFirstXXX(Vector2D, Vector2D, double, Vector2D) - Static method in class game2dai.maths.Vector2D
Determines whether entity 2 is visible from entity 1.
isSeekOn() - Method in class game2dai.steering.AutoPilot
Is seek switched on?
isSeparationOn() - Method in class game2dai.steering.AutoPilot
Is separation switched on?
isSpeedMaxedOut() - Method in class game2dai.entities.MovingEntity
See if the current speed exceeds the maximum speed permitted.
isUsingState(State) - Method in class game2dai.fsm.FiniteStateMachine
Use this method if using the singleton objects for each state.
isVisible() - Method in class game2dai.entities.BaseEntity
Is this entity visible
isWallAvoidOn() - Method in class game2dai.steering.AutoPilot
Is wall avoidance switched on?
isWallAvoidOvalEnvelopeOn() - Method in class game2dai.steering.AutoPilot
If on then the side whiskers are smaller than the front whiskers.
isWanderOn() - Method in class game2dai.steering.AutoPilot
Is wander switched on?

L

length() - Method in class game2dai.maths.Vector2D
Get the vector length
lengthSq() - Method in class game2dai.maths.Vector2D
Get the vector length squared
line_box_xywh(double, double, double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Determine whether a line intersects with a box.
line_box_xyxy(double, double, double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Determine whether a line intersects with a box.
line_circle(double, double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Sees if a line intersects with the circumference of a circle.
line_circle_p(double, double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Calculate the points of intersection between a line and a circle.
line_line(double, double, double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
See if two lines intersect
line_line_infinite_p(Vector2D, Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Geometry2D
Find the intersection point between two infinite lines that pass through the points (v0,v1) and (v2,v3)
line_line_infinite_p(double, double, double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Find the point of intersection between two infinite lines that pass through the points ([x0,y0],[x1,y1]) and ([x2,y2],[x3,y3]).
line_line_p(Vector2D, Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Geometry2D
Find the point of intersection between two lines.
line_line_p(double, double, double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Find the point of intersection between two lines.
line_lines_p(double, double, double, double, double[], boolean) - Static method in class game2dai.maths.Geometry2D
Calculate the intersection points between a line and a collection of lines.
log(double) - Static method in class game2dai.maths.FastMath
Natural logarithm.
log10(double) - Static method in class game2dai.maths.FastMath
Compute the base 10 logarithm.
log1p(double) - Static method in class game2dai.maths.FastMath
Compute log(1 + x).
lowX - Variable in class game2dai.Domain
 
lowY - Variable in class game2dai.Domain
 

M

makeFromXML(PApplet, String) - Static method in class game2dai.entities.Building
This is the one to use with Processing
makeFromXML(String) - Static method in class game2dai.entities.Building
Alternative if not using Processing
makeFromXML(File) - Static method in class game2dai.entities.Building
Alternative if not using Processing
makeFromXML(PApplet, String) - Static method in class game2dai.entities.Obstacle
This is the one to use with Processing
makeFromXML(String) - Static method in class game2dai.entities.Obstacle
Alternative if not using Processing
makeFromXML(File) - Static method in class game2dai.entities.Obstacle
Alternative if not using Processing
makeFromXML(PApplet, String) - Static method in class game2dai.entities.Vehicle
This is the one to use with Processing
makeFromXML(String) - Static method in class game2dai.entities.Vehicle
Alternative if not using Processing
makeFromXML(File) - Static method in class game2dai.entities.Vehicle
Alternative if not using Processing
makeFromXML(PApplet, String) - Static method in class game2dai.graph.Graph
 
makeFromXML(String) - Static method in class game2dai.graph.Graph
 
makeFromXML(File) - Static method in class game2dai.graph.Graph
 
mass(double) - Method in class game2dai.entities.MovingEntity
Change the mass of the entity.
mass() - Method in class game2dai.entities.MovingEntity
Get the mass of this entity.
MathUtils - Class in game2dai.maths
 
MathUtils() - Constructor for class game2dai.maths.MathUtils
 
Matrix2D - Class in game2dai.maths
Class to represent a 2D matrix that can be used to create transformed Vector2D objects.
Matrix2D() - Constructor for class game2dai.maths.Matrix2D
 
matrixMultiply(Matrix2D.Matrix) - Method in class game2dai.maths.Matrix2D
Multiply this matrix by another
max(int, int) - Static method in class game2dai.maths.FastMath
Compute the maximum of two values
max(long, long) - Static method in class game2dai.maths.FastMath
Compute the maximum of two values
max(float, float) - Static method in class game2dai.maths.FastMath
Compute the maximum of two values
max(double, double) - Static method in class game2dai.maths.FastMath
Compute the maximum of two values
maxForce() - Method in class game2dai.entities.MovingEntity
Gets the maximum force that can be applied to this entity.
maxForce(double) - Method in class game2dai.entities.MovingEntity
Sets the maximum force that can be applied to this entity.
maxForce() - Method in class game2dai.entities.Vehicle
Get the maximum force that can be applied to this entity
maxSpeed() - Method in class game2dai.entities.MovingEntity
Get the maximum speed allowed for this entity.
maxSpeed(double) - Method in class game2dai.entities.MovingEntity
Sets the maximum speed this entity is allowed to reach
maxTurnRate() - Method in class game2dai.entities.MovingEntity
Get the maximum turn rate for this entity
maxTurnRate(double) - Method in class game2dai.entities.MovingEntity
Sets the maximum turnrate for this entity.
Message - Class in game2dai.utils
 
Message() - Constructor for class game2dai.utils.Message
 
min(int, int) - Static method in class game2dai.maths.FastMath
Compute the minimum of two values
min(long, long) - Static method in class game2dai.maths.FastMath
Compute the minimum of two values
min(float, float) - Static method in class game2dai.maths.FastMath
Compute the minimum of two values
min(double, double) - Static method in class game2dai.maths.FastMath
Compute the minimum of two values
MINUS_I - Static variable in class game2dai.maths.Vector2D
Opposite of the first canonical vector (coordinates: -1, 0).
MINUS_J - Static variable in class game2dai.maths.Vector2D
Opposite of the second canonical vector (coordinates: 0, -1).
move_centre_x_by(double) - Method in class game2dai.Domain
Move the domain centre horizontally by the world distance given.
move_centre_x_to(double) - Method in class game2dai.Domain
Centre the domain about the given horizontal position.
move_centre_xy_by(double, double) - Method in class game2dai.Domain
Centre the domain about the given position.
move_centre_xy_to(double, double) - Method in class game2dai.Domain
Centre the domain about the given world position.
move_centre_y_by(double) - Method in class game2dai.Domain
Move the domain centre vertically by the world distance given.
move_centre_y_to(double) - Method in class game2dai.Domain
Centre the domain about the given vertical position.
moveBy(double, double) - Method in class game2dai.entities.BaseEntity
Move the current position for this entity by the specified amount.
moveBy(Vector2D) - Method in class game2dai.entities.BaseEntity
Move the current position for this entity by the specified amount.
moveTo(double, double) - Method in class game2dai.entities.BaseEntity
Set the current position for this entity.
moveTo(Vector2D) - Method in class game2dai.entities.BaseEntity
Set the current position for this entity.
moveToWorldX(double) - Method in class game2dai.World
Move the world view so it is centred about the given world position.
moveToWorldXY(double, double) - Method in class game2dai.World
Move the world view so it is centred about the given world position.
moveToWorldY(double) - Method in class game2dai.World
Move the world view so it is centred about the given world position.
MovingEntity - Class in game2dai.entities
This class that models the behaviour of a moving entity that is not acting under the influence of a steering behaviour.
MovingEntity(Vector2D, double, Vector2D, double, Vector2D, double, double, double) - Constructor for class game2dai.entities.MovingEntity
This is the constructor that should be used when creating an unnamed MovingEntity
MovingEntity(String, Vector2D, double, Vector2D, double, Vector2D, double, double, double) - Constructor for class game2dai.entities.MovingEntity
This is the constructor that should be used when creating a named MovingEntity
msg - Variable in class game2dai.fsm.Telegram
 
mult(double) - Method in class game2dai.maths.Vector2D
Multiply the vector by a scalar
mult(Vector2D, double) - Static method in class game2dai.maths.Vector2D
Get a new vector that is the product of a vector and a scalar

N

name(String) - Method in class game2dai.entities.BaseEntity
Change the name of this entity
name() - Method in class game2dai.entities.BaseEntity
Get the current name of the entity.
name - Variable in class game2dai.fsm.State
 
NaN - Static variable in class game2dai.maths.Vector2D
A vector with all coordinates set to NaN.
NBR_AGENT_ARRAY - Static variable in interface game2dai.steering.SBF
 
nbr_artefacts - Variable in class game2dai.World
Number of artefacts in this world
nbr_buildings - Variable in class game2dai.World
Number of buildings in this world
nbr_movers - Variable in class game2dai.World
Number of moving entities in this world
nbr_obstacles - Variable in class game2dai.World
Number of obstacles in this world
nbr_walls - Variable in class game2dai.World
Number of walls in this world
NEGATIVE_INFINITY - Static variable in class game2dai.maths.Vector2D
A vector with all coordinates set to negative infinity.
nextAfter(double, double) - Static method in class game2dai.maths.FastMath
Get the next machine representable number after a number, moving in the direction of another number.
nextAfter(float, double) - Static method in class game2dai.maths.FastMath
Get the next machine representable number after a number, moving in the direction of another number.
nextUp(double) - Static method in class game2dai.maths.FastMath
Compute next number towards positive infinity.
nextUp(float) - Static method in class game2dai.maths.FastMath
Compute next number towards positive infinity.
noOverlap(boolean) - Method in class game2dai.World
 
norm() - Method in class game2dai.entities.Wall
Get the wall normal - it will point 'outside'
NORMAL - Static variable in interface game2dai.steering.SBF
 
normalize() - Method in class game2dai.maths.Vector2D
Normalise this vector
normalize(Vector2D) - Static method in class game2dai.maths.Vector2D
Get a new vector that is the given vector normalised

O

Obstacle - Class in game2dai.entities
This class represents a circular obstacle.
Obstacle(String, Vector2D, double) - Constructor for class game2dai.entities.Obstacle
Create an obstacle with a name
Obstacle(Vector2D, double) - Constructor for class game2dai.entities.Obstacle
Create an obstacle without a name
OBSTACLE_AVOID - Static variable in interface game2dai.steering.SBF
 
obstacleAvoidDetectBoxLength() - Method in class game2dai.steering.AutoPilot
Only provided to enable drawing the box during testing.
obstacleAvoidDetectBoxLength(double) - Method in class game2dai.steering.AutoPilot
Set the obstacle avoidance detection box length.
obstacleAvoidFactors(double) - Method in class game2dai.steering.AutoPilot
Set the factors used for obstacle avoidance.
obstacleAvoidOff() - Method in class game2dai.steering.AutoPilot
Switch off obstacle avoidance
obstacleAvoidOn() - Method in class game2dai.steering.AutoPilot
Switch on obstacle avoidance
obstacleAvoidWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
obstacleAvoidWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
ObstaclePic - Class in game2dai.entityshapes.ps
A simple circle for a round obstacle.
ObstaclePic(PApplet) - Constructor for class game2dai.entityshapes.ps.ObstaclePic
A simple white circle with thin black border.
ObstaclePic(PApplet, int, int, float) - Constructor for class game2dai.entityshapes.ps.ObstaclePic
Picture with user defined colours
ObstacleSAXParser - Class in game2dai.utils
 
ObstacleSAXParser(File) - Constructor for class game2dai.utils.ObstacleSAXParser
 
ObstacleSAXParser(PApplet, String) - Constructor for class game2dai.utils.ObstacleSAXParser
 
ObstacleSAXParser(String) - Constructor for class game2dai.utils.ObstacleSAXParser
 
OFFSET_PURSUIT - Static variable in interface game2dai.steering.SBF
 
offsetPursuitOff() - Method in class game2dai.steering.AutoPilot
Switch off offsetPursuit
offsetPursuitOn() - Method in class game2dai.steering.AutoPilot
Switch on offsetPursuit
offsetPursuitOn(MovingEntity, Vector2D) - Method in class game2dai.steering.AutoPilot
Set the target enitiy for offsetPursuit and the offset.
offsetPursuitWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
offsetPursuitWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
ON_PLANE - Static variable in class game2dai.maths.Geometry2D
 
ONE - Static variable in class game2dai.maths.Vector2D
Null vector (coordinates: 1, 1).
onMessage(Telegram) - Method in class game2dai.fsm.FiniteStateMachine
This method is called when a telegram for the owning entity is received.
onMessage(BaseEntity, Telegram) - Method in class game2dai.fsm.State
 
overLapAllowed(boolean) - Method in class game2dai.entities.BaseEntity
Set whether the entity should be considered when (and if) the world is enforcing the no overLap rule.

P

panPixelX(int) - Method in class game2dai.World
Pan the world display by the given number of pixels.
panPixelXY(int, int) - Method in class game2dai.World
Pan the world display by the given number of pixels.
panPixelY(int) - Method in class game2dai.World
Pan the world display by the given number of pixels.
panWorldX(double) - Method in class game2dai.World
Pan the world display by the given world distance.
panWorldXY(double, double) - Method in class game2dai.World
Pan the world display by the given world distance.
panWorldY(double) - Method in class game2dai.World
Pan the world display by the given world distance.
PASS_THROUGH - Static variable in interface game2dai.steering.SBF
 
PATH - Static variable in interface game2dai.steering.SBF
 
pathAddToRoute(Vector2D[]) - Method in class game2dai.steering.AutoPilot
Add the route to the end of the existing path and switch path following on.
pathAddToRoute(Vector2D) - Method in class game2dai.steering.AutoPilot
Add the waypoint to the end of the existing path and switch path following on.
pathAddToRoute(List<GraphNode>) - Method in class game2dai.steering.AutoPilot
Add the route to the end of the existing path.
pathAddToRoute(Graph, GraphNode) - Method in class game2dai.steering.AutoPilot
Calculate and add the route from the end of the existing path (or the nearest node if there is no existing path) to the dest Node.
pathFactors(Object, Object) - Method in class game2dai.steering.AutoPilot
 
pathNextNode() - Method in class game2dai.steering.AutoPilot
Get the node the entity is currently moving towards.
pathOff() - Method in class game2dai.steering.AutoPilot
Switch off path
pathOn() - Method in class game2dai.steering.AutoPilot
Switch on path
pathRoute() - Method in class game2dai.steering.AutoPilot
Get the path the entity is following
pathRouteLength() - Method in class game2dai.steering.AutoPilot
Get the number of way-points left on the current route
pathSetRoute(Vector2D[]) - Method in class game2dai.steering.AutoPilot
Set the path the entity should follow.
pathSetRoute(List<GraphNode>) - Method in class game2dai.steering.AutoPilot
Set the path the entity should follow.
pathWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
pathWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
pauseAnimation() - Method in class game2dai.entityshapes.ps.BitmapPic
 
PersonPic - Class in game2dai.entityshapes.ps
A simple representation of a person viewed from above.
PersonPic(PApplet) - Constructor for class game2dai.entityshapes.ps.PersonPic
Create a person of size 10 with a white body, grey head and thin black border.
PersonPic(PApplet, float) - Constructor for class game2dai.entityshapes.ps.PersonPic
Create a person of size 10 with a white body, grey head and thin black border.
PersonPic(PApplet, float, int, int, int, float) - Constructor for class game2dai.entityshapes.ps.PersonPic
Create a person of user defined size and colours.
PI - Static variable in class game2dai.maths.FastMath
Archimede's constant PI, ratio of circle circumference to diameter.
Picture - Class in game2dai.entityshapes
Any class to be used to render an entity on the screen should inherit from this class.
Picture() - Constructor for class game2dai.entityshapes.Picture
This constructor is provided when not using Processing.
PicturePS - Class in game2dai.entityshapes.ps
This is the base class for all entity renderers to be used in Processing
For details about rendering hints for steering behaviours see the Picture class API.
PicturePS() - Constructor for class game2dai.entityshapes.ps.PicturePS
Default constructor - use this constructor if the child class is to be a local class in the sketch.
PicturePS(PApplet) - Constructor for class game2dai.entityshapes.ps.PicturePS
Use this constructor if the child class is to be a top level class (either in its own .java tab or declared as static in a .pde tab) in the sketch.
pixel2world(int, int, Vector2D) - Method in class game2dai.World
Calculate the equivalent world position from a pixel position.
PLANE_INSIDE - Static variable in class game2dai.maths.Geometry2D
 
PLANE_OUTSIDE - Static variable in class game2dai.maths.Geometry2D
 
PLUS_I - Static variable in class game2dai.maths.Vector2D
First canonical vector (coordinates: 1, 0).
PLUS_J - Static variable in class game2dai.maths.Vector2D
Second canonical vector (coordinates: 0, 1).
point_nearest_infinite_line(Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Geometry2D
Given a point find the nearest position on an infinite line.
point_nearest_line(Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Geometry2D
Given a point find the nearest position on a finite line.
point_to_line_dist(double) - Static method in class game2dai.maths.Geometry2D
This sets the distance used to decide whether a point is 'near, a line.
pointToLocalSpace(Vector2D, Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Transformations
 
pointToWorldSpace(Vector2D, Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Transformations
 
pos() - Method in class game2dai.entities.BaseEntity
Get the current position.
POSITIVE_INFINITY - Static variable in class game2dai.maths.Vector2D
A vector with all coordinates set to positive infinity.
pow(double, double) - Static method in class game2dai.maths.FastMath
Power function.
prevPos() - Method in class game2dai.entities.MovingEntity
Gets the position of the entity prior to the last update.
printForceData() - Method in class game2dai.entities.Vehicle
Display the steering force data for this Vehicle.
printForceData() - Method in class game2dai.World
Used to display all collected steering force data by Vehicle
A vehicle must have it's force logger activated with
println(String, Object...) - Static method in class game2dai.utils.Message
 
PURSUIT - Static variable in interface game2dai.steering.SBF
 
pursuitDistance() - Method in class game2dai.steering.AutoPilot
Get current distance from the owning entity and the moving entity we want are pursuing.
pursuitOff() - Method in class game2dai.steering.AutoPilot
Switch off pursuit pursuer
pursuitOn() - Method in class game2dai.steering.AutoPilot
Switch on pursuit pursuer
pursuitOn(MovingEntity) - Method in class game2dai.steering.AutoPilot
Switch on pursuit and specify the entity to persue.
pursuitWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
pursuitWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour

Q

QUARTER_PI - Static variable in class game2dai.maths.FastMath
 

R

random() - Static method in class game2dai.maths.FastMath
Returns a pseudo-random number between 0.0 and 1.0.
random(Vector2D) - Static method in class game2dai.maths.Vector2D
Create a random normalised vector.
randomClamped() - Static method in class game2dai.maths.MathUtils
 
randomInRange(double, double) - Static method in class game2dai.maths.MathUtils
 
REBOUND - Static variable in interface game2dai.steering.SBF
 
receiver - Variable in class game2dai.fsm.Telegram
 
removeAllHints() - Method in class game2dai.entityshapes.Picture
Remove all steering behaviour (SB) hints.
removeEdge(int, int) - Method in class game2dai.graph.Graph
Remove an edge between 2 nodes.
removeFSM() - Method in class game2dai.entities.BaseEntity
This is the only way to remove a FSM once added.
removeHints(int) - Method in class game2dai.entityshapes.Picture
Remove some or all of the steering behaviour (SB) hints currently selected.
removeNode(int) - Method in class game2dai.graph.Graph
If the node exists remove it and all edges that start or end at this node.
renderer(Picture) - Method in class game2dai.entities.BaseEntity
Add a render object to this entity.
renderer() - Method in class game2dai.entities.BaseEntity
Get the render object.
reset() - Method in class game2dai.utils.StopWatch
Initialise the stop-watch to the current time.
revertToPreviousState() - Method in class game2dai.fsm.FiniteStateMachine
Performs the same actions as the changeState() method but the new state will be the previous state.
rint(double) - Static method in class game2dai.maths.FastMath
Get the whole number that is the nearest to x, or the even one if x is exactly half way between two integers.
rotate(double) - Method in class game2dai.maths.Matrix2D
Rotate the matrix.
rotate(Vector2D, Vector2D) - Method in class game2dai.maths.Matrix2D
Rotate the matrix based an entity's heading and side vectors
rotateHeadingToAlignWith(double, Vector2D) - Method in class game2dai.entities.MovingEntity
Rotate this entities heading to align with a vector over a given time period
rotateHeadingToFacePosition(double, Vector2D) - Method in class game2dai.entities.MovingEntity
----------------------- RotateHeadingToFacePosition ------------------ given a target position, this method rotates the entity's heading and side vectors by an amount not greater than m_dMaxTurnRate until it directly faces the target.
round(double) - Static method in class game2dai.maths.FastMath
Get the closest long to x.
round(float) - Static method in class game2dai.maths.FastMath
Get the closest int to x.

S

SAFE_MIN - Static variable in class game2dai.maths.FastMath
Safe minimum, such that 1 / SAFE_MIN does not overflow.
SBF - Interface in game2dai.steering
 
scalb(double, int) - Static method in class game2dai.maths.FastMath
Multiply a double number by a power of 2.
scalb(float, int) - Static method in class game2dai.maths.FastMath
Multiply a float number by a power of 2.
scale(double, double) - Method in class game2dai.maths.Matrix2D
Scale the matrix in the x and y directions.
scale(double) - Method in class game2dai.World
Resize the world due to changes in magnification so that the image is centred in the display area.
scale() - Method in class game2dai.World
Get the current viewScale (zoom factor)
search(int, int) - Method in class game2dai.graph.GraphSearch_Astar
Search for a route from node startID and ends at targetID.
search(int, int, boolean) - Method in class game2dai.graph.GraphSearch_Astar
Search for a route from node startID and ends at targetID.
search(int, int) - Method in class game2dai.graph.GraphSearch_BFS
Search for a route from node startID and ends at targetID.
search(int, int, boolean) - Method in class game2dai.graph.GraphSearch_BFS
Search for a route from node startID and ends at targetID.
search(int, int) - Method in class game2dai.graph.GraphSearch_DFS
Search for a route from node startID and ends at targetID.
search(int, int, boolean) - Method in class game2dai.graph.GraphSearch_DFS
Search for a route from node startID and ends at targetID.
search(int, int) - Method in class game2dai.graph.GraphSearch_Dijkstra
Search for a route from node startID and ends at targetID.
search(int, int, boolean) - Method in class game2dai.graph.GraphSearch_Dijkstra
Search for a route from node startID and ends at targetID.
search(int, int) - Method in interface game2dai.graph.IGraphSearch
Search for a route from node startID and ends at targetID.
search(int, int, boolean) - Method in interface game2dai.graph.IGraphSearch
Search for a route from node startID and ends at targetID.
SEEK - Static variable in interface game2dai.steering.SBF
 
seekDistance() - Method in class game2dai.steering.AutoPilot
Get current distance from the owning entity to the seek target position.
seekOff() - Method in class game2dai.steering.AutoPilot
Switch off seek
seekOn() - Method in class game2dai.steering.AutoPilot
Switch on seek
seekOn(Vector2D) - Method in class game2dai.steering.AutoPilot
Switch on seek
seekOn(double, double) - Method in class game2dai.steering.AutoPilot
Switch on seek
seekWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
seekWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
sender - Variable in class game2dai.fsm.Telegram
 
SEPARATION - Static variable in interface game2dai.steering.SBF
 
separationOff() - Method in class game2dai.steering.AutoPilot
Switch off separation
separationOn() - Method in class game2dai.steering.AutoPilot
Switch on separation
separationWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
separationWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
set(Vector2D) - Method in class game2dai.maths.Vector2D
 
set(double, double) - Method in class game2dai.maths.Vector2D
 
setAnimation(double, int) - Method in class game2dai.entityshapes.ps.BitmapPic
 
setApplet(PApplet) - Method in class game2dai.entityshapes.ps.PicturePS
This method allows the user to specify the PApplet object responsible for drawing this picture.
setCost(double) - Method in class game2dai.graph.GraphEdge
Change the traversal cost.
setCurrentState(State) - Method in class game2dai.fsm.FiniteStateMachine
Use this to set the current state.
setDomain_xywh(double, double, double, double) - Method in class game2dai.Domain
Set the domain size.
setFill(int[]) - Method in class game2dai.entityshapes.ps.Umbrella
Set the colours to be used by the brolly.
setGlobalState(State) - Method in class game2dai.fsm.FiniteStateMachine
Use this to set the global state.
setOwner(Vehicle) - Method in class game2dai.steering.AutoPilot
DO NOT USE THIS METHOD
This method is for sole use by the Vehicle class when a steering behaviour is added.
setPreviousState(State) - Method in class game2dai.fsm.FiniteStateMachine
Use this to set the previous state.
showHints(int) - Method in class game2dai.entityshapes.Picture
Defines the steering behaviour (SB) hints to be displayed.
side() - Method in class game2dai.entities.MovingEntity
Get the side vector for this entity.
sign(Vector2D) - Method in class game2dai.maths.Vector2D
Determines whether vector v is clockwise of this vector.
signum(double) - Static method in class game2dai.maths.FastMath
Compute the signum of a number.
signum(float) - Static method in class game2dai.maths.FastMath
Compute the signum of a number.
sin(double) - Static method in class game2dai.maths.FastMath
Sine function.
sinh(double) - Static method in class game2dai.maths.FastMath
Compute the hyperbolic sine of a number.
SLOW - Static variable in interface game2dai.steering.SBF
 
speed() - Method in class game2dai.entities.MovingEntity
Get the entity's speed.
speedSq() - Method in class game2dai.entities.MovingEntity
Get the square of the entity's speed.
sqrt(double) - Static method in class game2dai.maths.FastMath
Compute the square root of a number.
startDocument() - Method in class game2dai.utils.BuildingSAXParser
 
startDocument() - Method in class game2dai.utils.GraphSAXParser
 
startDocument() - Method in class game2dai.utils.ObstacleSAXParser
 
startDocument() - Method in class game2dai.utils.VehicleSAXParser
 
startElement(String, String, String, Attributes) - Method in class game2dai.utils.BuildingSAXParser
 
startElement(String, String, String, Attributes) - Method in class game2dai.utils.GraphSAXParser
 
startElement(String, String, String, Attributes) - Method in class game2dai.utils.ObstacleSAXParser
 
startElement(String, String, String, Attributes) - Method in class game2dai.utils.VehicleSAXParser
 
State - Class in game2dai.fsm
This is the base class for all 'finite states'.
State() - Constructor for class game2dai.fsm.State
 
StopWatch - Class in game2dai.utils
 
StopWatch() - Constructor for class game2dai.utils.StopWatch
Create a stop watch and initialise it to the current time.
stroke(int) - Method in class game2dai.entityshapes.ps.BuildingPic
Set the border colour
strokeWeight(float) - Method in class game2dai.entityshapes.ps.BuildingPic
Set the border thickness
sub(Vector2D) - Method in class game2dai.maths.Vector2D
 
sub(Vector2D, Vector2D) - Static method in class game2dai.maths.Vector2D
Get a new vector that is the difference between the 2 vectors.

T

tag - Variable in class game2dai.entities.BaseEntity
The tag attribute is not used by the library code.
tagNo - Variable in class game2dai.entities.BaseEntity
The tagNo attribute is not used by the library code.
tan(double) - Static method in class game2dai.maths.FastMath
Tangent function
tangents_between_circles(double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Will calculate the contact points for both outer and inner tangents.
tangents_to_circle(double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Calculate the tangents from a point.
tanh(double) - Static method in class game2dai.maths.FastMath
Compute the hyperbolic tangent of a number.
Telegram - Class in game2dai.fsm
 
Telegram(long, int, int, int, Object...) - Constructor for class game2dai.fsm.Telegram
 
to() - Method in class game2dai.graph.GraphEdge
 
toArray() - Method in class game2dai.maths.Vector2D
Get the coordinates as an array.
toDegrees(double) - Static method in class game2dai.maths.FastMath
Convert radians to degrees, with error of less than 0.5 ULP
toRadians(double) - Static method in class game2dai.maths.FastMath
Convert degrees to radians, with error of less than 0.5 ULP
toShortString() - Method in class game2dai.maths.Vector2D
 
toString() - Method in class game2dai.Domain
Return the Domain as a String
toString() - Method in class game2dai.entities.BaseEntity
Entity ID number and name returned as a String
toString() - Method in class game2dai.entities.Building
 
toString() - Method in class game2dai.entities.Obstacle
 
toString() - Method in class game2dai.entities.Vehicle
 
toString() - Method in class game2dai.graph.Graph
Used for debugging only.
toString() - Method in class game2dai.graph.GraphEdge
 
toString() - Method in class game2dai.graph.GraphNode
 
toString() - Method in class game2dai.maths.Vector2D
 
toString() - Method in class game2dai.steering.AutoPilot
This method provides a String object that describes the active behaviours and their details.
toString() - Method in class game2dai.utils.ForceRecorder.Force
 
toString() - Method in class game2dai.utils.ForceRecorder
 
Transformations - Class in game2dai.maths
 
Transformations() - Constructor for class game2dai.maths.Transformations
 
transformVector2D(List<Vector2D>) - Method in class game2dai.maths.Matrix2D
Create a new list of vectors from the provided list after being transformed by this matrix.
transformVector2D(Vector2D) - Method in class game2dai.maths.Matrix2D
Create a new vector from the provided vector after being transformed by the matrix.
translate(double, double) - Method in class game2dai.maths.Matrix2D
Translate the matrix by the amount specified in x and y.
triangle() - Method in class game2dai.entities.Building
This is needed by any renderer you might want to create.
triangulate(List<Vector2D>, List<Integer>) - Static method in class game2dai.maths.Triangulator
Create a set of triangles from a concave/convex polygon with no holes and no intersecting sides.
triangulate(List<Vector2D>) - Static method in class game2dai.maths.Triangulator
Create a set of triangles from a concave/convex polygon with no holes and no intersecting sides.
triangulate(Vector2D[]) - Static method in class game2dai.maths.Triangulator
Create a set of triangles from a concave/convex polygon with no holes and no intersecting sides.
Triangulator - Class in game2dai.maths
Various routines to work with concave/convex shapes.
Triangulator() - Constructor for class game2dai.maths.Triangulator
 
truncate(double) - Method in class game2dai.maths.Vector2D
Truncate this vector so its length is no greater than the value provided.
turnRate() - Method in class game2dai.entities.MovingEntity
Get the current turn rate
turnRate(double) - Method in class game2dai.entities.MovingEntity
Set the current turnrate making sure it does not exceed the maximum allowed.
TWO_PI - Static variable in class game2dai.maths.FastMath
 

U

ulp(double) - Static method in class game2dai.maths.FastMath
Compute least significant bit (Unit in Last Position) for a number.
ulp(float) - Static method in class game2dai.maths.FastMath
Compute least significant bit (Unit in Last Position) for a number.
Umbrella - Class in game2dai.entityshapes.ps
Creates a circular picture that looks like an umbrella from above.
Umbrella(PApplet, double) - Constructor for class game2dai.entityshapes.ps.Umbrella
Create a simple 8 piece black and white umbrella
Umbrella(PApplet, double, int[]) - Constructor for class game2dai.entityshapes.ps.Umbrella
Create an umbrella with at least 8 sections using the colour list.
update(double, World) - Method in class game2dai.entities.BaseEntity
The main update method for an entity.
update(double, World) - Method in class game2dai.entities.MovingEntity
Update method for any moving entity in the world that is not under the influence of a steering behaviour.
update(double, World) - Method in class game2dai.entities.Vehicle
Update method for any moving entity in the world that is under the influence of a steering behaviour.
update() - Static method in class game2dai.fsm.Dispatcher
Called by the world update - will send any telegrams ready for processing
update(double, World) - Method in class game2dai.fsm.FiniteStateMachine
This method is called by the world update method and should not be caled directly.
update(double) - Method in class game2dai.World
This is the core method which will loop through entity state machines (if any) then it will update the positions and velocities of all moving entities (applying any steering behaviours used).
updateFSM(double, World) - Method in class game2dai.entities.BaseEntity
If this entity has a state machine then call its update method.

V

vec2DRotateAroundOrigin(Vector2D, double) - Static method in class game2dai.maths.Transformations
 
Vector2D - Class in game2dai.maths
This 2D vector class uses the double data type throughout.
Vector2D() - Constructor for class game2dai.maths.Vector2D
Default to the zero vector
Vector2D(double, double) - Constructor for class game2dai.maths.Vector2D
Create a vector based on parameter values.
Vector2D(Vector2D) - Constructor for class game2dai.maths.Vector2D
Copy constructor
vectorToLocalSpace(Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Transformations
 
vectorToWorldSpace(Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Transformations
 
Vehicle - Class in game2dai.entities
This class models the behaviour of a moving entity acting under the influence of an AutoPilot.
Vehicle(Vector2D, double, Vector2D, double, Vector2D, double, double, double) - Constructor for class game2dai.entities.Vehicle
The constructor that should be used when creating a Vehicle without a name.
Vehicle(String, Vector2D, double, Vector2D, double, Vector2D, double, double, double) - Constructor for class game2dai.entities.Vehicle
The constructor that should be used when creating a Vehicle with a name.
VehicleSAXParser - Class in game2dai.utils
 
VehicleSAXParser(File) - Constructor for class game2dai.utils.VehicleSAXParser
 
VehicleSAXParser(PApplet, String) - Constructor for class game2dai.utils.VehicleSAXParser
 
VehicleSAXParser(String) - Constructor for class game2dai.utils.VehicleSAXParser
 
velocity() - Method in class game2dai.entities.MovingEntity
Gets the current velocity
velocity(Vector2D) - Method in class game2dai.entities.MovingEntity
Sets the current velocity for this entity
velocity(double, double) - Method in class game2dai.entities.MovingEntity
Sets the current velocity
viewDistance() - Method in class game2dai.entities.MovingEntity
Get the distance that this entity can see.
viewDistance(double) - Method in class game2dai.entities.MovingEntity
This sets the distance that this entity can see.
viewFactors(double, double) - Method in class game2dai.entities.MovingEntity
Sets the distance and total field of view angle for this entity.
viewFOV() - Method in class game2dai.entities.MovingEntity
Get the field of view for this entity.
viewFOV(double) - Method in class game2dai.entities.MovingEntity
Sets the total field of view angle for this entity.
viewOnWorld() - Method in class game2dai.World
Get the extent of the world being drawn.
visible(boolean) - Method in class game2dai.entities.BaseEntity
Set the entity's visibility

W

Wall - Class in game2dai.entities
This class represents a wall.
Wall(Vector2D, Vector2D, boolean) - Constructor for class game2dai.entities.Wall
Create a wall.
Wall(String, Vector2D, Vector2D, boolean) - Constructor for class game2dai.entities.Wall
Create a 'named' wall.
WALL_AVOID - Static variable in interface game2dai.steering.SBF
 
wallAvoidFactors(Object, Object, Object, Boolean) - Method in class game2dai.steering.AutoPilot
Set some or all of the factors used for wall avoidance.
wallAvoidFOV() - Method in class game2dai.steering.AutoPilot
Get the angle covered by the whiskers
wallAvoidNbrWhiskers() - Method in class game2dai.steering.AutoPilot
Get the number of whiskers used.
wallAvoidOff() - Method in class game2dai.steering.AutoPilot
Switch off wall avoidance
wallAvoidOn() - Method in class game2dai.steering.AutoPilot
Switch on wall avoidance
wallAvoidWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
wallAvoidWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
wallAvoidWhiskerLength() - Method in class game2dai.steering.AutoPilot
Get the length of the whiskers
wallDetails(int, float) - Method in class game2dai.entityshapes.ps.WallPic
Set wall colour and thickness (stroke weight)
WallPic - Class in game2dai.entityshapes.ps
A very basic wall picture created using a single line.
WallPic(PApplet) - Constructor for class game2dai.entityshapes.ps.WallPic
A thin black line.
WallPic(PApplet, int, float) - Constructor for class game2dai.entityshapes.ps.WallPic
User selected line colour and thickness.
walls() - Method in class game2dai.entities.Building
 
walls(Wall[]) - Method in class game2dai.entities.Building
 
WANDER - Static variable in interface game2dai.steering.SBF
 
wanderAngle() - Method in class game2dai.steering.AutoPilot
Gets the current angle in the wander radius circle
wanderAngleDelta() - Method in class game2dai.steering.AutoPilot
 
wanderAngleJitter() - Method in class game2dai.steering.AutoPilot
Gets the maximum amount of jitter allowed per second
wanderDist() - Method in class game2dai.steering.AutoPilot
 
wanderFactors(Object, Object, Object) - Method in class game2dai.steering.AutoPilot
Set some or all of the factors used for wander behaviour.
wanderOff() - Method in class game2dai.steering.AutoPilot
Switch off wander
wanderOn() - Method in class game2dai.steering.AutoPilot
Switch on wander
wanderRadius() - Method in class game2dai.steering.AutoPilot
 
wanderWeight(double) - Method in class game2dai.steering.AutoPilot
Set the weight for this behaviour
wanderWeight() - Method in class game2dai.steering.AutoPilot
Get the weighting for this behaviour
WEIGHTED - Static variable in interface game2dai.steering.SBF
 
WEIGHTED_PRIORITIZED - Static variable in interface game2dai.steering.SBF
 
which_side_pn(double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Outside is in the same direction of the plane normal.
which_side_pp(double, double, double, double, double, double) - Static method in class game2dai.maths.Geometry2D
Outside is in the same direction of the plane normal.
width - Variable in class game2dai.Domain
 
World - Class in game2dai
This class represents the '2D game play area' on which all the game entities are placed.
World(int, int) - Constructor for class game2dai.World
Create a world without cell space partitioning.
World(int, int, double, double) - Constructor for class game2dai.World
Create a world with cell space partitioning.
world2pixel(double, double, Point) - Method in class game2dai.World
Calculate the pixel position from a given world position.
world2pixel(Vector2D, Point) - Method in class game2dai.World
Calculate the pixel position from a given world position.
worldDomain(Domain) - Method in class game2dai.entities.MovingEntity
Set the world domain for this entity and its' constraint to the default value of SBF.WRAP this means that when an entity leaves the domain it is wrapped to the other side.
worldDomain(Domain, int) - Method in class game2dai.entities.MovingEntity
Set the world domain
worldDomain() - Method in class game2dai.entities.MovingEntity
Get the world domain for this entity.
worldDomainConstraint(int) - Method in class game2dai.entities.MovingEntity
Set the constraint to be applied to the world domain.
worldDomainConstraint() - Method in class game2dai.entities.MovingEntity
Get the world domain constraint for this entity.
worldTransform(List<Vector2D>, Vector2D, Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Transformations
 
worldTransform(List<Vector2D>, Vector2D, Vector2D, Vector2D) - Static method in class game2dai.maths.Transformations
 
worldUpdateTime - Variable in class game2dai.World
The average time it takes for the world to update all the components in the world.
WRAP - Static variable in interface game2dai.steering.SBF
 

X

x() - Method in class game2dai.graph.GraphNode
 
x(double) - Method in class game2dai.graph.GraphNode
 
x - Variable in class game2dai.maths.Vector2D
 
xf() - Method in class game2dai.graph.GraphNode
 
xOffset() - Method in class game2dai.World
Get the world x position equivalent to the left hand side of the display area.

Y

y() - Method in class game2dai.graph.GraphNode
 
y(double) - Method in class game2dai.graph.GraphNode
 
y - Variable in class game2dai.maths.Vector2D
 
yf() - Method in class game2dai.graph.GraphNode
 
yOffset() - Method in class game2dai.World
Get the world x position equivalent to the left hand side of the display area.

Z

Z() - Method in class game2dai.entities.BaseEntity
Get the draw order depth.
Z(int) - Method in class game2dai.entities.BaseEntity
Set the draw order depth.
z() - Method in class game2dai.graph.GraphNode
 
z(double) - Method in class game2dai.graph.GraphNode
 
ZERO - Static variable in class game2dai.maths.Vector2D
Null vector (coordinates: 0, 0).
ZERO_VECTOR - Static variable in class game2dai.entityshapes.ps.Hints
 
zf() - Method in class game2dai.graph.GraphNode
 

_

_11(double) - Method in class game2dai.maths.Matrix2D
 
_12(double) - Method in class game2dai.maths.Matrix2D
 
_13(double) - Method in class game2dai.maths.Matrix2D
 
_21(double) - Method in class game2dai.maths.Matrix2D
 
_22(double) - Method in class game2dai.maths.Matrix2D
 
_23(double) - Method in class game2dai.maths.Matrix2D
 
_31(double) - Method in class game2dai.maths.Matrix2D
 
_32(double) - Method in class game2dai.maths.Matrix2D
 
_33(double) - Method in class game2dai.maths.Matrix2D
 
A B C D E F G H I L M N O P Q R S T U V W X Y Z _ 

Processing library AI_for_2D_Games by Peter Lager. (C) 2013