|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.NavMeshModule
public class NavMeshModule
Main class of Navigation Mesh module.
It expects .navmesh files to be present within ./navmesh directory (at project root). NavMesh files can be obtained from: svn://artemis.ms.mff.cuni.cz/pogamut/trunk/project/Addons/UT2004NavMeshTools/04-NavMeshes
.navmesh file contains pure navmesh for the map. When loaded it gets combined with current navigation graph (extracting off-mesh links that leads between various polygons) and this structure is then stored within ./navmesh as %MAP-NAME%.processed file.
Currently there is no way to regenerate the navmesh during runtime (i.e. if you would like to manipulate with navigation graph / off-mesh links during runtime, its impossible,
you will have to copy-paste the implementation of this class and hack it manually), but there is at least a wayy to regenerate .processed file by setting setReloadNavMesh(boolean)
to true during IUT2004BotController.mapInfoObtained(). E.g., you might first use NavigationGraphBuilder via UT2004BotModuleController.getNavBuilder()
or tweak the map via UT2004MapTweaks, resp. UT2004BotModuleController.getMapTweaks(), then setReloadNavMesh(boolean) set to TRUE in order to regenerate the off-mesh links.
| Constructor Summary | |
|---|---|
NavMeshModule(IUT2004ServerProvider serverProvider,
IWorldView worldView,
IAgentLogger logger)
|
|
| Method Summary | |
|---|---|
NavMesh |
getNavMesh()
Always non-null, always returns NavMesh. |
NavMeshDraw |
getNavMeshDraw()
|
boolean |
isInitialized()
Tells whether NavMesh has been initialized and getNavMesh() is
usable. |
void |
setFwMap(FloydWarshallMap fwMap)
|
void |
setReloadNavMesh(boolean value)
Whether NavMeshModule should ignored ".processed" navmesh and reload it from ".navmesh". |
boolean |
shouldReloadNavMesh()
Whether NavMeshModule should ignored ".processed" navmesh and reload it from ".navmesh". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NavMeshModule(IUT2004ServerProvider serverProvider,
IWorldView worldView,
IAgentLogger logger)
| Method Detail |
|---|
public boolean isInitialized()
getNavMesh() is
usable.
public boolean shouldReloadNavMesh()
NavMeshModule should ignored ".processed" navmesh and reload it from ".navmesh".
Note that reloading can happen only during load(GameInfo) that means you have to set this flag
before GameInfo came from GB2004, i.e., during IUT2004BotController.prepareBot(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot).
public void setReloadNavMesh(boolean value)
NavMeshModule should ignored ".processed" navmesh and reload it from ".navmesh".
Note that reloading can happen only during load(GameInfo) that means you have to set this flag
before GameInfo came from GB2004, i.e., during IUT2004BotController.prepareBot(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot).
public NavMesh getNavMesh()
NavMesh. However, you should
check isInitialized() whether the NavMesh is usable.
public NavMeshDraw getNavMeshDraw()
public void setFwMap(FloydWarshallMap fwMap)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||