public class SPStoryWorld extends Object
Constructor and Description |
---|
SPStoryWorld(File worldXMLDefinition,
IWorldView ww,
Logger log) |
SPStoryWorld(SPStoryWorldData data,
IWorldView ww,
Logger log) |
SPStoryWorld(String worldXMLDefinitionFile,
IWorldView ww,
Logger log) |
Modifier and Type | Method and Description |
---|---|
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() |
public SPStoryWorld(String worldXMLDefinitionFile, IWorldView ww, Logger log) throws FileNotFoundException
FileNotFoundException
public SPStoryWorld(File worldXMLDefinition, IWorldView ww, Logger log) throws FileNotFoundException
FileNotFoundException
public SPStoryWorld(SPStoryWorldData data, IWorldView ww, Logger log)
public SPStoryPlace getPlace(cz.cuni.amis.utils.token.Token name)
public SPStoryPlace getPlace(String name)
public SPStoryPlaceBase getBase(cz.cuni.amis.utils.token.Token name)
public SPStoryPlaceBase getBase(String name)
public Set<SPStoryPlaceBase> getBase(UnrealId navPointId)
public Set<SPStoryPlaceBase> at(SPLocation location)
location
- public NavPoint getNearestNavPoint(SPLocation location)
public NavPoint getFurthestNavPoint(SPLocation location)
public boolean isInside(SPLocation location, SPStoryPlace place)
location
- place
- public Set<NavPoint> getNavPoints()
Can't be called before the definition of all story places are defined, otherwise it won't contains all places. (Lazy initialization.)
protected cz.cuni.amis.utils.maps.HashMapSet<UnrealId,SPStoryPlaceBase> getNavPointsToPlaceMap()
protected Map<cz.cuni.amis.utils.token.Token,SPStoryPlace> getAllPlaces()
public FloydWarshallMap getNavigation()
public List<NavPoint> getPath(SPLocation from, SPLocation to)
from
- to
- public List<NavPoint> getPath(SPLocation from, NavPoint to)
from
- to
- public List<NavPoint> getPath(SPLocation from, SPStoryPlace place)
from
- place
- public SPStoryWorldData getStoryWorldData()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.