|
AI for Games 1.1.1
|

Classes | |
| class | ELine |
Public Member Functions | |
| Building (Vector2D[] contour) | |
| Building (Vector2D offset, Vector2D[] contour) | |
| Building (String name, Vector2D offset, Vector2D[] contour) | |
| Wall[] | walls () |
| void | walls (Wall[] walls) |
| Domain | getExtent () |
| boolean | isOver (double px, double py) |
| boolean | isEitherSide (double x0, double y0, double x1, double y1) |
| Vector2D[] | contour () |
| Vector2D[] | expandedContour (double e) |
| Integer[] | triangle () |
| boolean | isInDomain (Domain view) |
| String | toString () |
Public Member Functions inherited from game2dai.entities.BaseEntity | |
| BaseEntity () | |
| BaseEntity (String name) | |
| BaseEntity (String entityName, Vector2D entityPos, double entityColRadius) | |
| int | ID () |
| void | updateFSM (double deltaTime, World world) |
| FiniteStateMachine | FSM () |
| boolean | hasFSM () |
| void | addFSM () |
| boolean | removeFSM () |
| int | Z () |
| BaseEntity | Z (int z) |
| boolean | isVisible () |
| BaseEntity | visible (boolean visible) |
| double | colRadius () |
| BaseEntity | colRadius (double colRadius) |
| boolean | isOverLapAllowed () |
| BaseEntity | overLapAllowed (boolean overLapAllowed) |
| boolean | isInDomain (Domain view) |
| boolean | isOver (double px, double py) |
| BaseEntity | renderer (Picture renderer) |
| Picture | renderer () |
| void | die (World world, double timeToLive) |
| void | born (World world, double timeToLive) |
| BaseEntity | moveTo (double x, double y) |
| BaseEntity | moveTo (Vector2D p) |
| BaseEntity | moveBy (double x, double y) |
| BaseEntity | moveBy (Vector2D p) |
| Vector2D | pos () |
| BaseEntity | name (String name) |
| String | name () |
| boolean | isEitherSide (double x0, double y0, double x1, double y1) |
| boolean | isEitherSide (Vector2D p0, Vector2D p1) |
| void | update (double deltaTime, World world) |
| void | draw (World world) |
| void | draw (double elapsedTime, World world) |
| int | compareTo (BaseEntity o) |
| String | toString () |
Static Public Member Functions | |
| static Building[] | makeFromXML (PApplet app, String xmlFilename) |
| static Building[] | makeFromXML (String xmlFilename) |
| static Building[] | makeFromXML (File xmlFile) |
Private Attributes | |
| Wall[] | walls = null |
| Vector2D[] | contour |
| Integer[] | triangle |
| double | minX |
| double | maxX |
| double | minY |
| double | maxY |
Additional Inherited Members | |
Public Attributes inherited from game2dai.entities.BaseEntity | |
| String | tag = "" |
| int | tagNo = 0 |
Protected Attributes inherited from game2dai.entities.BaseEntity | |
| Integer | entityID |
| String | name = "" |
| Picture | renderer = null |
| boolean | visible = true |
| Vector2D | pos = new Vector2D() |
| double | colRadius |
Package Attributes inherited from game2dai.entities.BaseEntity | |
| boolean | overlapAllowed = false |
This class is used to represent a building.
| game2dai.entities.Building.Building | ( | Vector2D[] | contour | ) |
Create a building with the given contour.
| contour | open list (shape is automatically closed) of corners in counter-clockwise order |
Create a building with the given contour.
| offset | x/y to offset the contour data |
| contour | open list (shape is automatically closed) of corners in counter-clockwise order |
Create a building with the given contour.
| name | an optional name for the building |
| offset | x/y to offset the contour data |
| contour | open list (shape is automatically closed) of corners in counter-clockwise order |
| Vector2D[] game2dai.entities.Building.contour | ( | ) |
This is needed by any renderer you might want to create.
| Vector2D[] game2dai.entities.Building.expandedContour | ( | double | e | ) |
Get an expanded contour.
| e | the perpendicular distance between existent and expanded walls. |
| Domain game2dai.entities.Building.getExtent | ( | ) |
Get the rectangle that encompasses the building in world coordinates.
| boolean game2dai.entities.Building.isEitherSide | ( | double | x0, |
| double | y0, | ||
| double | x1, | ||
| double | y1 | ||
| ) |
Determines whether two world points are either side of a building. If they are then they cannot 'see' each other.
| x0 | |
| y0 | |
| x1 | |
| y1 |
Reimplemented from game2dai.entities.BaseEntity.
| boolean game2dai.entities.Building.isInDomain | ( | Domain | view | ) |
Determine whether this building is inside or part inside the domain. This method is used by the world draw method to see if this entity should be drawn.
| view | the world domain |
Reimplemented from game2dai.entities.BaseEntity.
| boolean game2dai.entities.Building.isOver | ( | double | px, |
| double | py | ||
| ) |
Determines whether a world point is inside the building or not
Reimplemented from game2dai.entities.BaseEntity.
|
static |
Alternative if not using Processing
| xmlFile | File to parse |
|
static |
This is the one to use with Processing
| app | |
| xmlFilename |
|
static |
Alternative if not using Processing
| xmlFilename | name of the file to parse |
| String game2dai.entities.Building.toString | ( | ) |
Entity ID number and name returned as a String
Reimplemented from game2dai.entities.BaseEntity.
| Integer[] game2dai.entities.Building.triangle | ( | ) |
This is needed by any renderer you might want to create.
| Wall[] game2dai.entities.Building.walls | ( | ) |
| void game2dai.entities.Building.walls | ( | Wall[] | walls | ) |
| walls | the walls to set |