cz.cuni.amis.pogamut.udk.storyworld.place
Class SPStoryWorld

Package class diagram package SPStoryWorld
java.lang.Object
  extended by cz.cuni.amis.pogamut.udk.storyworld.place.SPStoryWorld

public class SPStoryWorld
extends Object

TODO: CURRENTLY IT DOES NOT WORK!

Author:
Jimmy

Constructor Summary
SPStoryWorld(File worldXMLDefinition, IWorldView ww, Logger log)
           
SPStoryWorld(SPStoryWorldData data, IWorldView ww, Logger log)
           
SPStoryWorld(String worldXMLDefinitionFile, IWorldView ww, Logger log)
           
 
Method Summary
 Set<SPStoryPlaceBase> at(SPLocation location)
          Nearest navpoint must be max "NEAR" far.
protected  Map<cz.cuni.amis.utils.token.Token,SPStoryPlace> getAllPlaces()
           
 SPStoryPlaceBase getBase(String name)
           
 SPStoryPlaceBase getBase(cz.cuni.amis.utils.token.Token name)
           
 Set<SPStoryPlaceBase> getBase(UnrealId navPointId)
           
 NavPoint getFurthestNavPoint(SPLocation location)
           
 FloydWarshallMap getNavigation()
           
 NavPoint getNavPoint(String id)
           
 Set<NavPoint> getNavPoints()
          Returns places inside the virtual world.
protected  cz.cuni.amis.utils.maps.HashMapSet<UnrealId,SPStoryPlaceBase> getNavPointsToPlaceMap()
           
 NavPoint getNearestNavPoint(SPLocation location)
           
 List<NavPoint> getPath(SPLocation from, NavPoint to)
          Finds path between navpoint that is the nearest to "from" and navpoint "to".
 List<NavPoint> getPath(SPLocation from, SPLocation to)
          Finds path between navpoints that are the nearest to "from" / "to" location.
 List<NavPoint> getPath(SPLocation from, SPStoryPlace place)
          Finds shortest path between the nearest navpoint to "from" and the "place", searching all the navpoints that is contained inside the place.
 SPStoryPlace getPlace(String name)
           
 SPStoryPlace getPlace(cz.cuni.amis.utils.token.Token name)
           
 SPStoryWorldData getStoryWorldData()
           
 boolean isInside(SPLocation location, SPStoryPlace place)
          Returns whether 'location' belongs to the 'place'.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SPStoryWorld

public SPStoryWorld(String worldXMLDefinitionFile,
                    IWorldView ww,
                    Logger log)
             throws FileNotFoundException
Throws:
FileNotFoundException

SPStoryWorld

public SPStoryWorld(File worldXMLDefinition,
                    IWorldView ww,
                    Logger log)
             throws FileNotFoundException
Throws:
FileNotFoundException

SPStoryWorld

public SPStoryWorld(SPStoryWorldData data,
                    IWorldView ww,
                    Logger log)
Method Detail

getPlace

public SPStoryPlace getPlace(cz.cuni.amis.utils.token.Token name)

getPlace

public SPStoryPlace getPlace(String name)

getBase

public SPStoryPlaceBase getBase(cz.cuni.amis.utils.token.Token name)

getNavPoint

public NavPoint getNavPoint(String id)

getBase

public SPStoryPlaceBase getBase(String name)

getBase

public Set<SPStoryPlaceBase> getBase(UnrealId navPointId)

at

public Set<SPStoryPlaceBase> at(SPLocation location)
Nearest navpoint must be max "NEAR" far.

Parameters:
location -
Returns:

getNearestNavPoint

public NavPoint getNearestNavPoint(SPLocation location)

getFurthestNavPoint

public NavPoint getFurthestNavPoint(SPLocation location)

isInside

public boolean isInside(SPLocation location,
                        SPStoryPlace place)
Returns whether 'location' belongs to the 'place'. Nearest navpoint must be at least 1000 close not to return false automatically.

Parameters:
location -
place -
Returns:

getNavPoints

public Set<NavPoint> getNavPoints()
Returns places inside the virtual world.

Can't be called before the definition of all story places are defined, otherwise it won't contains all places. (Lazy initialization.)

Returns:

getNavPointsToPlaceMap

protected cz.cuni.amis.utils.maps.HashMapSet<UnrealId,SPStoryPlaceBase> getNavPointsToPlaceMap()

getAllPlaces

protected Map<cz.cuni.amis.utils.token.Token,SPStoryPlace> getAllPlaces()

getNavigation

public FloydWarshallMap getNavigation()

getPath

public List<NavPoint> getPath(SPLocation from,
                              SPLocation to)
Finds path between navpoints that are the nearest to "from" / "to" location.

Parameters:
from -
to -
Returns:

getPath

public List<NavPoint> getPath(SPLocation from,
                              NavPoint to)
Finds path between navpoint that is the nearest to "from" and navpoint "to".

Parameters:
from -
to -
Returns:

getPath

public List<NavPoint> getPath(SPLocation from,
                              SPStoryPlace place)
Finds shortest path between the nearest navpoint to "from" and the "place", searching all the navpoints that is contained inside the place.

Parameters:
from -
place -
Returns:

getStoryWorldData

public SPStoryWorldData getStoryWorldData()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.