public final class PvScene extends PsObject
PvGeometryIf
,
PgGeometryIf
,
PvDisplayIf
,
Serialized FormHAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
Constructor and Description |
---|
PvScene()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addGeometry(jv.viewer.PvGeometry aGeometry)
Register geometry in scene for display.
|
boolean |
containsGeometry(PgGeometryIf aGeometry)
Checks whether geometry is registered in PvGeometry
|
PdVector[] |
getBounds()
Compute bounding box of all items in the scene, or return null if no items available.
|
double |
getDiameter()
Compute diameter if scene has items, otherwise return 0
|
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)
Major paint method of JavaView.
|
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)
Select current geometry which may become null if only special geometries are left.
|
void |
setState(int aKey,
boolean aState) |
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed.
|
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
public void init()
PsObject
public void addGeometry(jv.viewer.PvGeometry aGeometry)
public jv.viewer.PvGeometry removeGeometry(jv.viewer.PvGeometry aGeometry)
Remark: (Internal Note) The internal index of the current geometry also changes if it was the last one in the geometry array.
public void selectGeometry(jv.viewer.PvGeometry aGeometry)
public boolean containsGeometry(PgGeometryIf aGeometry)
public void setState(int aKey, boolean aState)
public PdVector[] getBounds()
public double getDiameter()
public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PsObject
event
- carries a lot of informationPsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public void paint(java.awt.Graphics g, PvDisplayIf disp)
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.
"