cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh
Class LevelGeometry
java.lang.Object
cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.LevelGeometry
- All Implemented Interfaces:
- Serializable
public class LevelGeometry
- extends Object
- implements Serializable
Class containing complete data with the geometry of the environment
It is useful for steering.
It is part of NavMesh class.
- Author:
- Jakub Tomek
- See Also:
- Serialized Form
Constructor Summary |
LevelGeometry(Logger log)
Constructor creates the object from a file defined by map name and path which is in constants |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
random
public static Random random
verts
public ArrayList<double[]> verts
triangles
public ArrayList<int[]> triangles
leafCount
public int leafCount
minX
public double minX
maxX
public double maxX
minY
public double minY
maxY
public double maxY
minZ
public double minZ
maxZ
public double maxZ
LevelGeometry
public LevelGeometry(Logger log)
- Constructor creates the object from a file defined by map name and path which is in constants
- Parameters:
mapName
-
isLoaded
public boolean isLoaded()
getBSPRoot
public LevelGeometryBSPNode getBSPRoot()
clear
public void clear()
load
public boolean load(String mapName)
throws FileNotFoundException,
IOException,
Exception
- Throws:
FileNotFoundException
IOException
Exception
getAutoTraceRayMessage
public AutoTraceRay getAutoTraceRayMessage(Self self,
BSPRayInfoContainer rayInfo)
- The most important method on this class.
It computes the information about collision of the given ray and this geometry
- Parameters:
self
- rayInfo
-
- Returns:
raycast
public LevelGeometry.RaycastResult raycast(Location from,
Location to)
- Recursive function for getting ray collision
- Parameters:
from
- to
- rayInfo
-
- Returns:
isPointInTriangle
public boolean isPointInTriangle(math.geom3d.Point3D point3D,
Integer tId)
getTriangle
public double[][] getTriangle(int tId)
Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.