atavism.server.pathing
Class PathObject
java.lang.Object
atavism.server.pathing.PathObject
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class PathObject
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Cloneable
used in pathing code
works with java bean xml serialization
- See Also:
- Serialized Form
Constructor Summary |
PathObject()
|
PathObject(java.lang.String description,
float avatarWidth,
java.util.List<AOVector> boundaryCorners,
java.util.List<java.util.List<AOVector>> obstacleCorners)
Generate the pathing metadata for avatars of the given width
moving inside the boundary around the obstacles. |
PathObject(java.lang.String modelName,
java.lang.String type,
int firstTerrainIndex,
PathPolygon boundingPolygon,
java.util.List<PathPolygon> polygons,
java.util.List<PathArc> portals,
java.util.List<PathArc> arcs)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
insideDistance
protected static float insideDistance
log
protected static final Logger log
logAll
protected static boolean logAll
PathObject
public PathObject()
PathObject
public PathObject(java.lang.String modelName,
java.lang.String type,
int firstTerrainIndex,
PathPolygon boundingPolygon,
java.util.List<PathPolygon> polygons,
java.util.List<PathArc> portals,
java.util.List<PathArc> arcs)
PathObject
public PathObject(java.lang.String description,
float avatarWidth,
java.util.List<AOVector> boundaryCorners,
java.util.List<java.util.List<AOVector>> obstacleCorners)
- Generate the pathing metadata for avatars of the given width
moving inside the boundary around the obstacles.
aggregateTriangles
protected static java.util.List<PathPolygon> aggregateTriangles(java.util.List<PathPolygon> triangles)
- Aggregate triangles into convex polygons.
discoverArcs
protected static java.util.List<PathArc> discoverArcs(java.util.List<PathPolygon> polygons)
- A quadruple loop over the polygon edges, looking for common
ones to find arcs between polygons.
findTerrainPolygonsAtCorners
protected void findTerrainPolygonsAtCorners()
getCVPolygon
public PathPolygon getCVPolygon(int polyIndex)
getTerrainPolygon
public PathPolygon getTerrainPolygon(int polyIndex)
isTerrainPolygon
public boolean isTerrainPolygon(int polyIndex)
getTerrainPolygonAtCorner
public PathPolygon getTerrainPolygonAtCorner(int cornerNumber)
getClosestCornerToPoint
public int getClosestCornerToPoint(AOVector loc)
getPolygon
public PathPolygon getPolygon(int polyIndex)
createPolygonMap
protected void createPolygonMap()
findCVPolygonAtLocation
public int findCVPolygonAtLocation(AOVector loc)
findTerrainPolygonAtLocation
public int findTerrainPolygonAtLocation(AOVector loc)
closestIntersection
public PathIntersection closestIntersection(AOVector loc1,
AOVector loc2)
getPolygonArcs
public java.util.List<PathArc> getPolygonArcs(int polyIndex)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
getModelName
public java.lang.String getModelName()
getType
public java.lang.String getType()
getFirstTerrainIndex
public int getFirstTerrainIndex()
getCenter
public AOVector getCenter()
getRadius
public int getRadius()
getBoundingPolygon
public PathPolygon getBoundingPolygon()
getPolygons
public java.util.List<PathPolygon> getPolygons()
getPortals
public java.util.List<PathArc> getPortals()
getArcs
public java.util.List<PathArc> getArcs()