cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh
Class LevelGeometry

Package class diagram package LevelGeometry
java.lang.Object
  extended by 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

Nested Class Summary
static class LevelGeometry.RaycastResult
           
 
Field Summary
 int leafCount
           
 double maxX
           
 double maxY
           
 double maxZ
           
 double minX
           
 double minY
           
 double minZ
           
static Random random
           
 ArrayList<int[]> triangles
           
 ArrayList<double[]> verts
           
 
Constructor Summary
LevelGeometry(Logger log)
          Constructor creates the object from a file defined by map name and path which is in constants
 
Method Summary
 void clear()
           
 AutoTraceRay getAutoTraceRayMessage(Self self, BSPRayInfoContainer rayInfo)
          The most important method on this class.
 LevelGeometryBSPNode getBSPRoot()
           
 double[][] getTriangle(int tId)
           
 boolean isLoaded()
           
 boolean isPointInTriangle(math.geom3d.Point3D point3D, Integer tId)
           
 boolean load(String mapName)
           
 LevelGeometry.RaycastResult raycast(Location from, Location to)
          Recursive function for getting ray collision
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

LevelGeometry

public LevelGeometry(Logger log)
Constructor creates the object from a file defined by map name and path which is in constants

Parameters:
mapName -
Method Detail

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.