|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jv.object.PsObject
|
+--jv.viewer.PvScene
Container class for display. This class holds a set of geometries of class PvGeometry. Each PgGeometry registered in a PvDisplay is stored in the PvScene class associated with the display.
jv.project.PvGeometry,
PgGeometryIf,
PvDisplayIf, Serialized Form| Field Summary | |
protected PdVector[] |
m_bndBox
Rectangular bounding box of the geometry in world coordinates. |
protected PdVector |
m_center
Center of geometries world coordinate system |
protected jv.viewer.PvGeometry |
m_currentGeom
Container of selected geometry |
protected int |
m_dim
Dimension of items. |
protected int |
m_dimWithZBuffer
Determines number of components of each vector which describes a scanline. |
protected jv.viewer.PvGeometry[] |
m_geometry
Set of associated real geometries which implement PgGeometryIf |
protected double[] |
m_itemHeight
Array with z-values of each projected item. |
protected int[][] |
m_itemInd
Position of items of each geometry in global item list |
protected int[] |
m_itemSort
Index of item corresponding to a height entry in m_itemHeight. |
protected int |
m_maxNumGeometries
Maximal number of registered geometries. |
protected int |
m_numGeometries
Number of registered geometries. |
protected int |
m_numItems
Total number of items of all geometries. |
protected int |
m_pickedGeometry
Index of picked geometry, used for dragging. |
protected int |
m_pickedVertex
Index of picked vertex, used for dragging. |
protected java.util.Vector |
m_special
Vector containing all back and front geometries, they are not height sorted together with standard geometries. |
protected static int |
m_zMax
|
protected static int |
m_zMin
|
protected static int |
t_itemInd
Major paint method of JavaView. |
| Fields inherited from class jv.object.PsObject |
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS |
| Constructor Summary | |
PvScene()
Constructor. |
|
| Method Summary | |
void |
addGeometry(jv.viewer.PvGeometry aGeometry)
Register geometry to be displayed |
boolean |
containsGeometry(PgGeometryIf aGeometry)
Checks whether geometry is registered in PvGeometry |
PdVector[] |
getBounds()
Compute bounding box if scene has number of items, otherwise return null. |
double |
getDiameter()
Compute diameter if scene has items, otherwise return 0 |
protected jv.viewer.PvGeometry[] |
getGeometries()
Get all registered geometries including back and front geometry. |
protected jv.viewer.PvGeometry |
getGeometry(PgGeometryIf aGeometry)
Query geometry array to obtain the geometry container of a user geometry. |
protected double |
getHeightOfItemInCurrentGeometry(int itemInd)
Get height of item with given index. |
void |
init()
If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances. |
void |
paint(java.awt.Graphics g,
PvDisplayIf disp)
|
jv.viewer.PvGeometry |
removeGeometry(jv.viewer.PvGeometry aGeometry)
Remove geometry from list of registered geometries and return new current geometry container. |
void |
selectGeometry(jv.viewer.PvGeometry aGeometry)
|
void |
setState(int aKey,
boolean aState)
|
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed. |
| Methods inherited from class jv.object.PsObject |
addInspector, addUpdateListener, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, updatePanels |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int m_maxNumGeometries
protected int m_numGeometries
protected jv.viewer.PvGeometry[] m_geometry
protected java.util.Vector m_special
protected jv.viewer.PvGeometry m_currentGeom
protected int m_numItems
protected int[][] m_itemInd
protected double[] m_itemHeight
protected int[] m_itemSort
protected int m_dim
protected PdVector[] m_bndBox
protected PdVector m_center
protected int m_pickedVertex
protected int m_pickedGeometry
protected int m_dimWithZBuffer
protected static int t_itemInd
It is possible to draw a single geometry in the background first, and another geometry in the foreground after all major drawing has happened. Back- and foreground geometry are drawn by applying Painter's only to their own geometry items.
protected static int m_zMin
protected static int m_zMax
| Constructor Detail |
public PvScene()
| Method Detail |
public void init()
PsObjectinit in class PsObjectpublic void addGeometry(jv.viewer.PvGeometry aGeometry)
public jv.viewer.PvGeometry removeGeometry(jv.viewer.PvGeometry aGeometry)
public void selectGeometry(jv.viewer.PvGeometry aGeometry)
public boolean containsGeometry(PgGeometryIf aGeometry)
protected jv.viewer.PvGeometry getGeometry(PgGeometryIf aGeometry)
protected jv.viewer.PvGeometry[] getGeometries()
public void setState(int aKey,
boolean aState)
public PdVector[] getBounds()
public double getDiameter()
public boolean update(java.lang.Object event)
update in class PsObjectjv.object.PsObjectPsObject.setParent(PsUpdateIf),
PsObject.getFather(),
PsObject.addUpdateListener(PsUpdateIf)
public void paint(java.awt.Graphics g,
PvDisplayIf disp)
protected double getHeightOfItemInCurrentGeometry(int itemInd)
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||