Documentation of 'jv.viewer.PvScene' Java class
PvScene ("JavaView Reference Manual")
"JavaView? v5.03.003"
jv.viewer

Class PvScene

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf


    public final class PvScene
    extends PsObject
    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.
    See Also:
    PvGeometryIf, PgGeometryIf, PvDisplayIf, Serialized Form
    Author:
    Konrad Polthier
    Version:
    21.04.14, 3.01 revised (kp) Computation of zNear and zFar corrected in paint().
    11.02.14, 2.40 revised (kp) Bug in z-buffered depthcue, now exclude special geometries in max z-depth calculation.
    06.02.05, 2.30 revised (kp) Internal height variables removed if last geometry is removed.
    18.01.04, 2.40 revised (kp) Lighting of textured surfaces implemented.
    17.03.03, 2.30 revised (kp) Scene bounding box clipping implemented.
    07.12.02, 2.20 revised (kp) Perspectivity implemented.
    02.07.00, 2.10 revised (kp) Maximal number of registered geometries now automatically adjusted if necessary.
    09.04.00, 2.00 revised (kp) Renamed to PvScene from PvPaint.
    21.06.99, 1.02 revised (kp) Clipping activated.
    02.01.99, 1.01 revised (kp) Additional integer argument for setList calls.
    00.00.97, 1.00 created (kp)
    • Field Detail

      • m_bTiming

        public static boolean m_bTiming
        Print timer information into display.
    • Constructor Detail

      • PvScene

        public PvScene()
        Constructor.
    • Method Detail

      • init

        public void init()
        Description copied from class: PsObject
        If instance has missing name then assign default name 'Object_NUMBER' where number is the total number of already created instances.
        Overrides:
        init in class PsObject
      • addGeometry

        public void addGeometry(PvGeometry aGeometry)
        Register geometry in scene for display.
        Version:
        25.10.01, 1.10 revised (kp) JAX did not replace a cast to PvGeometry.
      • removeGeometry

        public PvGeometry removeGeometry(PvGeometry aGeometry)
        Remove geometry from list of registered geometries and return new current geometry container. The current geometry changes if it was the removed geometry. The visible geometry with smallest index is taken, otherwise the first geometry.

        Remark: (Internal Note) The internal index of the current geometry also changes if it was the last one in the geometry array.

        Returns:
        PvGeometry new current geometry container
        Version:
        05.05.05, 1.20 revised (kp) Preferably return a visible geometry.
        29.10.00, 1.10 revised (kp) Update of current geometry corrected.
      • selectGeometry

        public void selectGeometry(PvGeometry aGeometry)
        Select current geometry which may become null if only special geometries are left.
        Version:
        03.05.14, 1.30 revised (kp) Selection of null geometry now clears m_currentGeom.
        24.07.04, 1.20 revised (kp) Activated again: select special geometries.
        21.04.04, 1.10 revised (kp) No longer select special geometries.
      • containsGeometry

        public boolean containsGeometry(PgGeometryIf aGeometry)
        Checks whether geometry is registered in PvGeometry
      • setState

        public void setState(int aKey,
                             boolean aState)
      • getBounds

        public PdVector[] getBounds()
        Compute bounding box of all items in the scene, or return null if no items available. All items are multiplied with their modelling matrix before bounding box calculation.
      • getDiameter

        public double getDiameter()
        Compute diameter if scene has items, otherwise return 0
      • paint

        public void paint(java.awt.Graphics gPaintSceneGraphicsxxxxxxxxxxxxxxx,
                          PvDisplayIf disp)
        Major paint method of JavaView. All geometry items are z-sorted and drawn using Painter's algorithm. For each geometry items exists a reference by index to its geometry whose drawing method is invoked.

        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.

        Version:
        21.04.14, 3.01 revised (kp) Computation of zNear and zFar corrected.
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

Ads help maintain this website.