public class SceneManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HTTP_AUTH_PASSWORD |
static String |
HTTP_AUTH_USER |
static String |
SO_CAMERA |
static String |
SO_PARAMS |
static String |
SO_TYPE |
static short |
SO_TYPE_TVSO |
static short |
SO_TYPE_VSO |
static String |
SO_VIRTUAL_SPACES |
static short |
TAKES_TO_OBJECT |
static short |
TAKES_TO_REGION |
Constructor and Description |
---|
SceneManager(HashMap<String,Object>[] soDescriptions,
HashMap<String,String> properties) |
SceneManager(SceneObserver[] sos,
HashMap<String,String> properties)
Scene Manager: Main ZUIST class instantiated by client application.
|
Modifier and Type | Method and Description |
---|---|
void |
addSceneObserver(SceneObserver so) |
static SceneObserver[] |
buildObservers(HashMap<String,Object>[] soDescriptions) |
ObjectPicker |
createObjectPicker(int tl,
int bl) |
RegionPicker |
createRegionPicker(int tl,
int bl) |
void |
enableRegionUpdater(boolean b) |
double[] |
findFarmostRegionCoords()
Get the bounding box of all regions in this scene.
|
Region |
getClosestRegionAtCurrentLevel(Point2D.Double lp,
int level)
Get region whose center is closest to a given location at level l.
|
static boolean |
getDebugMode() |
static String |
getHTTPPassword() |
static String |
getHTTPUser() |
Level |
getLevel(int index)
Get a level.
|
int |
getLevelCount()
Get the total number of levels in the scene.
|
ObjectDescription |
getObject(String id)
Get an object knowing its ID.
|
int |
getObjectCount()
Get the total number of objects (at any level and in any region) in the scene.
|
Collection<ObjectDescription> |
getObjectDescriptions()
Gets an unmodifiable view of every ObjectDescription known
to this SceneManager
|
Set<String> |
getObjectIDs()
Get a list of all object IDs, at any level and in any region.
|
ObjectListener |
getObjectListener() |
Point2D.Double |
getOrigin()
Is set to something else than 0,0 when translating a scene to another location than that defined originally.
|
int |
getPendingRequestQueueSize() |
Region |
getRegion(String id)
Get a region knowing its ID.
|
int |
getRegionCount()
Get the total number of regions (at any level) in the scene.
|
Set<String> |
getRegionIDs() |
Region[] |
getRegionsAtLevel(int level)
Get all regions that belong to a given level.
|
ResourceHandler |
getResourceHandler(String rType)
Get the class handling a given type of resource.
|
HashMap |
getSceneAttributes() |
SceneBuilder |
getSceneBuilder() |
Region[] |
loadScene(Document scene,
File sceneFileDirectory,
boolean reset)
Load a multi-scale scene configuration described in an XML document.
|
Region[] |
loadScene(Document scene,
File sceneFileDirectory,
boolean reset,
ProgressListener pl)
Load a multi-scale scene configuration described in an XML document.
|
void |
objectCreated(ObjectDescription od)
For internal use.
|
void |
objectDestroyed(ObjectDescription od)
For internal use.
|
void |
removeSceneObserver(SceneObserver so) |
void |
reset() |
static void |
setDebugMode(boolean b) |
void |
setFadeInDuration(int d) |
void |
setFadeOutDuration(int d) |
static void |
setHTTPPassword(String p) |
static void |
setHTTPUser(String u) |
void |
setObjectListener(ObjectListener ol) |
void |
setOrigin(Point2D.Double p)
Set to something else than 0,0 to translate a scene to another location than that defined originally.
|
void |
setProperties(HashMap<String,String> properties)
Set properties on this scene manager.
|
void |
setRegionUpdatePeriod(int period)
Sets the RegionUpdater period.
|
void |
setResourceHandler(String rType,
ResourceHandler rh)
Declare a ResourceHandler for a given type of resource.
|
void |
setUpdateLevel(boolean b)
Enable/disable level updating.
|
void |
shutdown()
Shuts down this SceneManager.
|
void |
updateVisibleRegions()
Update visible regions for all cameras.
|
public static final short TAKES_TO_OBJECT
public static final short TAKES_TO_REGION
public static final String SO_TYPE
public static final String SO_CAMERA
public static final String SO_VIRTUAL_SPACES
public static final String SO_PARAMS
public static final short SO_TYPE_VSO
public static final short SO_TYPE_TVSO
public static final String HTTP_AUTH_USER
public static final String HTTP_AUTH_PASSWORD
public SceneManager(SceneObserver[] sos, HashMap<String,String> properties)
sos
- scene observers through which the scene will be observed.properties
- properties that can be set on this scene manager.setProperties(HashMap properties)
public static SceneObserver[] buildObservers(HashMap<String,Object>[] soDescriptions)
public SceneBuilder getSceneBuilder()
public void setProperties(HashMap<String,String> properties)
public static void setHTTPUser(String u)
public static void setHTTPPassword(String p)
public static String getHTTPUser()
public static String getHTTPPassword()
public void addSceneObserver(SceneObserver so)
public void removeSceneObserver(SceneObserver so)
public void setRegionUpdatePeriod(int period)
period
milliseconds.period
- the new period, in milliseconds.public void shutdown()
public void setResourceHandler(String rType, ResourceHandler rh)
rType
- type of resource to be handled, e.g., "pdf", "img", ...rh
- class implementing ResourceHandler for that type of resourcepublic ResourceHandler getResourceHandler(String rType)
rType
- type of resource to handled, e.g., "pdf", "img", ...public Collection<ObjectDescription> getObjectDescriptions()
public void setOrigin(Point2D.Double p)
public Point2D.Double getOrigin()
public HashMap getSceneAttributes()
public Region getRegion(String id)
public Set<String> getObjectIDs()
public ObjectDescription getObject(String id)
public int getObjectCount()
public int getRegionCount()
public int getLevelCount()
public Level getLevel(int index)
index
- index of level.public Region[] getRegionsAtLevel(int level)
level
- index of level.public Region[] loadScene(Document scene, File sceneFileDirectory, boolean reset)
scene
- XML document (DOM) containing the scene descriptionsceneFileDirectory
- absolute or relative (w.r.t exec dir) path to the directory containing that XML file (required only if the scene contains image objects whose location is indicated as relative paths to the bitmap files)reset
- reset scene (default is true) ; if false, append regions and objects to existing scene, new levels are ignored (as they would most likely conflict).public Region[] loadScene(Document scene, File sceneFileDirectory, boolean reset, ProgressListener pl)
scene
- XML document (DOM) containing the scene descriptionsceneFileDirectory
- absolute or relative (w.r.t exec dir) path to the directory containing that XML file (required only if the scene contains image objects whose location is indicated as relative paths to the bitmap files)reset
- reset scene (default is true) ; if false, append regions and objects to existing scene, new levels are ignored (as they would most likely conflict).public RegionPicker createRegionPicker(int tl, int bl)
public ObjectPicker createObjectPicker(int tl, int bl)
public int getPendingRequestQueueSize()
public void setObjectListener(ObjectListener ol)
public ObjectListener getObjectListener()
public void objectCreated(ObjectDescription od)
public void objectDestroyed(ObjectDescription od)
public void reset()
public void enableRegionUpdater(boolean b)
public void setUpdateLevel(boolean b)
updateLevel(SceneObserver so)
public Region getClosestRegionAtCurrentLevel(Point2D.Double lp, int level)
public void updateVisibleRegions()
public void setFadeInDuration(int d)
public void setFadeOutDuration(int d)
public double[] findFarmostRegionCoords()
public static void setDebugMode(boolean b)
public static boolean getDebugMode()
Copyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.