< prev index next >

modules/javafx.graphics/src/main/java/javafx/scene/SubScene.java

Print this page


   1 /*
   2  * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  38 import javafx.scene.input.PickResult;
  39 import javafx.scene.paint.Paint;
  40 
  41 import java.util.ArrayList;
  42 import java.util.List;
  43 
  44 import com.sun.javafx.geom.BaseBounds;
  45 import com.sun.javafx.geom.PickRay;
  46 import com.sun.javafx.geom.transform.BaseTransform;
  47 import com.sun.javafx.scene.CssFlags;
  48 import com.sun.javafx.scene.DirtyBits;
  49 import com.sun.javafx.scene.NodeHelper;
  50 import com.sun.javafx.scene.SubSceneHelper;
  51 import com.sun.javafx.scene.input.PickResultChooser;
  52 import com.sun.javafx.sg.prism.NGCamera;
  53 import com.sun.javafx.sg.prism.NGLightBase;
  54 import com.sun.javafx.sg.prism.NGNode;
  55 import com.sun.javafx.sg.prism.NGSubScene;
  56 import com.sun.javafx.tk.Toolkit;
  57 
  58 import sun.util.logging.PlatformLogger;
  59 
  60 /**
  61  * The {@code SubScene} class is the container for content in a scene graph.
  62  * {@code SubScene} provides separation of different parts of a scene, each
  63  * of which can be rendered with a different camera, depth buffer, or scene
  64  * anti-aliasing. A {@code SubScene} is embedded into the main scene or another
  65  * sub-scene.
  66  * <p>
  67  * An application may request depth buffer support or scene anti-aliasing
  68  * support at the creation of a {@code SubScene}. A sub-scene with only 2D
  69  * shapes and without any 3D transforms does not need a depth buffer nor scene
  70  * anti-aliasing support. A sub-scene containing 3D shapes or 2D shapes with 3D
  71  * transforms may use depth buffer support for proper depth sorted rendering; to
  72  * avoid depth fighting (also known as Z fighting), disable depth testing on 2D
  73  * shapes that have no 3D transforms. See
  74  * {@link Node#depthTestProperty depthTest} for more information. A sub-scene
  75  * with 3D shapes may enable scene anti-aliasing to improve its rendering
  76  * quality.
  77  * <p>
  78  * The depthBuffer and antiAliasing flags are conditional features. With the


   1 /*
   2  * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  38 import javafx.scene.input.PickResult;
  39 import javafx.scene.paint.Paint;
  40 
  41 import java.util.ArrayList;
  42 import java.util.List;
  43 
  44 import com.sun.javafx.geom.BaseBounds;
  45 import com.sun.javafx.geom.PickRay;
  46 import com.sun.javafx.geom.transform.BaseTransform;
  47 import com.sun.javafx.scene.CssFlags;
  48 import com.sun.javafx.scene.DirtyBits;
  49 import com.sun.javafx.scene.NodeHelper;
  50 import com.sun.javafx.scene.SubSceneHelper;
  51 import com.sun.javafx.scene.input.PickResultChooser;
  52 import com.sun.javafx.sg.prism.NGCamera;
  53 import com.sun.javafx.sg.prism.NGLightBase;
  54 import com.sun.javafx.sg.prism.NGNode;
  55 import com.sun.javafx.sg.prism.NGSubScene;
  56 import com.sun.javafx.tk.Toolkit;
  57 
  58 import com.sun.javafx.logging.PlatformLogger;
  59 
  60 /**
  61  * The {@code SubScene} class is the container for content in a scene graph.
  62  * {@code SubScene} provides separation of different parts of a scene, each
  63  * of which can be rendered with a different camera, depth buffer, or scene
  64  * anti-aliasing. A {@code SubScene} is embedded into the main scene or another
  65  * sub-scene.
  66  * <p>
  67  * An application may request depth buffer support or scene anti-aliasing
  68  * support at the creation of a {@code SubScene}. A sub-scene with only 2D
  69  * shapes and without any 3D transforms does not need a depth buffer nor scene
  70  * anti-aliasing support. A sub-scene containing 3D shapes or 2D shapes with 3D
  71  * transforms may use depth buffer support for proper depth sorted rendering; to
  72  * avoid depth fighting (also known as Z fighting), disable depth testing on 2D
  73  * shapes that have no 3D transforms. See
  74  * {@link Node#depthTestProperty depthTest} for more information. A sub-scene
  75  * with 3D shapes may enable scene anti-aliasing to improve its rendering
  76  * quality.
  77  * <p>
  78  * The depthBuffer and antiAliasing flags are conditional features. With the


< prev index next >