- 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
-
- 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.
- 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.
- 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.
- 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?
- 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
- 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
- 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.
- 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
-
- 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
-