Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.xerox.VTM.engine
Class VirtualSpace  view VirtualSpace download VirtualSpace.java

java.lang.Object
  extended bycom.xerox.VTM.engine.VirtualSpace

public class VirtualSpace
extends java.lang.Object

A virtual space contains glyphs and can be observed through one or several cameras


Field Summary
(package private)  java.util.Vector[] camera2drawnList
           
(package private)  CameraManager cm
          camera manager for this virtual space
(package private)  java.util.Vector drawingList
          visible glyphs - order is important (biggest index gets drawn on top)
 java.lang.String spaceName
          name of virtual space
(package private)  java.util.Vector visualEnts
          all glyphs in this virtual space, visible or not
(package private)  VirtualSpaceManager vsm
           
 
Constructor Summary
(package private) VirtualSpace(java.lang.String n)
           
 
Method Summary
 void above(com.xerox.VTM.glyphs.Glyph g1, com.xerox.VTM.glyphs.Glyph g2)
          put glyph g1 just above glyph g2 in the drawing list (g1 painted after g2)
(package private)  void addGlyph(com.xerox.VTM.glyphs.Glyph g)
          add glyph g to this space
 void atBottom(com.xerox.VTM.glyphs.Glyph g)
          put this glyph at bottom of the drawing list (will be drawn first)
 void below(com.xerox.VTM.glyphs.Glyph g1, com.xerox.VTM.glyphs.Glyph g2)
          put glyph g1 just below glyph g2 in the drawing list (g1 painted before g2)
(package private)  Camera createCamera()
          create a new camera
protected  void destroy()
          destroy this virtual space - call method in virtual space manager
 void destroyGlyph(com.xerox.VTM.glyphs.Glyph g)
          remove this glyph from this virtual space (should then be garbage-collected)
protected  void drewGlyph(com.xerox.VTM.glyphs.Glyph gl, int cameraIndex)
           
 java.util.Vector getAllGlyphs()
          get all glyphs in this space, visible or not, sensitive or not
 Camera getCamera(int i)
          get virtual space's i-th camera
 java.util.Vector getCameraList()
          Deprecated. As of zvtm 0.9.0, replaced by getCameraListAsArray
 Camera[] getCameraListAsArray()
          returns the list of all cameras in this virtual space
 java.util.Vector getDrawnGlyphs()
          Deprecated. as of zvtm 0.9.0
 java.util.Vector getDrawnGlyphs(int cameraIndex)
          get all glyphs actually drawn for a given camera in this virtual space
static LongPoint getGlyphSetGeometricalCenter(com.xerox.VTM.glyphs.Glyph[] gl)
          computes the geometrical center of a set of glyphs (takes glyph sizes into account) (0,0 if list is empty)
 java.util.Vector getGlyphsOfType(java.lang.String t)
          get all glyphs of type t - if t=="" then select all glyphs (means ANY type)
 java.lang.String getName()
          get virtual space name
 java.util.Vector getSelectedGlyphs()
          get selected glyphs
 java.util.Vector getVisibleGlyphs()
          get all visible glyphs
 void hide(com.xerox.VTM.glyphs.Glyph g)
          hide this glyph
 void onTop(com.xerox.VTM.glyphs.Glyph g)
          put this glyph on top of the drawing list (will be drawn last)
 void removeCamera(int i)
          remove camera at index i when a camera is destroyed, its index is not reused for another one - so if camera number #3 is removed and then a new camera is added it will be assigned number #4 even though there is no camera at index #3 any longer
 void selectAllGlyphs()
          select all glyphs
(package private)  void setManager(VirtualSpaceManager v)
           
 void show(com.xerox.VTM.glyphs.Glyph g)
          make this glyph visible
 void unselectAllGlyphs()
          unselect all glyphs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spaceName

public java.lang.String spaceName
name of virtual space


vsm

VirtualSpaceManager vsm

cm

CameraManager cm
camera manager for this virtual space


visualEnts

java.util.Vector visualEnts
all glyphs in this virtual space, visible or not


drawingList

java.util.Vector drawingList
visible glyphs - order is important (biggest index gets drawn on top)


camera2drawnList

java.util.Vector[] camera2drawnList
Constructor Detail

VirtualSpace

VirtualSpace(java.lang.String n)
Method Detail

getGlyphSetGeometricalCenter

public static LongPoint getGlyphSetGeometricalCenter(com.xerox.VTM.glyphs.Glyph[] gl)
computes the geometrical center of a set of glyphs (takes glyph sizes into account) (0,0 if list is empty)


getName

public java.lang.String getName()
get virtual space name


getCamera

public Camera getCamera(int i)
get virtual space's i-th camera


getCameraList

public java.util.Vector getCameraList()
Deprecated. As of zvtm 0.9.0, replaced by getCameraListAsArray


getCameraListAsArray

public Camera[] getCameraListAsArray()
returns the list of all cameras in this virtual space


createCamera

Camera createCamera()
create a new camera


removeCamera

public void removeCamera(int i)
remove camera at index i when a camera is destroyed, its index is not reused for another one - so if camera number #3 is removed and then a new camera is added it will be assigned number #4 even though there is no camera at index #3 any longer


destroy

protected void destroy()
destroy this virtual space - call method in virtual space manager


addGlyph

void addGlyph(com.xerox.VTM.glyphs.Glyph g)
add glyph g to this space


getAllGlyphs

public java.util.Vector getAllGlyphs()
get all glyphs in this space, visible or not, sensitive or not


getVisibleGlyphs

public java.util.Vector getVisibleGlyphs()
get all visible glyphs


getDrawnGlyphs

public java.util.Vector getDrawnGlyphs()
Deprecated. as of zvtm 0.9.0


getDrawnGlyphs

public java.util.Vector getDrawnGlyphs(int cameraIndex)
get all glyphs actually drawn for a given camera in this virtual space


drewGlyph

protected void drewGlyph(com.xerox.VTM.glyphs.Glyph gl,
                         int cameraIndex)

getSelectedGlyphs

public java.util.Vector getSelectedGlyphs()
get selected glyphs


selectAllGlyphs

public void selectAllGlyphs()
select all glyphs


unselectAllGlyphs

public void unselectAllGlyphs()
unselect all glyphs


getGlyphsOfType

public java.util.Vector getGlyphsOfType(java.lang.String t)
get all glyphs of type t - if t=="" then select all glyphs (means ANY type)


destroyGlyph

public void destroyGlyph(com.xerox.VTM.glyphs.Glyph g)
remove this glyph from this virtual space (should then be garbage-collected)


show

public void show(com.xerox.VTM.glyphs.Glyph g)
make this glyph visible


hide

public void hide(com.xerox.VTM.glyphs.Glyph g)
hide this glyph


onTop

public void onTop(com.xerox.VTM.glyphs.Glyph g)
put this glyph on top of the drawing list (will be drawn last)


atBottom

public void atBottom(com.xerox.VTM.glyphs.Glyph g)
put this glyph at bottom of the drawing list (will be drawn first)


above

public void above(com.xerox.VTM.glyphs.Glyph g1,
                  com.xerox.VTM.glyphs.Glyph g2)
put glyph g1 just above glyph g2 in the drawing list (g1 painted after g2)


below

public void below(com.xerox.VTM.glyphs.Glyph g1,
                  com.xerox.VTM.glyphs.Glyph g2)
put glyph g1 just below glyph g2 in the drawing list (g1 painted before g2)


setManager

void setManager(VirtualSpaceManager v)