|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.inria.zvtm.engine.VirtualSpace
public class VirtualSpace
A virtual space contains glyphs and can be observed through multiple cameras.
| Field Summary | |
|---|---|
static String |
ANONYMOUS
Anonymous virtual space. |
| Method Summary | |
|---|---|
void |
above(Glyph g1,
Glyph g2)
Put glyph g1 just above glyph g2 in the drawing list (g1 painted after g2). |
Camera |
addCamera()
Add a new camera to this virtual space. |
void |
addGlyph(Glyph g)
Add glyph g to this virtual space. |
void |
addGlyph(Glyph g,
boolean repaint)
Add glyph g to this virtual space. |
void |
addGlyph(Glyph g,
boolean initColors,
boolean repaint)
Add glyph g to this virtual space. |
void |
addGlyphs(Glyph[] glyphs)
Add a list of glyphs to this virtual space. |
void |
addGlyphs(Glyph[] glyphs,
boolean repaint)
Add a list of glyphs to this virtual space. |
protected void |
addGlyphsToDrawingList(Glyph[] glyphs)
|
protected void |
addGlyphToDrawingList(Glyph g)
|
void |
atBottom(Glyph g)
Put this glyph at bottom of the drawing list (will be drawn first). |
void |
atBottom(Glyph g,
int z)
Put this glyph before the first glyph that has z-index z, but after any glyph that has a z-index lower than z (if any). |
void |
below(Glyph g1,
Glyph g2)
Put glyph g1 just below glyph g2 in the drawing list (g1 painted before g2). |
boolean |
contains(Glyph g)
Tests whether a glyph belongs to this virtual space or not. |
protected void |
destroy()
Destroy this virtual space. |
protected void |
drewGlyph(Glyph gl,
int cameraIndex)
|
double[] |
findFarmostGlyphCoords()
Get the bounding box of all glyphs visible in this virtual space. |
double[] |
findFarmostGlyphCoords(double[] res)
Get the bounding box of all glyphs visible in this virtual space. |
double[] |
findFarmostGlyphCoords(Glyph[] gl,
double[] res)
Get the bounding box of all glyphs visible in this virtual space. |
Vector<Glyph> |
getAllGlyphs()
Get all glyphs in this virtual space, visible or not, sensitive or not. |
Camera |
getCamera(int i)
Get the i-th camera added to this virtual space. |
Camera[] |
getCameraListAsArray()
Get a list of all cameras in this virtual space. |
Glyph[] |
getDrawingList()
Get all visible glyphs (not cloned). |
Vector<Glyph> |
getDrawnGlyphs(int cameraIndex)
Get all glyphs actually drawn for a given camera in this virtual space. |
static Point2D.Double |
getGlyphSetGeometricalCenter(Glyph[] gl)
Compute the geometrical center of a set of glyphs (takes glyph sizes into account) |
Vector<Glyph> |
getGlyphsOfType(String t)
get all glyphs of type t - if t=="" then select all glyphs (means ANY type) |
String |
getName()
Get name of this virtual space. |
Vector<Glyph> |
getSelectedGlyphs()
Get selected glyphs. |
Glyph[] |
getVisibleGlyphsList()
Get all visible glyphs (clone). |
protected int |
glyphIndexInDrawingList(Glyph g)
|
void |
hide(Glyph g)
hide Glyph g - use show() and hide() to change both the visibility and sensitivity of glyphs - use Glyph.setVisible() to only change the glyph's visibility, but not its sensitivity. |
protected void |
insertGlyphInDrawingList(Glyph g,
int index)
|
void |
onTop(Glyph g)
Put this glyph on top of the drawing list (will be drawn last). |
void |
onTop(Glyph g,
int z)
Put this glyph after the last glyph that has z-index z, but before any glyph that has a z-index higher than z (if any). |
boolean |
registerPicker(Picker p)
Register an external picker with this view. |
void |
removeAllGlyphs()
Remove all glyphs from this virtual space. |
void |
removeAllGlyphs(boolean repaint)
Remove all glyphs from this virtual space. |
void |
removeCamera(int i)
Rremove camera at index i from this virtual space. |
void |
removeGlyph(Glyph g)
Remove glyph g from this virtual space. |
void |
removeGlyph(Glyph g,
boolean repaint)
Remove this glyph from this virtual space. |
protected void |
removeGlyphFromDrawingList(Glyph g)
|
void |
selectAllGlyphs()
Select all glyphs |
void |
show(Glyph g)
show Glyph g - use show() and hide() to change both the visibility and sensitivity of glyphs - use Glyph.setVisible() to only change the glyph's visibility, but not its sensitivity. |
boolean |
unregisterPicker(Picker p)
Unregister an external picker from this view. |
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 |
|---|
public static final String ANONYMOUS
| Method Detail |
|---|
public static Point2D.Double getGlyphSetGeometricalCenter(Glyph[] gl)
gl - a list of Glyph instances
public String getName()
public Camera getCamera(int i)
public Camera[] getCameraListAsArray()
public Camera addCamera()
public void removeCamera(int i)
i - index of camera in virtual spaceprotected void destroy()
public void addGlyph(Glyph g,
boolean initColors,
boolean repaint)
public void addGlyph(Glyph g)
public void addGlyph(Glyph g,
boolean repaint)
repaint - pass false if views should not be repainted as a consequence of this addition (default is true).
public void addGlyphs(Glyph[] glyphs,
boolean repaint)
repaint - pass false if views should not be repainted as a consequence of this addition (default is true).public void addGlyphs(Glyph[] glyphs)
public Vector<Glyph> getAllGlyphs()
public boolean contains(Glyph g)
public Glyph[] getDrawingList()
getVisibleGlyphsList()public Glyph[] getVisibleGlyphsList()
getDrawingList()public Vector<Glyph> getDrawnGlyphs(int cameraIndex)
protected void drewGlyph(Glyph gl,
int cameraIndex)
public Vector<Glyph> getSelectedGlyphs()
public void selectAllGlyphs()
public void unselectAllGlyphs()
public Vector<Glyph> getGlyphsOfType(String t)
public void removeAllGlyphs()
public void removeAllGlyphs(boolean repaint)
repaint - true to repaint all views afterwards, false otherwisepublic void removeGlyph(Glyph g)
public void removeGlyph(Glyph g,
boolean repaint)
repaint - should the view be updated automatically or not once the glyph has been removed. Default is true.public void show(Glyph g)
hide(Glyph g)public void hide(Glyph g)
show(Glyph g)public void onTop(Glyph g)
public void atBottom(Glyph g)
public void onTop(Glyph g,
int z)
z - the considered z-index
public void atBottom(Glyph g,
int z)
z - the considered z-index
public void above(Glyph g1,
Glyph g2)
public void below(Glyph g1,
Glyph g2)
public double[] findFarmostGlyphCoords()
public double[] findFarmostGlyphCoords(double[] res)
res - array which will contain the result
public double[] findFarmostGlyphCoords(Glyph[] gl,
double[] res)
gl - list of glyphs to iterate upon (will typically be a subset of all glyphs in the virtual space)res - array which will contain the result
public boolean registerPicker(Picker p)
public boolean unregisterPicker(Picker p)
protected void addGlyphToDrawingList(Glyph g)
protected void addGlyphsToDrawingList(Glyph[] glyphs)
protected void insertGlyphInDrawingList(Glyph g,
int index)
protected void removeGlyphFromDrawingList(Glyph g)
protected int glyphIndexInDrawingList(Glyph g)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||