< prev index next >

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

Print this page


   1 /*
   2  * Copyright (c) 2010, 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
  23  * questions.
  24  */
  25 
  26 package javafx.scene;
  27 
  28 import com.sun.javafx.geom.PickRay;
  29 import com.sun.javafx.geom.Vec3d;
  30 import com.sun.javafx.geom.transform.Affine3D;
  31 import com.sun.javafx.geom.transform.GeneralTransform3D;
  32 import com.sun.javafx.scene.DirtyBits;
  33 import com.sun.javafx.scene.NodeHelper;
  34 import com.sun.javafx.scene.PerspectiveCameraHelper;
  35 import com.sun.javafx.sg.prism.NGNode;
  36 import com.sun.javafx.sg.prism.NGPerspectiveCamera;
  37 import javafx.application.ConditionalFeature;
  38 import javafx.application.Platform;
  39 import javafx.beans.property.BooleanProperty;
  40 import javafx.beans.property.DoubleProperty;
  41 import javafx.beans.property.SimpleBooleanProperty;
  42 import javafx.beans.property.SimpleDoubleProperty;
  43 import sun.util.logging.PlatformLogger;
  44 
  45 
  46 
  47 /**
  48  * Specifies a perspective camera for rendering a scene.
  49  *
  50  * <p> This camera defines a viewing volume for a perspective projection;
  51  * a truncated right pyramid.
  52  * The {@code fieldOfView} value can be used to change viewing volume.
  53  * By default, this camera is located at center of the scene and looks along the
  54  * positive z-axis. The coordinate system defined by this camera has its
  55  * origin in the upper left corner of the panel with the Y-axis pointing
  56  * down and the Z axis pointing away from the viewer (into the screen).
  57  * If a {@code PerspectiveCamera} node is added to the scene graph,
  58  * the transformed position and orientation of the camera will define the
  59  * position of the camera and the direction that the camera is looking.
  60  *
  61  * <p> In the default camera, where fixedEyeAtCameraZero is false, the Z value
  62  * of the eye position is adjusted in Z such that the projection matrix generated
  63  * using the specified {@code fieldOfView} will produce units at


   1 /*
   2  * Copyright (c) 2010, 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
  23  * questions.
  24  */
  25 
  26 package javafx.scene;
  27 
  28 import com.sun.javafx.geom.PickRay;
  29 import com.sun.javafx.geom.Vec3d;
  30 import com.sun.javafx.geom.transform.Affine3D;
  31 import com.sun.javafx.geom.transform.GeneralTransform3D;
  32 import com.sun.javafx.scene.DirtyBits;
  33 import com.sun.javafx.scene.NodeHelper;
  34 import com.sun.javafx.scene.PerspectiveCameraHelper;
  35 import com.sun.javafx.sg.prism.NGNode;
  36 import com.sun.javafx.sg.prism.NGPerspectiveCamera;
  37 import javafx.application.ConditionalFeature;
  38 import javafx.application.Platform;
  39 import javafx.beans.property.BooleanProperty;
  40 import javafx.beans.property.DoubleProperty;
  41 import javafx.beans.property.SimpleBooleanProperty;
  42 import javafx.beans.property.SimpleDoubleProperty;
  43 import com.sun.javafx.logging.PlatformLogger;
  44 
  45 
  46 
  47 /**
  48  * Specifies a perspective camera for rendering a scene.
  49  *
  50  * <p> This camera defines a viewing volume for a perspective projection;
  51  * a truncated right pyramid.
  52  * The {@code fieldOfView} value can be used to change viewing volume.
  53  * By default, this camera is located at center of the scene and looks along the
  54  * positive z-axis. The coordinate system defined by this camera has its
  55  * origin in the upper left corner of the panel with the Y-axis pointing
  56  * down and the Z axis pointing away from the viewer (into the screen).
  57  * If a {@code PerspectiveCamera} node is added to the scene graph,
  58  * the transformed position and orientation of the camera will define the
  59  * position of the camera and the direction that the camera is looking.
  60  *
  61  * <p> In the default camera, where fixedEyeAtCameraZero is false, the Z value
  62  * of the eye position is adjusted in Z such that the projection matrix generated
  63  * using the specified {@code fieldOfView} will produce units at


< prev index next >