multiverse.server.pathing
Class PathObject
java.lang.Object
multiverse.server.pathing.PathObject
- All Implemented Interfaces:
- Serializable, Cloneable
public class PathObject
- extends Object
- implements Serializable, Cloneable
used in pathing code
works with java bean xml serialization
- See Also:
- Serialized Form
modelName
String modelName
type
String type
firstTerrainIndex
int firstTerrainIndex
boundingPolygon
PathPolygon boundingPolygon
polygons
List<PathPolygon> polygons
portals
List<PathArc> portals
arcs
List<PathArc> arcs
polygonArcs
Map<Integer,List<PathArc>> polygonArcs
polygonMap
Map<Integer,PathPolygon> polygonMap
terrainPolygonAtCorner
LinkedList<PathPolygon> terrainPolygonAtCorner
insideDistance
protected static float insideDistance
log
protected static final Logger log
logAll
protected static boolean logAll
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
PathObject
public PathObject()
PathObject
public PathObject(String modelName,
String type,
int firstTerrainIndex,
PathPolygon boundingPolygon,
List<PathPolygon> polygons,
List<PathArc> portals,
List<PathArc> arcs)
PathObject
public PathObject(String description,
float avatarWidth,
List<MVVector> boundaryCorners,
List<List<MVVector>> obstacleCorners)
- Generate the pathing metadata for avatars of the given width
moving inside the boundary around the obstacles.
aggregateTriangles
protected static List<PathPolygon> aggregateTriangles(List<PathPolygon> triangles)
- Aggregate triangles into convex polygons.
discoverArcs
protected static List<PathArc> discoverArcs(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(MVVector loc)
getPolygon
public PathPolygon getPolygon(int polyIndex)
createPolygonMap
protected void createPolygonMap()
findCVPolygonAtLocation
public int findCVPolygonAtLocation(MVVector loc)
findTerrainPolygonAtLocation
public int findTerrainPolygonAtLocation(MVVector loc)
closestIntersection
public PathIntersection closestIntersection(MVVector loc1,
MVVector loc2)
getPolygonArcs
public List<PathArc> getPolygonArcs(int polyIndex)
addToArcMap
private void addToArcMap(Map<Integer,List<PathArc>> polygonArcs,
PathArc arc,
int polyIndex)
toString
public String toString()
- Overrides:
toString in class Object
clone
public Object clone()
- Overrides:
clone in class Object
getModelName
public String getModelName()
getType
public String getType()
getFirstTerrainIndex
public int getFirstTerrainIndex()
getCenter
public MVVector getCenter()
getRadius
public int getRadius()
getBoundingPolygon
public PathPolygon getBoundingPolygon()
getPolygons
public List<PathPolygon> getPolygons()
getPortals
public List<PathArc> getPortals()
getArcs
public List<PathArc> getArcs()